debt: remove async-timeout in favor of asyncio.timeout - #2120
Open
RohithPariki wants to merge 1 commit into
Open
debt: remove async-timeout in favor of asyncio.timeout#2120RohithPariki wants to merge 1 commit into
RohithPariki wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2052
Description
This PR drops the deprecated
async-timeoutdependency in favor of the standard library'sasyncio.timeout, as the functionality was upstreamed into Python 3.11+.As discussed in the issue (and targeting the 2.0 milestone), this PR drops support for Python 3.10 to allow for the clean path of using the standard library directly without version-guarded imports.
Changes Made
async-timeoutfrom dependencies and bumpedrequires-python(and related classifiers) to>=3.11.async_timeout.timeoutwithasyncio.timeoutinside theSharedTimeoutclass. Retained the existing context manager logic asasyncio.timeoutalso serves as a drop-in async context manager in Python 3.11+.Verification
SharedTimeoutsuccessfully catches operations exceeding the budget and properly propagatesTimeoutError.ruffto ensure formatting and linting rules are upheld.