-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
Rewrite asyncio.wait_for
using asyncio.timeout
#96764
Comments
Note that whatever we do should preserve all the existing behavior in |
@graingert IIRC you had a branch for this, interested in this? |
Yeah I'm interested, but one thing to note is that wait_for has changed dramatically between versions so matching the behavior is hard |
It can be evaluated by checking how many tests it breaks by just changing it to use |
#31847 (comment) here's the work so far |
Changes `asyncio.wait_for` to use `asyncio.timeout` as its underlying implementation.
When can we expect it to be released? |
3.12 |
Just want to note on this issue that this change is an unfortunate compatibility break in our Temporal deterministic event loop implementation. We can deterministically implement |
Over the years a lot of issues have accumulated for
asyncio.wait_for
and the code has become complicated. Theasyncio.timeout
can be used to simplify this a lot and will also fix bugs which are already fixed or don't exist inasyncio.timeout
. This rewrite won't be backported.asyncio.wait_for
should be nothing more than a wrapper aroundasyncio.timeout
.asyncio.wait_for
issues: https://github.com/python/cpython/issues?q=is%3Aissue+is%3Aopen+wait_for+label%3Aexpert-asyncioLinked PRs
asyncio.wait_for
to useasyncio.timeout
#98518The text was updated successfully, but these errors were encountered: