-
Notifications
You must be signed in to change notification settings - Fork 65
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
Make loop parameter optional #66
Comments
The |
The current API is
whereas the API from
I would propose the following:
|
Rather than changing the meaning of existing positional arguments, I propose we go for keyword-only arguments, and the make the loop argument optional. |
For more information about the loop parameter see What are all these deprecated “loop” parameters in asyncio? and Passing asyncio loop by argument or using default asyncio loop.
For most use cases the loop parameter is not needed and is deprecated in most high level APIs since 3.8 and will be removed in 3.10. The main reason for its existence were a bad specification of
asyncio.get_event_loop
(<3.6) and poor performance (<3.7). However these are fixed now. While I am not sure about deprecating the loop parameter like it is done in the high level asyncio interfaces I think we should probably make the argument a keyword-only argument or at least optional.This will make the API easier to understand and simpler for newcomers. However we should probably think of a good conversion plan (we are still in 0.x so semver allows breaking changes).
The text was updated successfully, but these errors were encountered: