AnyIO is a high level asynchronous networking and concurrency library for Python that runs on top of either Trio or asyncio. It provides Trio-like structured concurrency (task groups) plus networking primitives for TCP, UDP, and UNIX sockets, with an API that lets code run unmodified on either backend.
Project status
- Actively maintained: The source shows very recent activity (last upstream push 2026-05-17) and multiple versioned updates over 2025-2026 (4.9.0 through 4.13.0), indicating ongoing development rather than maintenance-only mode.
- Update cadence: Major updates appear roughly every 2 to 3 months in the latest window (4.12.0 on 2025-11-30, 4.12.1 on 2026-01-06, 4.13.0 on 2026-03-24), plus a minor patch update shortly after the prior minor (4.12.1 after 4.12.0).
AI summary generated 2 weeks ago
Recent updates
4.13.0
2 months agoAnyIO 4.13.0 updates runtime behavior around cancellation and exception groups, improves error chaining for asyncio SocketStream, and fixes a shutdown bug in the process pool. It also drops Python 3.9 support and includes a few API/typing adjustments such as adding a ttl parameter to the anyio-wrapped lru_cache and improving Path compatibility with Python 3.15.
BreakingFeatures4.12.1
4 months agoAnyIO 4.12.1 updates error behavior so code paths that previously raised the internal NoCurrentAsyncBackend exception now raise the public NoEventLoopError, and it fixes anyio.functools.lru_cache so it works correctly with instance methods. In addition to the documented changes, the implementation of BlockingPortal has been refactored so backends no longer expose a create_blocking_portal API.
Breaking4.12.0
6 months agoAnyIO 4.12.0 adds several new integrations and helper utilities, including asyncio task call graph support (Python 3.14+), an async implementation of functools, improved Windows uvloop compatibility, and new Path.glob/rglob parameters. It also refactors backend detection to reduce direct reliance on sniffio, and improves asyncio Process stdin send behavior with better error mapping and cancellation checkpointing.
Features4.11.0
8 months agoanyio 4.11.0 adds cancellation reasons to CancelScope.cancel, expands from_thread helpers to support entering the event loop from non-worker threads via an event loop token, and introduces Condition.wait_for. It also includes several fixes, including TCP listener behavior and consistent ClosedResourceError behavior across Trio and asyncio.
BreakingFeatures4.10.0
10 months agoAnyIO 4.10.0 adds new socket stream/listener helpers, connectable stream abstractions, context manager mixins, and a new anyio.notify_closing utility. It also includes multiple bug fixes, notably around asyncio/trio socket waiting behavior and CapacityLimiter edge cases.
Features4.9.0
3/17/2025AnyIO 4.9.0 adds async temporary file handling and extends subprocess support with a new `stdin` parameter for `anyio.run_process()`. It also includes multiple bug fixes around exception chaining and traceback formatting, socket address resolution behavior when IPv6 is disabled, and Python version specific filesystem iteration behavior.
Features4.8.0
1/5/2025Release 4.8.0 adds experimental subinterpreter support (Python 3.13+), expands anyio.Path with copy/move methods on Python 3.14+, and adjusts asyncio TaskGroup scheduling to preserve Trio-like semantics. It also includes performance tuning for the selector-thread waker socket pair and multiple typing fixes for context manager __exit__ return annotations.
Features4.7.0
12/5/2024anyio 4.7.0 introduces new cross-backend socket waiting APIs, wait_readable() and wait_writable(), and improves asyncio cancellation behavior. It also updates EventAdapter so calling set() before binding an async backend works correctly, and includes several asyncio-specific bug fixes. The code changes also include some additional internal behavior modifications not described in the release notes.
Features4.6.2
10/13/2024Release 4.6.2 fixes a regression in the anyio pytest plugin that prevented parametrized async fixtures from working correctly. The code change adjusts how the plugin populates the `request` argument when invoking user async fixtures, and a new test verifies parametrized fixture support.
4.6.1
10/13/2024Release 4.6.1 rolls up changes from v4.5.1 and v4.6.0 and includes a targeted fix for TaskGroup and CancelScope producing cyclic references in tracebacks when raising exceptions. The code changes included in this release appear to go beyond the described traceback fix, including updates to CancelScope exception handling logic, Python-version-dependent Path methods, and pytest plugin fixture plumbing.
Breaking