Bump anyio from 4.9.0 to 4.12.0
Bumps anyio from 4.9.0 to 4.12.0.
Release notes
Sourced from anyio's releases.
4.12.0
- Added support for asyncio's task call graphs on Python 3.14 and later when using AnyIO's task groups (#1025)
- Added an asynchronous implementation of the
functoolsmodule (#1001)- Added support for
uvloop=Trueon Windows via the winloop implementation (#960; PR by@Vizonex)- Added support for use as a context manager to
anyio.lowlevel.RunVar(#1003)- Added
__all__declarations to public submodules (anyio.lowleveletc.) (#1009)- Added the ability to set the token count of a
CapacityLimiterto zero (#1019; requires Python 3.10 or later when using Trio)- Added parameters
case_sensitiveandrecurse_symlinksalong with support for path-like objects toanyio.Path.glob()andanyio.Path.rglob()(#1033; PR by@northisup)- Dropped
sniffioas a direct dependency and added theget_available_backends()function (#1021)- Fixed
Process.stdin.send()not raisingClosedResourceErrorandBrokenResourceErroron asyncio. Previously, a non-AnyIO exception was raised in such cases (#671; PR by@gschaffner)- Fixed
Process.stdin.send()not checkpointing before writing data on asyncio (#1002; PR by@gschaffner)- Fixed a race condition where cancelling a
FuturefromBlockingPortal.start_task_soon()would sometimes not cancel the async function (#1011; PR by@gschaffner)- Fixed the presence of the pytest plugin causing breakage with older versions of pytest (<= 6.1.2) (#1028; PR by
@saper)- Fixed a rarely occurring
RuntimeError: Set changed size during iterationwhile shutting down the process pool when using the asyncio backend (#985)4.11.0
- Added support for cancellation reasons (the
reasonparameter toCancelScope.cancel()) (#975)- Bumped the minimum version of Trio to v0.31.0
- Added the ability to enter the event loop from foreign (non-worker) threads by passing the return value of
anyio.lowlevel.current_token()toanyio.from_thread.run()andanyio.from_thread.run_sync()as thetokenkeyword argument (#256)- Added pytest option (
anyio_mode = "auto") to make the pytest plugin automatically handle all async tests (#971)- Added the
anyio.Condition.wait_for()method for feature parity with asyncio (#974)- Changed the default type argument of
anyio.abc.TaskStatusfromAnytoNone(#964)- Fixed TCP listener behavior to guarantee the same ephemeral port is used for all socket listeners when
local_port=0(#857; PR by@11kkwand@agronholm)- Fixed inconsistency between Trio and asyncio where a TCP stream that previously raised a
BrokenResourceErroronsend()would still raiseBrokenResourceErrorafter the stream was closed on asyncio, butClosedResourceErroron Trio. They now both raise aClosedResourceErrorin this scenario. (#671)4.10.0
- Added the
feed_data()method to theBufferedByteReceiveStreamclass, allowing users to inject data directly into the buffer- Added various class methods to wrap existing sockets as listeners or socket streams:
SocketListener.from_socket()SocketStream.from_socket()UNIXSocketStream.from_socket()UDPSocket.from_socket()ConnectedUDPSocket.from_socket()UNIXDatagramSocket.from_socket()ConnectedUNIXDatagramSocket.from_socket()- Added a hierarchy of connectable stream classes for transparently connecting to various remote or local endpoints for exchanging bytes or objects
- Added context manager mix-in classes (
anyio.ContextManagerMixinandanyio.AsyncContextManagerMixin) to help write classes that embed other context managers, particularly cancel scopes or task groups (#905; PR by@agronholmand@tapetersen)- Added the ability to specify the thread name in
start_blocking_portal()(#818; PR by@davidbrochart)- Added
anyio.notify_closingto allow wakinganyio.wait_readableandanyio.wait_writablebefore closing a socket. Among other things, this prevents an OSError on theProactorEventLoop. (#896; PR by@graingert)- Incorporated several documentation improvements from the EuroPython 2025 sprint (special thanks to the sprinters: Emmanuel Okedele, Jan Murre, Euxenia Miruna Goia and Christoffer Fjord)
- Added a documentation page explaining why one might want to use AnyIO's APIs instead of asyncio's
- Updated the
to_interpretersmodule to use the publicconcurrent.interpretersAPI on Python 3.14 or later- Fixed
anyio.Path.copy()andanyio.Path.copy_into()failing on Python 3.14.0a7- Fixed return annotation of
__aexit__on async context managers. CMs which can suppress exceptions should returnbool, orNoneotherwise. (#913; PR by@Enegg)- Fixed rollover boundary check in
SpooledTemporaryFileso that rollover only occurs when the buffer size exceedsmax_size(#915; PR by@11kkw)- Migrated testing and documentation dependencies from extras to dependency groups
- Fixed compatibility of
anyio.to_interpreterwith Python 3.14.0b2 (#926; PR by@hroncok)- Fixed
SyntaxWarningon Python 3.14 aboutreturninfinally(#816)- Fixed RunVar name conflicts. RunVar instances with the same name should not share storage (#880; PR by
@vimfu)- Renamed the
BrokenWorkerIntepreterexception toBrokenWorkerInterpreter. The old name is available as a deprecated alias. (#938; PR by@ayussh-verma)
... (truncated)
Commits
bc021b6Fixed the download-artifact settings to retain the expected behaviorc6000aaCorrected the format of the version in the changelog9d1bfe0Bumped up the version77f7ce2Fixed RuntimeError while shutting down the asyncio process pool (#1039)aecc666[pre-commit.ci] pre-commit autoupdate (#1036)e5569adBump actions/checkout from 5 to 6 in the github-actions group (#1037)dde3ab8Moved a changelog entry to its correct position250d4f1Restore compatibility with pytest<=6.1.2 (#1030)3708e22Fixed a typo in the documentation (#1035)9adbe08Add new params to Path.glob & Path.rglob introduced since 3.12 (#1034)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebasewill rebase this PR -
@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it -
@dependabot mergewill merge this PR after your CI passes on it -
@dependabot squash and mergewill squash and merge this PR after your CI passes on it -
@dependabot cancel mergewill cancel a previously requested merge and block automerging -
@dependabot reopenwill reopen this PR if it is closed -
@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency -
@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 54.66%. Comparing base (7e94024) to head (778247b).
:white_check_mark: All tests successful. No failed tests found.
Additional details and impacted files
@@ Coverage Diff @@
## main #1598 +/- ##
=======================================
Coverage 54.66% 54.66%
=======================================
Files 335 335
Lines 27358 27358
=======================================
Hits 14956 14956
Misses 12402 12402
| Flag | Coverage Δ | |
|---|---|---|
| functionaltests | 0.00% <ø> (ø) |
|
| unittests | 54.66% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.