* Dropped support for Python 3.8 (as #698 cannot be resolved
without cancel message support)
* Fixed 100% CPU use on asyncio while waiting for an exiting task
group to finish while said task group is within a cancelled
cancel scope (#695)
* Fixed cancel scopes on asyncio not propagating CancelledError
on exit when the enclosing cancel scope has been effectively
cancelled (#698)
* Fixed asyncio task groups not yielding control to the event
loop at exit if there were no child tasks to wait on
* Fixed inconsistent task uncancellation with asyncio cancel
scopes belonging to a task group when said task group has child
tasks running
- update to 4.5.0:
* Improved the performance of anyio.Lock and anyio.Semaphore on
asyncio (even up to 50 %)
* Added the fast_acquire parameter to anyio.Lock and
anyio.Semaphore to further boost performance at the expense of
safety (acquire() will not yield control back if there is no
contention)
* Added support for the from_uri(), full_match(), parser
methods/properties in anyio.Path, newly added in Python 3.13
(#737)
* Added support for more keyword arguments for run_process() and
open_process(): startupinfo, creationflags, pass_fds, user,
group, extra_groups and umask (#742)
* Improved the type annotations and support for PathLike in
run_process() and open_process() to allow for path-like
arguments, just like subprocess.Popen
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-anyio?expand=0&rev=44
- update to 4.4.0:
* Added the BlockingPortalProvider class to aid with
constructing synchronous counterparts to asynchronous
interfaces that would otherwise require multiple blocking
portals
* Added __slots__ to AsyncResource so that child classes can
use __slots__
* Added the TaskInfo.has_pending_cancellation() method
* Fixed erroneous RuntimeError: called 'started' twice on the
same task status when cancelling a task in a TaskGroup
created with the start() method before the first checkpoint
is reached after calling task_status.started()
* Fixed two bugs with TaskGroup.start() on asyncio: Fixed
erroneous RuntimeError: called 'started' twice on the same
task status when cancelling a task in a TaskGroup created
with the start() method before the first checkpoint is
reached after calling task_status.started() (#706; PR by
Dominik Schwabe) Fixed the entire task group being cancelled
if a TaskGroup.start() call gets cancelled (#685, #710)
* Fixed erroneous RuntimeError: called 'started' twice on the
same task status when cancelling a task in a TaskGroup
created with the start() method before the first checkpoint
is reached after calling task_status.started()
* Fixed the entire task group being cancelled if a
TaskGroup.start() call gets cancelled
* Fixed a race condition that caused crashes when multiple
event loops of the same backend were running in separate
threads and simultaneously attempted to use AnyIO for their
first time
* Fixed cancellation delivery on asyncio incrementing the wrong
OBS-URL: https://build.opensuse.org/request/show/1193842
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-anyio?expand=0&rev=21
* Added the BlockingPortalProvider class to aid with
constructing synchronous counterparts to asynchronous
interfaces that would otherwise require multiple blocking
portals
* Added __slots__ to AsyncResource so that child classes can
use __slots__
* Added the TaskInfo.has_pending_cancellation() method
* Fixed erroneous RuntimeError: called 'started' twice on the
same task status when cancelling a task in a TaskGroup
created with the start() method before the first checkpoint
is reached after calling task_status.started()
* Fixed two bugs with TaskGroup.start() on asyncio: Fixed
erroneous RuntimeError: called 'started' twice on the same
task status when cancelling a task in a TaskGroup created
with the start() method before the first checkpoint is
reached after calling task_status.started() (#706; PR by
Dominik Schwabe) Fixed the entire task group being cancelled
if a TaskGroup.start() call gets cancelled (#685, #710)
* Fixed erroneous RuntimeError: called 'started' twice on the
same task status when cancelling a task in a TaskGroup
created with the start() method before the first checkpoint
is reached after calling task_status.started()
* Fixed the entire task group being cancelled if a
TaskGroup.start() call gets cancelled
* Fixed a race condition that caused crashes when multiple
event loops of the same backend were running in separate
threads and simultaneously attempted to use AnyIO for their
first time
* Fixed cancellation delivery on asyncio incrementing the wrong
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-anyio?expand=0&rev=42
- Update to 4.3.0:
* Added support for the Python 3.12 ``walk_up`` keyword argument in
``anyio.Path.relative_to()``
* Fixed passing ``total_tokens`` to ``anyio.CapacityLimiter()`` as a
keyword argument not working on the ``trio`` backend
* Fixed ``Process.aclose()`` not performing the minimum level of
necessary cleanup when cancelled
* Fixed ``Process.stdin.aclose()``, ``Process.stdout.aclose()``, and
``Process.stderr.aclose()``
- Add exceptiongroup to {Build,}Requires.
OBS-URL: https://build.opensuse.org/request/show/1157062
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-anyio?expand=0&rev=20
* Added support for the Python 3.12 ``walk_up`` keyword argument in
``anyio.Path.relative_to()``
* Fixed passing ``total_tokens`` to ``anyio.CapacityLimiter()`` as a
keyword argument not working on the ``trio`` backend
* Fixed ``Process.aclose()`` not performing the minimum level of
necessary cleanup when cancelled
* Fixed ``Process.stdin.aclose()``, ``Process.stdout.aclose()``, and
``Process.stderr.aclose()``
- Add exceptiongroup to {Build,}Requires.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-anyio?expand=0&rev=39
- update to 4.2.0:
* Add support for byte-based paths in connect_unix,
create_unix_listeners, create_unix_datagram_socket, and
create_connected_unix_datagram_socket. (PR by Lura Skye)
* Enabled the Event and CapacityLimiter classes to be
instantiated outside an event loop thread
* Broadly improved/fixed the type annotations. Among other
things, many functions and methods that take variadic
positional arguments now make use of PEP 646 TypeVarTuple to
allow the positional arguments to be validated by static type
checkers. These changes affected numerous methods and
functions, including: * anyio.run() * TaskGroup.start_soon()
* anyio.from_thread.run() * anyio.from_thread.run_sync() *
anyio.to_thread.run_sync() * anyio.to_process.run_sync() *
BlockingPortal.call() * BlockingPortal.start_task_soon() *
BlockingPortal.start_task() (also resolves#560)
* Fixed various type annotations of anyio.Path to match
Typeshed: * anyio.Path.__lt__() * anyio.Path.__le__() *
anyio.Path.__gt__() * anyio.Path.__ge__() *
anyio.Path.__truediv__() * anyio.Path.__rtruediv__() *
anyio.Path.hardlink_to() * anyio.Path.samefile() *
anyio.Path.symlink_to() * anyio.Path.with_segments() (PR by
Ganden Schaffner)
* Fixed adjusting the total number of tokens in a
CapacityLimiter on asyncio failing to wake up tasks waiting
to acquire the limiter in certain edge cases (fixed with help
from Egor Blagov)
* Fixed loop_factory and use_uvloop options not being used on
the asyncio backend
* Fixed cancellation propagating on asyncio from a task group
OBS-URL: https://build.opensuse.org/request/show/1136274
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-anyio?expand=0&rev=19
* Add support for byte-based paths in connect_unix,
create_unix_listeners, create_unix_datagram_socket, and
create_connected_unix_datagram_socket. (PR by Lura Skye)
* Enabled the Event and CapacityLimiter classes to be
instantiated outside an event loop thread
* Broadly improved/fixed the type annotations. Among other
things, many functions and methods that take variadic
positional arguments now make use of PEP 646 TypeVarTuple to
allow the positional arguments to be validated by static type
checkers. These changes affected numerous methods and
functions, including: * anyio.run() * TaskGroup.start_soon()
* anyio.from_thread.run() * anyio.from_thread.run_sync() *
anyio.to_thread.run_sync() * anyio.to_process.run_sync() *
BlockingPortal.call() * BlockingPortal.start_task_soon() *
BlockingPortal.start_task() (also resolves#560)
* Fixed various type annotations of anyio.Path to match
Typeshed: * anyio.Path.__lt__() * anyio.Path.__le__() *
anyio.Path.__gt__() * anyio.Path.__ge__() *
anyio.Path.__truediv__() * anyio.Path.__rtruediv__() *
anyio.Path.hardlink_to() * anyio.Path.samefile() *
anyio.Path.symlink_to() * anyio.Path.with_segments() (PR by
Ganden Schaffner)
* Fixed adjusting the total number of tokens in a
CapacityLimiter on asyncio failing to wake up tasks waiting
to acquire the limiter in certain edge cases (fixed with help
from Egor Blagov)
* Fixed loop_factory and use_uvloop options not being used on
the asyncio backend
* Fixed cancellation propagating on asyncio from a task group
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-anyio?expand=0&rev=37
* Adapted to API changes made in Trio v0.23
* Removed a checkpoint when exiting a task group
* Renamed the ``cancellable`` argument in
``anyio.to_thread.run_sync()`` to
* ``abandon_on_cancel`` (and deprecated the old parameter name)
* Added support for voluntary thread cancellation via
* ``anyio.from_thread.check_cancelled()``
* Bumped minimum version of trio to v0.23
* Exposed the ``ResourceGuard`` class in the public API
* Fixed ``RuntimeError: Runner is closed`` when running higher-
scoped async generator fixtures in some cases
* Fixed discrepancy between ``asyncio`` and ``trio`` where
reraising a cancellation exception in an ``except*`` block
would incorrectly bubble out of its cancel scope
* Any exceptions raising out of a task groups are now nested
inside an ``ExceptionGroup`` (or ``BaseExceptionGroup`` if one
or more ``BaseException`` were included)
* Fixed task group not raising a cancellation exception on
asyncio at exit if no child tasks were spawned and an outer
cancellation scope had been cancelled before
* Ensured that exiting a ``TaskGroup`` always hits a yield
point, regardless of whether there are running child tasks to
be waited on
* On asyncio, cancel scopes will defer cancelling tasks that
are scheduled to resume with a finished future
* On asyncio and Python 3.9/3.10, cancel scopes now only
suppress cancellation exceptions if the cancel message matches
the scope
* Task groups on all backends now raise a single cancellation
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-anyio?expand=0&rev=36
- update to 3.7.1:
* Fixed sending large buffers via UNIX stream sockets on
asyncio
* Fixed several minor documentation issues (broken links to
classes, missing classes or attributes)
* Dropped support for Python 3.6
* Improved type annotations:
* Several functions and methods that were previously annotated
as accepting ``Coroutine[Any, Any, Any]`` as the return type
of the callable have been amended to accept ``Awaitable[Any]``
instead, to allow a slightly broader set of coroutine-like
inputs, like ``async_generator_asend`` objects returned from
the ``asend()`` method of async generators, and to match
the ``trio`` annotations:
* ``anyio.run()``
* ``anyio.from_thread.run()``
* ``TaskGroup.start_soon()``
* ``TaskGroup.start()``
* ``BlockingPortal.call()``
* ``BlockingPortal.start_task_soon()``
* ``BlockingPortal.start_task()``
* Changed ``TLSAttribute.shared_ciphers`` to match the
documented semantics of ``SSLSocket.shared_ciphers``
of always returning ``None`` for client-side streams
* Fixed ``CapacityLimiter`` on the asyncio backend to order
waiting tasks in the FIFO order (instead of LIFO)
* Fixed ``CancelScope.cancel()`` not working on asyncio if
called before entering the scope
* Fixed ``open_signal_receiver()`` inconsistently yielding
integers instead of ``signal.Signals`` instances on the
OBS-URL: https://build.opensuse.org/request/show/1126958
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-anyio?expand=0&rev=18
* Fixed sending large buffers via UNIX stream sockets on
asyncio
* Fixed several minor documentation issues (broken links to
classes, missing classes or attributes)
* Dropped support for Python 3.6
* Improved type annotations:
* Several functions and methods that were previously annotated
as accepting ``Coroutine[Any, Any, Any]`` as the return type
of the callable have been amended to accept ``Awaitable[Any]``
instead, to allow a slightly broader set of coroutine-like
inputs, like ``async_generator_asend`` objects returned from
the ``asend()`` method of async generators, and to match
the ``trio`` annotations:
* ``anyio.run()``
* ``anyio.from_thread.run()``
* ``TaskGroup.start_soon()``
* ``TaskGroup.start()``
* ``BlockingPortal.call()``
* ``BlockingPortal.start_task_soon()``
* ``BlockingPortal.start_task()``
* Changed ``TLSAttribute.shared_ciphers`` to match the
documented semantics of ``SSLSocket.shared_ciphers``
of always returning ``None`` for client-side streams
* Fixed ``CapacityLimiter`` on the asyncio backend to order
waiting tasks in the FIFO order (instead of LIFO)
* Fixed ``CancelScope.cancel()`` not working on asyncio if
called before entering the scope
* Fixed ``open_signal_receiver()`` inconsistently yielding
integers instead of ``signal.Signals`` instances on the
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-anyio?expand=0&rev=31
- update to 3.6.2:
- Pinned Trio to < 0.22 to avoid incompatibility with AnyIO's ``ExceptionGroup`` class
causing ``AttributeError: 'NonBaseMultiError' object has no attribute '_exceptions'``
(AnyIO 4 is unaffected)
- Fixed exception handler in the asyncio test runner not properly handling a context
that does not contain the ``exception`` key
- Fixed ``TypeError`` in ``get_current_task()`` on asyncio when using a custom ``Task`` factory
- Updated type annotations on ``run_process()`` and ``open_process()``:
* ``command`` now accepts accepts bytes and sequences of bytes
* ``stdin``, ``stdout`` and ``stderr`` now accept file-like objects
- Changed the pytest plugin to run both the setup and teardown phases of asynchronous
generator fixtures within a single task to enable use cases such as cancel scopes and
task groups where a context manager straddles the ``yield``
- drop anyio-pytest7.patch (upstream)
OBS-URL: https://build.opensuse.org/request/show/1037186
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-anyio?expand=0&rev=11
- Pinned Trio to < 0.22 to avoid incompatibility with AnyIO's ``ExceptionGroup`` class
causing ``AttributeError: 'NonBaseMultiError' object has no attribute '_exceptions'``
(AnyIO 4 is unaffected)
- Fixed exception handler in the asyncio test runner not properly handling a context
that does not contain the ``exception`` key
- Fixed ``TypeError`` in ``get_current_task()`` on asyncio when using a custom ``Task`` factory
- Updated type annotations on ``run_process()`` and ``open_process()``:
* ``command`` now accepts accepts bytes and sequences of bytes
* ``stdin``, ``stdout`` and ``stderr`` now accept file-like objects
- Changed the pytest plugin to run both the setup and teardown phases of asynchronous
generator fixtures within a single task to enable use cases such as cancel scopes and
task groups where a context manager straddles the ``yield``
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-anyio?expand=0&rev=16
- update to 3.5.0:
- Added ``start_new_session`` keyword argument to ``run_process()`` and ``open_process()``
- Fixed deadlock in synchronization primitives on asyncio which can happen if a task acquiring a
primitive is hit with a native (not AnyIO) cancellation with just the right timing, leaving the
next acquiring task waiting forever
- Added workaround for bpo-46313_ to enable compatibility with OpenSSL 3.0
OBS-URL: https://build.opensuse.org/request/show/946668
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-anyio?expand=0&rev=8
- Added ``start_new_session`` keyword argument to ``run_process()`` and ``open_process()``
- Fixed deadlock in synchronization primitives on asyncio which can happen if a task acquiring a
primitive is hit with a native (not AnyIO) cancellation with just the right timing, leaving the
next acquiring task waiting forever
- Added workaround for bpo-46313_ to enable compatibility with OpenSSL 3.0
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-anyio?expand=0&rev=11
- update to 3.4.0:
* Added context propagation to/from worker threads in ``to_thread.run_sync()``,
``from_thread.run()`` and ``from_thread.run_sync()``
* Fixed race condition in ``Lock`` and ``Semaphore`` classes when a task waiting on ``acquire()``
is cancelled while another task is waiting to acquire the same primitive
* Fixed async context manager's ``__aexit__()`` method not being called in
``BlockingPortal.wrap_async_context_manager()`` if the host task is cancelled
* Fixed worker threads being marked as being event loop threads in sniffio
* Fixed task parent ID not getting set to the correct value on asyncio
* Enabled the test suite to run without IPv6 support, trio or pytest plugin autoloading
OBS-URL: https://build.opensuse.org/request/show/934534
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-anyio?expand=0&rev=7
* Added context propagation to/from worker threads in ``to_thread.run_sync()``,
``from_thread.run()`` and ``from_thread.run_sync()``
* Fixed race condition in ``Lock`` and ``Semaphore`` classes when a task waiting on ``acquire()``
is cancelled while another task is waiting to acquire the same primitive
* Fixed async context manager's ``__aexit__()`` method not being called in
``BlockingPortal.wrap_async_context_manager()`` if the host task is cancelled
* Fixed worker threads being marked as being event loop threads in sniffio
* Fixed task parent ID not getting set to the correct value on asyncio
* Enabled the test suite to run without IPv6 support, trio or pytest plugin autoloading
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-anyio?expand=0&rev=10
- update to 3.3.3:
* Fixed UNIX socket listener not setting accepted sockets to non-blocking
mode on asyncio
* Changed unconnected UDP sockets to be always bound to a local port (on
"any" interface) to avoid errors on asyncio + Windows
* Fixed cancellation problem on asyncio where level-triggered cancellation
for **all** parent cancel scopes would not resume after exiting a
shielded nested scope
OBS-URL: https://build.opensuse.org/request/show/925754
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-anyio?expand=0&rev=5
* Fixed UNIX socket listener not setting accepted sockets to non-blocking
mode on asyncio
* Changed unconnected UDP sockets to be always bound to a local port (on
"any" interface) to avoid errors on asyncio + Windows
* Fixed cancellation problem on asyncio where level-triggered cancellation
for **all** parent cancel scopes would not resume after exiting a
shielded nested scope
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-anyio?expand=0&rev=8
- Update to v3.3.1
* Added missing documentation for the ExceptionGroup.exceptions
attribute
* Changed the asyncio test runner not to use uvloop by default
(to match the behavior of anyio.run())
* Fixed RuntimeError on asyncio when a CancelledError is raised
from a task spawned through a BlockingPortal (#357)
* Fixed asyncio warning about a Future with an exception that
was never retrieved which happened when a socket was already
written to but the peer abruptly closed the connection
- Release 3.3.0
* Added asynchronous Path class
* Added the wrap_file() function for wrapping existing files as
asynchronous file objects
* Relaxed the type of the path initializer argument to
FileReadStream and FileWriteStream so they accept any
path-like object (including the new asynchronous Path class)
* Dropped unnecessary dependency on the async_generator library
* Changed the generics in AsyncFile so that the methods
correctly return either str or bytes based on the argument to
open_file()
* Fixed an asyncio bug where under certain circumstances, a
stopping worker thread would still accept new assignments,
leading to a hang
- Release 3.2.1
* Fixed idle thread pruning on asyncio sometimes causing an
expired worker thread to be assigned a task
- Release 3.2.0
* Added Python 3.10 compatibility
* Added the ability to close memory object streams synchronously
OBS-URL: https://build.opensuse.org/request/show/919874
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-anyio?expand=0&rev=7
- Update to 3.1.0:
* Added env and cwd keyword arguments to run_process() and
open_process.
* Added support for mutation of CancelScope.shield
(PR by John Belmonte)
* Added the sleep_forever() and sleep_until() functions
* Changed asyncio task groups so that if the host and child tasks
have only raised CancelledErrors, just one CancelledError will
now be raised instead of an ExceptionGroup, allowing asyncio to
ignore it when it propagates out of the task
* Changed task names to be converted to str early on asyncio
(PR by Thomas Grainger)
* Fixed sniffio._impl.AsyncLibraryNotFoundError: unknown async
library, or not in async context on asyncio and Python 3.6 when
to_thread.run_sync() is used from loop.run_until_complete()
* Fixed odd ExceptionGroup: 0 exceptions were raised in the task
group appearing under certain circumstances on asyncio
* Fixed wait_all_tasks_blocked() returning prematurely on asyncio
when a previously blocked task is cancelled
(PR by Thomas Grainger)
* Fixed declared return type of TaskGroup.start() (it was
declared as None, but anything can be returned from it)
* Fixed TextStream.extra_attributes raising AttributeError
(PR by Thomas Grainger)
* Fixed await maybe_async(current_task()) returning None
(PR by Thomas Grainger)
* Fixed: pickle.dumps(current_task()) now correctly raises
TypeError instead of pickling to None (PR by Thomas Grainger)
* Fixed return type annotation of Event.wait() (bool → None)
(PR by Thomas Grainger)
OBS-URL: https://build.opensuse.org/request/show/897158
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-anyio?expand=0&rev=5