- Added the
BlockingPortalProviderclass to aid with constructing synchronous counterparts to asynchronous interfaces that would otherwise require multiple blocking portals - Added
__slots__toAsyncResourceso that child classes can use__slots__(#733; PR by Justin Su) - Added the
TaskInfo.has_pending_cancellation()method - Fixed erroneous
RuntimeError: called 'started' twice on the same task statuswhen cancelling a task in a TaskGroup created with thestart()method before the first checkpoint is reached after callingtask_status.started()(#706; PR by Dominik Schwabe) - Fixed two bugs with
TaskGroup.start()on asyncio:- Fixed erroneous
RuntimeError: called 'started' twice on the same task statuswhen cancelling a task in a TaskGroup created with thestart()method before the first checkpoint is reached after callingtask_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
- 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 (#425; PR by David Jiricek and Ganden Schaffner)
- Fixed cancellation delivery on asyncio incrementing the wrong cancel scope's cancellation counter when cascading a cancel operation to a child scope, thus failing to uncancel the host task (#716)
- Fixed erroneous
TypedAttributeLookupErrorif a typed attribute getter raisesKeyError - Fixed the asyncio backend not respecting the
PYTHONASYNCIODEBUGenvironment variable when setting thedebugflag inanyio.run() - Fixed
SocketStream.receive()not detecting EOF on asyncio if there is also data in the read buffer (#701) - Fixed
MemoryObjectStreamdropping an item if the item is delivered to a recipient that is waiting to receive an item but has a cancellation pending (#728) - Emit a
ResourceWarningforMemoryObjectReceiveStreamandMemoryObjectSendStreamthat were garbage collected without being closed (PR by Andrey Kazantcev) - Fixed
MemoryObjectSendStream.send()not raisingBrokenResourceErrorwhen the last correspondingMemoryObjectReceiveStreamis closed while waiting to send a falsey item (#731; PR by Ganden Schaffner)