unstale

pypi / asgiref

asgiref

What changed in asgiref 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-28.

4 breaking1 deprecations1 new APIs and options1 performance1 tooling6 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.9 on npm

asgiref 314 changes

Breaking changes 4

  • Local is now marked @final and raises TypeError if subclassed; subclassing was unsupported and could not work correctly with the specialised implementations.

    3.13.0release notes

  • Support for EOL Python 3.10 has been dropped.

    3.13.0release notes

  • Support for EOL Python 3.9 was dropped.

    3.12.0release notes

  • The tests extra no longer installs mypy.

    3.12.0release notes

Deprecations 1

  • asgiref.timeout.timeout is deprecated and will be removed in a future release; use asyncio.timeout() instead.

    3.13.0release notes

New APIs and options 1

  • An explicit executor can be provided to nest ThreadSensitiveContext and move thread-sensitive work away from the parent context's shared worker. The executor must run sequentially on a single thread, and the caller manages its lifecycle.

    3.13.0release notes

Performance 1

  • Local attribute access is now 2–3x faster because internal specialisations are selected by thread_critical instead of checking the mode on every access.

    3.13.0release notes

Tooling 1

  • A separate extra is available for type-checking the codebase.

    3.12.0release notes

Fixes and other changes 6

  • Support for Python 3.15 has been added.

    3.13.0release notes

  • Restored the previous internal code shape relied on by some APM services; this does not constitute an API stability promise.

    3.12.1release notes

  • The event loop is resolved when the callable is invoked rather than when AsyncToSync is instantiated, helping avoid deadlocks involving stopped event loops.

    3.12.0release notes

  • Fixed data leaking between unrelated sync threads when thread_inherit_context is enabled, restoring documented thread-local behavior.

    3.12.0release notes

  • Fixed failure on Python 3.14 by using asyncio.run() when no event loop exists.

    3.12.0release notes

  • Fixed an event loop deadlock when exiting ThreadSensitiveContext while its executor thread was still blocked waiting on the event loop.

    3.12.0release notes