Update dependency anyio to v4.14.0#6
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
ac04b7d to
c8e50ff
Compare
c8e50ff to
574b0da
Compare
574b0da to
51edf76
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==4.5.2→==4.14.0Release Notes
agronholm/anyio (anyio)
v4.14.0Compare Source
Added support for Python 3.15
Added an asynchronous implementation of the
itertoolsmodule (#998; PR by @11kkw)Added the
local_portparameter toconnect_tcp()to allow binding to a specific local port before connecting (#1067; PR by @nullwiz)Added support for custom capacity limiters in async path and file I/O functions and classes
Added the
create_task()task group method for easier asyncio migration (returns aTaskHandle) (#1098)Changed
TaskGroup.start_soon()to return aTaskHandleAdded an option for
TaskGroup.start()to return aTaskHandle(which then contains the start value in thestart_valueproperty)Added the
cancel()convenience method toTaskGroupas a shortcut for cancelling the task group's cancel scopeImproved the error message when a known backend is not installed to suggest the install command (#1115; PR by @EmmanuelNiyonshuti)
Improved
anyio.Pathto preserve subclass types by returningSelfin methods that return path objects (#1130; PR by @EmmanuelNiyonshuti)Changed the parameter type annotation in
anyio.Path.write_bytes()to accept anyReadableBuffer, thus allowing it to acceptbytearrayandmemoryviewto matchpathlib.Path.write_bytes()(#1135; PR by @SAY-5)Changed several type annotations to only accept callables returning coroutine-like objects instead of arbitrary awaitables:
TaskGroup.start_soon()TaskGroup.start()anyio.from_thread.run()This reverts an earlier change from v3.7.0 which was made in error. (#1153)
Changed
anyio.runto support callables returning arbitrary awaitables at runtime on all backends. Previously, this only worked on asyncio (#1171; PR by @gschaffner)Changed several classes (and their subclasses) to have
__slots__(with__weakref__):anyio.CancelScopeanyio.CapacityLimiteranyio.Conditionanyio.Eventanyio.Lockanyio.ResourceGuardanyio.SemaphoreFixed cancellation exception escaping a cancel scope when triggered via
check_cancelled()in a worker thread (#1113)Fixed
TaskGroupraisingAttributeErrorinstead of a clear error when entered more than once (#1109; PR by @bahtya)Fixed lost type information when passing arguments to
lru_cache(#1104; PR by @Graeme22)Fixed test resumption after
KeyboardInterruptin async generator fixtures on the asyncio backend (#1060; PR by @EmmanuelNiyonshuti)Fixed import of
__main__into_processworkers when entrypoint script doesn't end in.py, such as when usingconsole_scriptentrypoints. (#1027; PR by @tapetersen)Fixed
SocketListener.from_socket()returning a TCP listener forAF_UNIXlistening sockets, causingaccept()to fail withENOTSUP(#1132; PR by @kudato)Fixed
UDPSocket.aclose()andConnectedUDPSocket.aclose()on asyncio returning before the underlying socket FD was actually released (#1147; PR by @matias-arrelid)Fixed trio backend test runner hanging indefinitely instead of raising an error when dynamically accessing an async fixture via
request.getfixturevalue(#1148; PR by @EmmanuelNiyonshuti)Fixed cancelling tasks started through a
BlockingPortalafter the portal has been stopped (#1013; PR by @puneetdixit200)Fixed
backend_optionsbeing ignored when running the Trio backend viaanyio.run(); the options are now passed as keyword arguments totrio.run()again, as documented (a regression from AnyIO 3) (#1161; PR by @Zac-HD)Fixed asyncio
LockandSemaphoredeadlocks caused by cancelled waiters left queued during release (#1145; PR by @rasmusfaber, @x42005e1f and @agronholm)v4.13.0Compare Source
ttlparameter to theanyio.functools.lru_cachewrapper (#1073; PR by @Graeme22)IO[bytes]instead of justBinaryIO(#1078)anyio.Pathnot being compatible with Python 3.15 due to the removal ofpathlib.Path.is_reserved()and the addition ofpathlib.Path.__vfspath__()(#1061; PR by @veeceey)BrokenResourceErrorraised by the asyncioSocketStreamnot having the original exception as its cause (#1055; PR by @veeceey)TypeErrorraised when using "func" as a parameter name inpytest.mark.parametrizewhen using the pytest plugin (#1068; PR by @JohnnyDeuss)anyiomarker added programmatically viapytest_collection_modifyitems(#422; PR by @chbndrhnns)CancelScopeon asyncio when they are contained in an exception group alongside non-cancellation exceptions (#1091; PR by @gschaffner)Condition.wait()not passing on a notification when the task is cancelled but already received a notificationv4.12.1Compare Source
NoCurrentAsyncBackendexception (since v4.12.0) to instead raise the publicNoEventLoopErrorexception (#1048)anyio.functools.lru_cachenot working with instance methods (#1042)v4.12.0Compare Source
functoolsmodule (#1001)uvloop=Trueon Windows via the winloop implementation (#960; PR by @Vizonex)anyio.lowlevel.RunVar(#1003)__all__declarations to public submodules (anyio.lowleveletc.) (#1009)CapacityLimiterto zero (#1019; requires Python 3.10 or later when using Trio)case_sensitiveandrecurse_symlinksalong with support for path-like objects toanyio.Path.glob()andanyio.Path.rglob()(#1033; PR by @northisup)sniffioas a direct dependency and added theget_available_backends()function (#1021)Process.stdin.send()not raisingClosedResourceErrorandBrokenResourceErroron asyncio. Previously, a non-AnyIO exception was raised in such cases (#671; PR by @gschaffner)Process.stdin.send()not checkpointing before writing data on asyncio (#1002; PR by @gschaffner)FuturefromBlockingPortal.start_task_soon()would sometimes not cancel the async function (#1011; PR by @gschaffner)RuntimeError: Set changed size during iterationwhile shutting down the process pool when using the asyncio backend (#985)v4.11.0Compare Source
reasonparameter toCancelScope.cancel()) (#975)anyio.lowlevel.current_token()toanyio.from_thread.run()andanyio.from_thread.run_sync()as thetokenkeyword argument (#256)anyio_mode = "auto") to make the pytest plugin automatically handle all async tests (#971)anyio.Condition.wait_for()method for feature parity with asyncio (#974)anyio.abc.TaskStatusfromAnytoNone(#964)local_port=0(#857; PR by @11kkw and @agronholm)BrokenResourceErroronsend()would still raiseBrokenResourceErrorafter the stream was closed on asyncio, butClosedResourceErroron Trio. They now both raise aClosedResourceErrorin this scenario. (#671)v4.10.0Compare Source
feed_data()method to theBufferedByteReceiveStreamclass, allowing users to inject data directly into the bufferSocketListener.from_socket()SocketStream.from_socket()UNIXSocketStream.from_socket()UDPSocket.from_socket()ConnectedUDPSocket.from_socket()UNIXDatagramSocket.from_socket()ConnectedUNIXDatagramSocket.from_socket()anyio.ContextManagerMixinandanyio.AsyncContextManagerMixin) to help write classes that embed other context managers, particularly cancel scopes or task groups (#905; PR by @agronholm and @tapetersen)start_blocking_portal()(#818; PR by @davidbrochart)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)to_interpretersmodule to use the publicconcurrent.interpretersAPI on Python 3.14 or lateranyio.Path.copy()andanyio.Path.copy_into()failing on Python 3.14.0a7__aexit__on async context managers. CMs which can suppress exceptions should returnbool, orNoneotherwise. (#913; PR by @Enegg)SpooledTemporaryFileso that rollover only occurs when the buffer size exceedsmax_size(#915; PR by @11kkw)anyio.to_interpreterwith Python 3.14.0b2 (#926; PR by @hroncok)SyntaxWarningon Python 3.14 aboutreturninfinally(#816)BrokenWorkerIntepreterexception toBrokenWorkerInterpreter. The old name is available as a deprecated alias. (#938; PR by @ayussh-verma)CapacityLimiteron asyncio where a task, waiting to acquire a limiter gets cancelled and is subsequently granted a token from the limiter, but before the cancellation is delivered, and then fails to notify the next waiting task (#947)v4.9.0Compare Source
pytestplugin:free_tcp_port_factory: session scoped fixture returning a callable that generates unused TCP port numbersfree_udp_port_factory: session scoped fixture returning a callable that generates unused UDP port numbersfree_tcp_port: function scoped fixture that invokes thefree_tcp_port_factoryfixture to generate a free TCP port numberfree_udp_port: function scoped fixture that invokes thefree_udp_port_factoryfixture to generate a free UDP port numberstdinargument toanyio.run_process()akin to whatanyio.open_process(),asyncio.create_subprocess(),trio.run_process(), andsubprocess.run()already accept (PR by @jmehnle)infoproperty toanyio.Pathon Python 3.14anyio.getaddrinfo()to ignore (invalid) IPv6 name resolution results when IPv6 support is disabled in PythonEndOfStreamraised fromMemoryObjectReceiveStream.receive()to leave out theAttributeErrorfrom the exception chain which was merely an implementation detail and caused some confusionTaskGroupnesting on asyncio due to exception chaining when raisingExceptionGroupsinTaskGroup.__aexit__(#863; PR by @tapetersen)anyio.Path.iterdir()making a blocking call in Python 3.13 (#873; PR by @cbornet and @agronholm)connect_tcp()producing cyclic references in tracebacks when raising exceptions (#809; PR by @graingert)anyio.to_thread.run_sync()needlessly holding on to references of the context, function, arguments and others until the next work item on asyncio (PR by @Wankupi)v4.8.0Compare Source
copy(),copy_into(),move()andmove_into()methods inanyio.Path, available in Python 3.14TaskGroupon asyncio to always spawn tasks non-eagerly, even if using a task factory created viaasyncio.create_eager_task_factory(), to preserve expected Trio-like task scheduling semantics (PR by @agronholm and @graingert)SO_RCVBUF,SO_SNDBUFandTCP_NODELAYon the selector thread waker socket pair (this should improve the performance ofwait_readable()andwait_writable()when using theProactorEventLoop) (#836; PR by @graingert)AssertionErrorwhen usingnest-asyncio(#840)__exit__method (#847; PR by @Enegg)v4.7.0Compare Source
TaskGroupto work with asyncio's eager task factories (#764)wait_readable()andwait_writable()functions which will accept an object with a.fileno()method or an integer handle, and deprecated their now obsolete versions (wait_socket_readable()andwait_socket_writable()) (PR by @davidbrochart)EventAdapter(anEventwith no bound async backend) to allowset()to work even before an async backend is bound to it (#819)wait_readable()andwait_writable()onProactorEventLoop(used on asyncio + Windows by default)ValueErrorin the context of DNS failures (#815; PR by @graingert)readinto()andreadinto1()methods in theanyio.AsyncFileclass (#825)TaskInfo.has_pending_cancellation()on asyncio returning false positives in cleanup code on Python >= 3.11 (#832; PR by @gschaffner)asyncio.Task.uncancelwhen propagating aCancelledErroron exit to a cancelled parent scope (#790; PR by @gschaffner)v4.6.2.post1Compare Source
v4.6.2Compare Source
v4.6.1Compare Source
This release contains all the changes from both v4.5.1 and v4.6.0, plus:
v4.6.0Compare Source
CancelledErroron exit when the enclosing cancel scope has been effectively cancelled (#698)Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.