Conversation
This PR deprecate explicit loop parameters in all public asyncio APIs This issues is split to be easier to review. First step: tasks.py
tirkarthi
left a comment
There was a problem hiding this comment.
Please handle DeprecationWarning in the tests. Running with -Werror would give test failures due to warnings.
asvetlov
left a comment
There was a problem hiding this comment.
Agree with @tirkarthi
./python -Werror -m test should pass
You can find the following command useful in development:
`./python -Werror -m test -v test_asyncio"
asvetlov
left a comment
There was a problem hiding this comment.
Please run the PR with ./python -Werror -m test --check-env-changed -v test_asyncio and make sure that the test run is succeded.
| """ | ||
|
|
||
| def __init__(self, children, *, loop=None): | ||
| if loop: |
There was a problem hiding this comment.
This check is redundant: asyncio.gather() always passes loop to internal _GatheringFuture constructor.
|
|
||
| def __init__(self, coro, *, loop=None, name=None): | ||
| if loop: | ||
| warnings.warn("The loop argument is deprecated since Python 3.8, " |
There was a problem hiding this comment.
Task is called with explicit loop by loop.create_task() method, please drop the check
Codecov Report
@@ Coverage Diff @@
## master #13670 +/- ##
==========================================
- Coverage 82.78% 82.78% -0.01%
==========================================
Files 1842 1842
Lines 559265 559276 +11
Branches 41382 41387 +5
==========================================
- Hits 463009 462990 -19
- Misses 87188 87209 +21
- Partials 9068 9077 +9
Continue to review full report at Codecov.
|

This PR deprecate explicit loop parameters in all public asyncio APIs
This issues is split to be easier to review.
First step: tasks.py
https://bugs.python.org/issue36373