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:
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 (#643)
Fixed cancellation propagating on asyncio from a task group to child tasks if the task hosting the task group is in a shielded cancel scope (#642)
4.1.0
Adapted to API changes made in Trio v0.23:
Call trio.to_thread.run_sync() using the abandon_on_cancel keyword argument instead of cancellable
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)
Bumped minimum version of Trio to v0.23
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 (#627)
Fixed RuntimeError: Runner is closed when running higher-scoped async generator fixtures in some cases (#619)
This library adheres to Semantic Versioning 2.0 <http://semver.org/>_.
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:
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 ([#643](https://github.com/agronholm/anyio/issues/643) <https://github.com/agronholm/anyio/issues/643>_)
Fixed cancellation propagating on asyncio from a task group to child tasks if the task
hosting the task group is in a shielded cancel scope
([#642](https://github.com/agronholm/anyio/issues/642) <https://github.com/agronholm/anyio/issues/642>_)
You can trigger a rebase of this PR by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will 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 version` will 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 dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
Bumps anyio from 3.7.1 to 4.2.0.
Release notes
Sourced from anyio's releases.
... (truncated)
Changelog
Sourced from anyio's changelog.
... (truncated)
Commits
f757314
Bumped up the versionfe31dd5
Added Litestar to the downstream test suiteb7be190
Updated GitHub actions45b9ece
Rearranged the changelog0b66994
Fix morePath
typing that doesn't match Typeshed (#653)e5fadb3
Added mention of anyio.from_thread.run_sync() to the changelog89795b9
Used TypeVarTuple and ParamSpec in several places (#652)3a4ec47
Removed the pyright version pin28516e2
Enabled Event and CapacityLimiter to be instantiated outside an event loop (#...44ca5ea
Fixed cancellation propagation when task group host is in a shielded scope (#...You can trigger a rebase of this PR by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show