mosquito / aio-pika

AMQP 0.9 client designed for asyncio and humans.
https://aio-pika.readthedocs.org/
Apache License 2.0
1.18k stars 186 forks source link

Remove `loop` params #493

Closed Olegt0rr closed 8 months ago

Olegt0rr commented 1 year ago

Application developers should typically use the high-level asyncio functions, such as asyncio.run(), and should rarely need to reference the loop object or call its methods

mosquito commented 1 year ago

@Olegt0rr thanks for this PR, but I'm afraid you overdid it a bit. The fact is that now the main supported versions of python in this project are 3.7, 3.8, 3.9 and 3.10, and only in the latter the support for the loop argument has beed dropped.

Your first commit was limited only to the fact that you removed this argument from the examples, which is good, I agree with this, but in order to remove this from the entire public API, I will have to bump the major version.

Olegt0rr commented 1 year ago

Agree :) The second commit reverted

Olegt0rr commented 1 year ago

If we consider docs then there is also loop parameter here https://github.com/mosquito/aio-pika/blame/master/docs/source/rabbitmq-tutorial/2-work-queues.rst#L162 and here https://github.com/mosquito/aio-pika/blob/master/docs/source/rabbitmq-tutorial/examples/6-rpc/rpc_client.py.

Now fixed

decaz commented 1 year ago

@mosquito did we dropped support of 3.6? If no then @Olegt0rr should left the usage of asyncio.get_event_loop.

mosquito commented 1 year ago

@decaz yep https://github.com/mosquito/aio-pika/blob/master/setup.py#L32

decaz commented 1 year ago

@mosquito I asked because we still have "Python 3.6+ compatible." in README.

mosquito commented 1 year ago

@decaz fixed

coveralls commented 8 months ago

Coverage Status

coverage: 88.402%. remained the same when pulling ff3cc46846d3af86207041150d3da220cb4e2f63 on Olegt0rr:hide-loop into 478b3e9f2bba21c0918195eef94614c6cf39a52d on mosquito:master.