Skip to content

Remove async-timeout dependency in favor of stdlib asyncio.timeout #2052

Closed

Description

@vdusek

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, 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.

Activity

  1. added this to the 2.0 milestone on Jul 9, 2026
  2. added
    t-toolingIssues with this label are in the ownership of the tooling team.
    on Jul 9, 2026
  3. enriquealonso01 commented on Sep 22, 2026

    @enriquealonso01

    Opened #2248 — went with a narrowing (3.10 marker + import-time backport selection) rather than a hard removal, since requires-python = ">=3.10" and asyncio.timeout is 3.11+. Happy to switch to full removal if you'd rather drop 3.10.

  4. added a commit that references this issue on Oct 13, 2026
  5. added a commit that references this issue on Oct 13, 2026
    cbd7009
  6. vdusek commented on Oct 13, 2026

    @vdusek
    CollaboratorAuthor

    resolved by #2314

  7. self-assigned this
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions