Remove `async-timeout` dependency in favor of stdlib `asyncio.timeout`
Summary
Drop the async-timeout dependency (async-timeout>=5.0.1 in pyproject.toml) and replace it with the standard library equivalent.
Why
async-timeout is deprecated and no longer actively maintained. Its functionality has been upstreamed into Python 3.11+ as asyncio.timeout and asyncio.Timeout. The upstream README states:
This library has effectively been upstreamed into Python 3.11+. Therefore this library is considered deprecated and no longer actively supported.
Every dependency we can drop is one fewer thing to keep patched and audited, so removing an abandoned package is worth doing.
Where it's used
The only usage is in src/crawlee/_utils/time.py:
from async_timeout import Timeout, timeoutused by the SharedTimeout context manager.
Blocker / plan
asyncio.timeout was added in Python 3.11, but Crawlee still supports Python 3.10 (requires-python = ">=3.10"). Options:
- Drop Python 3.10 support and switch to
asyncio.timeout/asyncio.Timeoutdirectly — fits the 2.0 milestone. - Keep 3.10 support via a version-guarded import (
sys.version_info >= (3, 11)) until 3.10 is dropped.
Targeting the 2.0 milestone since dropping Python 3.10 is the clean path.
Source: apify/crawlee-python