Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
GH-86296: Fix for asyncio.wait_for() swallowing cancellation, and add tests#98607
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
GH-86296: Fix for asyncio.wait_for() swallowing cancellation, and add tests #98607
Uh oh!
There was an error while loading. Please reload this page.
Conversation
twisteroidambassador commented Oct 24, 2022
In particular, these are the expected failures: |
twisteroidambassador commented Oct 25, 2022
The latest commit is enough to fix #86296, however it still fails one of the new tests added. Specifically, with Now the question is: is this over-specification? If so, we should remove this test and call it a day. |
The existing method of setting identical timeout / sleep lengths is not reliable.
This means swallowing the inner future's result / exception, if they are set simultaneously with the external cancellation.
twisteroidambassador commented Oct 26, 2022
I have changed Also changed new tests to match. Now all tests should pass. |
gvanrossum commented Nov 30, 2022
I need to put this back into my review queue! |
robsdedude commented Dec 14, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
FWIW, there already have been
trying to tackle this issue. I'll state it again, I think this is a really nasty bug comparable to a function in the std lib swallowing a |
netlifybot commented Dec 14, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
✅ Deploy Preview for python-cpython-preview canceled.
|
kumaraditya303 commented Mar 14, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
AFAIK, this is superseded by #96764 which fixed the issue and tests have been added for each case. The tests being added here seems much harder to understand than whose which are already added. |
robsdedude commented Mar 14, 2023
@kumaraditya303 with the difference that this PR could be ported back to Python 3.10 while the one you linke depends on |
gvanrossum commented Mar 14, 2023
I’m not very keen on having to learn yet again all the edge cases of wait_for. Maybe we can just leave 3.10 alone? |
kumaraditya303 commented Mar 14, 2023
Nor am I, there is only one bug fix release left for 3.10 and I don't want to risk introducing any issue in a stable branch. |
gvanrossum commented Mar 14, 2023
So let's just close this. |
Uh oh!
There was an error while loading. Please reload this page.