fix: use stdlib asyncio.timeout instead of the deprecated async-timeout - #2163
Draft
aryansk wants to merge 1 commit into
Draft
fix: use stdlib asyncio.timeout instead of the deprecated async-timeout#2163aryansk wants to merge 1 commit into
asyncio.timeout instead of the deprecated async-timeout#2163aryansk wants to merge 1 commit into
Conversation
…ut (apify#2052) - `crawlee/_utils/time.py` now imports `asyncio.timeout`/`asyncio.Timeout` on Python 3.11+ and falls back to the `async-timeout` backport only on 3.10 (the API is identical). - `async-timeout` is now an environment-marked dependency (`python_version < '3.11'`), so 3.11+ installs no longer pull the deprecated package. - `uv.lock` regenerated for the marker. Co-Authored-By: Codebuff <noreply@codebuff.com>
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.
Closes #2052
Summary
Drops the deprecated
async-timeoutdependency for Python 3.11+ and uses the stdlib equivalent, per #2052.crawlee/_utils/time.pynow importsasyncio.timeout/asyncio.Timeouton Python 3.11+ and falls back to theasync-timeoutbackport only on 3.10 — the two APIs are drop-in identical forSharedTimeout.async-timeout>=5.0.1becomes an environment-marked dependency (python_version < '3.11'), so 3.11+ installs no longer pull the deprecated package (the issue's "effectively upstreamed into Python 3.11+" README note). Python 3.10 support is unchanged.uv.lockregenerated for the marker.Validation
tests/unit/_utils/— 294 passed on Python 3.13 (stdlib path exercised, incl.test_shared_timeout.py).test_shared_timeout.py— 4/4 passed on Python 3.10 (backport path).tests/unit— 2166 passed; the 98 failures/26 errors are all in Playwright/stagehand browser tests that require the Playwright browser executable (not installed in this environment), unrelated to this change.ruff check+ruff format --checkclean on the changed file.