-
-
Notifications
You must be signed in to change notification settings - Fork 32
Remove loop params that break in Python 3.10 #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Silences warning (or perhaps legit error, now)
In Python 3.9, they are optional, and we default to the active event loop.
Code Climate has analyzed commit 10e9545 and detected 0 issues on this pull request. View more on Code Climate. |
@srh Thanks for the changes. I have the question below https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for does remove the |
@lsabi It is an optional parameter, and it's only used for interacting with multiple event loops. Basically, the only way it would happen to change things is if somebody tried to use the coroutine across multiple event loops. However, let me double check nothing breaks on Python 3.5. I don't think it's a required parameter, but I still need to get Python 3.5 working. (I tried building from source yesterday, and pip got segfaults, which blocked me.) |
I can confirm (through testing) that the loop parameters are optional in Python 3.5. |
@srh Starting from python 3.10 and upwards, there are no optional parameters, just Thanks |
@lsabi I tested the code (for 3.5) by running it with Python 3.5. This confirmed that it uses the currently running event loop when the The asyncio example in the readme, or the updated version in the other PR: ef08ba2 will hit the reusable_waiter wait_for and the open_connection cases. |
@srh I didn't manage to make it work locally, but it's been a while since I last run a python program on my personal machine, so I may need some updates and setup. Since you tested with 3.10+ versions I'm going to accept it and merge it |
To be clear it was tested with the changes in #303. Used a source distribution of Python 3.5, and on Ubuntu Linux, I configured and built the code with a custom |
Addresses #264. This problem could be reproduced with the README.
The loop parameter as documented in 3.9 is optional. In 3.10 it is removed.
https://docs.python.org/3.9/library/asyncio-stream.html#asyncio.open_connection
Checklist