- Changed
ByteReceiveStream.receive()implementations to raise aValueErrorwhenmax_bytesis not a positive integer (#1191) - Fixed
CapacityLimiter.total_tokensrejectingfloat("inf")when the limiter was instantiated outside of an event loop. The adapter setter checked for infinity by identity (value is math.inf), so only the exactmath.infsingleton was accepted, while every backend setter (usingmath.isinf()) accepts any positive infinity (#1189; PR by @greymoth-jp). - Fixed
to_process.run_sync()deadlocking when the worker function writes enough data tosys.stderrto fill the (undrained) pipe buffer. The worker process now redirectssys.stderrtoos.devnullas well, matching the documented behavior - Fixed
TLSStream.wrap()matching an internationalized (unicode) host name against the peer certificate using IDNA 2003 (via the standard library) instead of IDNA 2008, which could cause the host name to be matched against the wrong certificate (#1208) - Fixed
anyio.open_process()(andrun_process()) ignoring theextra_groupsargument, as it mistakenly passed the value of thegroupargument instead (#1209) - Fixed
CapacityLimiter.acquire_nowait()andCapacityLimiter.acquire_nowait_on_behalf_of()raisingtrio.WouldBlockinstead ofanyio.WouldBlockon thetriobackend when there are no tokens available (#1218) - Fixed
CapacityLimiteron the asyncio backend over-granting tokens (borrowed_tokensexceedingtotal_tokensandavailable_tokensgoing negative) when a non-blocking acquire was made in the window between a token being released and the notified waiter resuming. The freed token is now reserved for the woken waiter right away, so the non-blocking acquire correctly raisesWouldBlock(#1170; PR by @gaoflow) - Fixed unnecessary CPU spin when delivering cancellation from
CancelScopeon asyncio under certain conditions, including improper cancel scope nesting (#1111)