What's Changed
Breaking changes
- Removed global asynchronous back-end interface by @francis-clairicia in #262
- Added
BufferedStreamProtocol
object by @francis-clairicia in #302 - Removed
BufferedStreamReadTransport
class by @francis-clairicia in #308 - Low-level API: asyncio backend is now a private implementation by @francis-clairicia in #311
- Removed
ssl_shared_lock
option from TCP clients by @francis-clairicia in #316 - Servers: Common implementation for both TCP and UDP servers by @francis-clairicia in #322
- Clients: Removed
get_(local|remote)_address
from abstract base classes by @francis-clairicia in #324 AsyncBackend.run_in_thread()
: Removed**kwargs
and addedabandon_on_cancel
by @francis-clairicia in #331
Bug fixes
- Fixed: Cancelling taskgroup.start() did not cancel the spawned task by @francis-clairicia in #267
- Datagram servers: Removed slots on Generic-based dataclasses by @francis-clairicia in #269
- Added
ResourceWarning
calls for unclosed objects on destroy by @francis-clairicia in #284 - Datagram server: Fixed memory leak if the request handler have an inner loop by @francis-clairicia in #306
- TLS transport: Fixed SSL object consistency errors when sending data and closing the object by @francis-clairicia in #309
- Async TLS: Ensure wrapped transport is closed once by @francis-clairicia in #333
- TCP server: Force client tasks to yield when receiving messages by @francis-clairicia in #334
Features/Improvement
- Usage of high-level request handlers is now generic by @francis-clairicia in #272
- Standalone servers: Improved robustness by @francis-clairicia in #273
AsyncIOBackend.ignore_cancellation()
: Back-propagation of context on Python 3.11 by @francis-clairicia in #276- Optional async-backend interface by @francis-clairicia in #279
- Low-level transport objects now support the context manager protocol by @francis-clairicia in #287
- Low-level API: Stream endpoints now raise ConnectionAbortedError on EOF by @francis-clairicia in #289
- Low-level API: Easier way to handle simplex/duplex endpoints by @francis-clairicia in #290
- Low-level API: Added
get_socket_linger()
by @francis-clairicia in #291 - Fix: Better performances when using buffer API by @francis-clairicia in #299
- Fix: Improved server performances (slightly) by @francis-clairicia in #304
- Low-level API: Lazy asyncio import by @francis-clairicia in #313
- Low-level API: transports'
send_all_from_iterable()
method are more efficient by @francis-clairicia in #315 - Clients:
iter_received_packets()
default implementation is no longer a generator by @francis-clairicia in #325 - Added composite serializers by @francis-clairicia in #328
- Transports: Now
send_all_from_iterable()
sends a single chunk by default by @francis-clairicia in #329 - Servers: Temporary disable async generator hooks for request handlers by @francis-clairicia in #332
- Servers: Added
backend()
method to client objects by @francis-clairicia in #335 - Datagram servers: Removed task locks because it is useless by @francis-clairicia in #336
- Implemented
trio
backend by @francis-clairicia in #337 MessagePackSerializer
can be used withStreamProtocol
andBufferedStreamProtocol
by @francis-clairicia in #339- Multithreading integration in servers by @francis-clairicia in #344
Documentation
sniffio
is now used differently by @francis-clairicia in #264- Rewritten
API Reference
sections by @francis-clairicia in #271 - Documentation: Fixed API docstrings by @francis-clairicia in #292
- README: AnyIO license is now a link by @francis-clairicia in #298
- Documentation: Rewritten all docstrings by @francis-clairicia in #310
- Documentation: Fixed missing docstrings + invalid type aliases by @francis-clairicia in #317
- Documentation: Added more documentation for serializers by @francis-clairicia in #323
- API Reference: Add a "See Also" pointing to the corresponding User Guide by @francis-clairicia in #327
Dependencies
- Updated dependencies and pre-commit pinned versions by @francis-clairicia in #265
- Updated pytest-asyncio to 0.23.6 and other dev dependencies by @francis-clairicia in #274
- Updated pdm, dev dependencies, and pre-commit pinned versions by @francis-clairicia in #278
- Updated pdm, dev dependencies, and pre-commit pinned versions by @francis-clairicia in #294
- Build: Moved
hatch-vcs
tovcs
build hook's dependencies by @francis-clairicia in #303 - Upgraded pytest-retry to remove ResourceWarnings by @francis-clairicia in #307
- Updated pdm, dev dependencies, and pre-commit pinned versions by @francis-clairicia in #312
- Dependencies:
sniffio
is now a required dependency by @francis-clairicia in #320 - Updated dev dependencies by @francis-clairicia in #321
- Updated dev dependencies by @francis-clairicia in #326
- Updated pdm, dev dependencies, and pre-commit pinned versions by @francis-clairicia in #338
- Updated pdm, dev dependencies, and pre-commit pinned versions by @francis-clairicia in #340
Other Changes
- Upgrade
pdm
to version 2.14.0 by @francis-clairicia in #263 test.yml
: Mutualise test jobs by @francis-clairicia in #268- tox: Configuration update by @francis-clairicia in #277
- Converters: Better type hints by @francis-clairicia in #280
AsyncIOBackend
: RemovedAsyncSocket
class by @francis-clairicia in #281- Revert modifications of pre-commit config done in #277 by @francis-clairicia in #282
- Server benchmarks: More accurate results by synchronizing client workers by @francis-clairicia in #283
- asyncio listener: Handle
accept()
errors in the right place by @francis-clairicia in #285 - Removed unnecessary
typing.TYPE_CHECKING
usages by @francis-clairicia in #286 - asyncio backend: Some code cleanup by @francis-clairicia in #288
- Benchmarks: Timestamp report files by @francis-clairicia in #295
- Benchmarks: Add benches for SSL and easynetwork + buffered serializers by @francis-clairicia in #296
- Benchmarks: Client workers have been rewritten in Rust by @francis-clairicia in #301
- Benchmarks: Fix compilation error on Windows by @francis-clairicia in #318
- AsyncIO Backend: Rewritten
ignore_cancellation()
by @francis-clairicia in #319 - CI: Do not take 2 runners per OS by @francis-clairicia in #341
- Lowlevel API (
AsyncStreamServer
): Addeddisconnect_error_filter
parameter by @francis-clairicia in #342
Full Changelog: 1.0.0rc8...1.0.0