Full Changelog: v0.33.0...v0.34.0
Features
MemoryChannelStatisticsnow has apeak_buffer_usedfield, which reports the largest number of items that have ever been in the channel's buffer at once. This makes it easier to pick a sensiblemax_buffer_sizebased on data from a real run, instead of guessing. (#1723)- Support Python 3.15, as of beta 4. Things may still change and so this support may break in the future. (#3456)
Bugfixes
Nursery.start()now preserves the__cause__and__context__of exceptions raised beforetask_status.started()is called. (#3261)- Fixed incorrect error message in
run_process: thestdoutpipe check now correctly says "stdout" instead of "stdin". (#3409) - Fixed
trio.Path.as_uri()on Python 3.14+ to avoid the deprecatedpathlib.PurePath.as_uri()path. (#3460) - Fixed
trio.to_thread.run_syncworkers leaking spawner'sContextonpy314t+free-threaded builds. (#3472)
Deprecations and removals
-
Trying to use absolute deadlines on a
trio.CancelScopeconstructed with a relative deadline now raises, after being deprecated since Trio 0.27.0.To switch a cancel scope from being relative to absolute, replace the
trio.CancelScopeobject instead of trying to mutate it. (#3403)