Remove `async-timeout` dependency in favor of stdlib `asyncio.timeout`

Author: vdusekCreated Jul 9, 2026Updated Sep 22, 2026
Labelst-tooling

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:

python
from async_timeout import Timeout, timeout

used 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:

  1. Drop Python 3.10 support and switch to asyncio.timeout / asyncio.Timeout directly — fits the 2.0 milestone.
  2. 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.