-
Notifications
You must be signed in to change notification settings - Fork 0
fix(deps): update dependency trio to ^0.32.0 #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
⚠ Artifact update problemRenovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below: File name: poetry.lock |
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
e7d5168 to
89c4b41
Compare
89c4b41 to
5de74ff
Compare
5de74ff to
6307e30
Compare
|
6307e30 to
143c038
Compare
143c038 to
0e39a69
Compare
0e39a69 to
7cc6325
Compare
7cc6325 to
3f131ad
Compare
3f131ad to
5882068
Compare
5882068 to
bbefcd1
Compare
This PR contains the following updates:
^0.22.2→^0.32.0Release Notes
python-trio/trio (trio)
v0.32.0Compare Source
Full Changelog: python-trio/trio@v0.31.0...v0.32.0
Features
trio.CapacityLimiterto have zero total_tokens. (#3321)Bugfixes
@as_safe_channel-derivedReceiveChannelwould raisetrio.BrokenResourceErrorif the channel was closed by another task. It now shuts down cleanly. (#3331)trio.lowlevel.Task.iter_await_framesnow works on completed tasks, by returning an empty list of frames if the underlying coroutine has been closed. Previously, it raised an internal error. (#3337)Removals without deprecations
Miscellaneous internal changes
trio.as_safe_channel. (#3332)v0.31.0Compare Source
Full Changelog: python-trio/trio@v0.30.0...v0.31.0
Features
Cancelledstrings can now display the source and reason for a cancellation. Trio-internal sources of cancellation will set this string, andCancelScope.cancelnow has areasonstring parameter that can be used to attach info to anyCancelledto help in debugging. (#3232)Bugfixes
python -m trio). (#3007)trio.Cancelled, as they can show up when you want to pickle something else. This does not rule out pickling otherNoPublicConstructorobjects -- create an issue if necessary. (#3248)raise_single_exception_from_groupthat reraises last exception from group. (#3275)trio.as_safe_channelraise if closing the generator wrappedGeneratorExitin aBaseExceptionGroup. (#3324)Deprecations and removals
bool(trio.Event)and have it raise aDeprecationWarningand tell users to usetrio.Event.is_setinstead. This is an alternative tomypy --enable-error-code=truthy-boolfor users who don't use type checking. (#3322)Miscellaneous internal changes
RuntimeErrorinstead of a catastrophicTrioInternalError. (#3307)v0.30.0Compare Source
Full Changelog: python-trio/trio@v0.29.0...v0.30.0
Features
@trio.as_safe_channel, a wrapper that can be used to make async generators safe.This will be the suggested fix for the flake8-async lint rule
ASYNC900. (#3197)Bugfixes
trioto be atypes.ModuleTypeand still have deprecated attributes. (#2135)socket.AI_NUMERICSERV.Now trio works on legacy (pre-Lion) macOS. (#3133)
trio.run_processandtrio.lowlevel.open_process. (#3183)Nursery.start(). (#3224)Improved documentation
v0.29.0Compare Source
Full Changelog: python-trio/trio@v0.28.0...v0.29.0
Features
trio.lowlevel.in_trio_runandtrio.lowlevel.in_trio_taskand document the semantics (and differences) thereof. (#2757)trio.testing.RaisesGroupdoes not get the expected exceptions it now raises anAssertionErrorwith a helpful message, instead of letting the raised exception/group fall through. The raised exception is available in the__context__of theAssertionErrorand can be seen in the traceback. (#3145)Bugfixes
os.fork. (#2764)Miscellaneous internal changes
Stop using ctypes to mutate tracebacks for
strict_exception_groups=False's exception collapsing. (#405)Fixed spelling error in Windows error code enum for
ERROR_INVALID_PARAMETER. (#3166)Publicly re-export
__version__for type checking purposes. (#3186)The typing of
trio.abc.HostnameResolver.getaddrinfohas been corrected to match that of the stdlibsocket.getaddrinfo, which was updated in mypy 1.15 (via a typeshed update) to include the possibility oftuple[int, bytes]for thesockaddrfield of the result. This happens in situations where Python was compiled with--disable-ipv6.Additionally, the static typing of
trio.to_thread.run_sync,trio.from_thread.runandtrio.from_thread.run_synchas been improved and should reflect the underlying function being run. (#3201)v0.28.0Compare Source
Full Changelog: python-trio/trio@v0.27.0...v0.28.0
Bugfixes
:func:
inspect.iscoroutinefunctionand the like now give correct answers whencalled on KI-protected functions. (#2670)
Rework KeyboardInterrupt protection to track code objects, rather than frames,
as protected or not. The new implementation no longer needs to access
frame.f_localsdictionaries, so it won't artificially extend the lifetime oflocal variables. Since KeyboardInterrupt protection is now imposed statically
(when a protected function is defined) rather than each time the function runs,
its previously-noticeable performance overhead should now be near zero.
The lack of a call-time wrapper has some other benefits as well:
:func:
inspect.iscoroutinefunctionand the like now give correct answers whencalled on KI-protected functions.
Calling a synchronous KI-protected function no longer pushes an additional stack
frame, so tracebacks are clearer.
A synchronous KI-protected function invoked from C code (such as a weakref
finalizer) is now guaranteed to start executing; previously there would be a brief
window in which KeyboardInterrupt could be raised before the protection was
established.
One minor drawback of the new approach is that multiple instances of the same
closure share a single KeyboardInterrupt protection state (because they share a
single code object). That means that if you apply
trio.lowlevel.enable_ki_protectionto some of themand not others, you won't get the protection semantics you asked for. See the
documentation of
trio.lowlevel.enable_ki_protectionfor more details and a workaround. (#3108)
Rework foreign async generator finalization to track async generator
ids rather than mutating
ag_frame.f_locals. This fixes an issuewith the previous implementation: locals' lifetimes will no longer be
extended by materialization in the
ag_frame.f_localsdictionary thatthe previous finalization dispatcher logic needed to access to do its work. (#3112)
Ensure that Pyright recognizes our underscore prefixed attributes for attrs classes. (#3114)
Fix
trio.testing.RaisesGroup's typing. (#3141)Improved documentation
trio.sleep_foreveris guaranteed to raise an exception now. (#3113)Removals without deprecations
Miscellaneous internal changes
trio.socket.SocketType's methods. (#3094)Anyusage. (#3121)v0.27.0Compare Source
Full Changelog: python-trio/trio@v0.26.2...v0.27.0
Breaking changes
trio.move_on_afterandtrio.fail_afterpreviously set the deadline relative to initialization time, instead of more intuitively upon entering the context manager. This might change timeouts if a program relied on this behavior. If you want to restore previous behavior you should instead usetrio.move_on_at(trio.current_time() + ...).flake8-async has a new rule to catch this, in case you're supporting older trio versions. See
ASYNC122. (#2512)Features
CancelScope.relative_deadlineandCancelScope.is_relativeadded, as well as arelative_deadlineparameter to__init__. This allows initializing scopes ahead of time, but where the specified relative deadline doesn't count down until the scope is entered. (#2512)trio.Lockandtrio.StrictFIFOLockwill now raisetrio.BrokenResourceErrorwhentrio.Lock.acquirewould previously stall due to the owner of the lock exiting without releasing the lock. (#3035)trio.move_on_at,trio.move_on_after,trio.fail_atandtrio.fail_afternow accept shield as a keyword argument. If specified, it provides an initial value for the~trio.CancelScope.shieldattribute of thetrio.CancelScopeobject created by the context manager. (#3052)trio.lowlevel.add_parking_lot_breakerandtrio.lowlevel.remove_parking_lot_breakerto allow creating custom lock/semaphore implementations that will break their underlying parking lot if a task exits unexpectedly.trio.lowlevel.ParkingLot.break_lotis also added, to allow breaking a parking lot intentionally. (#3081)Bugfixes
os.PathLikeobject. (#3041)trio.lowlevel.open_process's documentation to allow bytes. (#3076)trio.sleep_foreverto beNoReturn. (#3095)Improved documentation
statistics()andaclosemethods. (#3101)v0.26.2Compare Source
Full Changelog: python-trio/trio@v0.26.1...v0.26.2
Bugfixes
hashusage and fix test configuration issue that prevented it from being caught. (#3053)v0.26.1Compare Source
Full Changelog: python-trio/trio@v0.26.0...v0.26.1
Bugfixes
attrsusage off ofhash, which is now deprecated. (#3053)Miscellaneous internal changes
v0.26.0Compare Source
Full Changelog: python-trio/trio@v0.25.1...v0.26.0
Features
Added an interactive interpreter
python -m trio.This makes it easier to try things and experiment with trio in the a Python repl.
Use the
awaitkeyword without needing to calltrio.run()See interactive debugging for further detail. (#2972)
trio.testing.RaisesGroupcan now catch an unwrapped exception withunwrapped=True. This means that the behaviour ofexcept*can be fully replicated in combination withflatten_subgroups=True(formerlystrict=False). (#2989)Bugfixes
trio.testing.RaisesGroup(..., strict=False)would check the number of exceptions in the raisedExceptionGroupbefore flattening subgroups, leading to incorrectly failed matches.It now properly supports end (
$) regex markers in thematchmessage, by no longer including " (x sub-exceptions)" in the string it matches against. (#2989)Deprecations and removals
strictparameter fromtrio.testing.RaisesGroup, previous functionality ofstrict=Falseis now inflatten_subgroups=True. (#2989)v0.25.1Compare Source
Full Changelog: python-trio/trio@v0.25.0...v0.25.1
Bugfixes
v0.25.0Compare Source
Full Changelog: python-trio/trio@v0.24.0...v0.25.0
Breaking changes
The
strict_exception_groupsparameter now defaults toTrueintrio.runandtrio.lowlevel.start_guest_run.trio.open_nurserystill defaults to the same value as was specified intrio.run/trio.lowlevel.start_guest_run, but if you didn't specify it there then all subsequent calls totrio.open_nurserywill change.This is unfortunately very tricky to change with a deprecation period, as raising a
DeprecationWarningwheneverstrict_exception_groupsis not specified would raise a lot of unnecessary warnings.Notable side effects of changing code to run with
strict_exception_groups==TrueIf an iterator raises
StopAsyncIterationorStopIterationinside a nursery, then python will not recognize wrapped instances of those for stopping iteration.trio.run_processis now documented that it can raise anExceptionGroup. It previously could do this in very rare circumstances, but withstrict_exception_groupsset toTrueit will now do so whenever exceptions occur indeliver_cancelor with problems communicating with the subprocess.strict_exception_groups=Truethere are cases now where anExceptionGroupis no longer added.trio.TrioInternalError.__cause__might be wrapped in one or moreExceptionGroups <ExceptionGroup>(#2786)Features
Add
trio.testing.wait_all_threads_completed, which blocks until no threads are running tasks. This is intended to be used in the same way astrio.testing.wait_all_tasks_blocked. (#2937)Pathis now a subclass ofpathlib.PurePath, allowing it to interoperate with other standardpathlibtypes.Instantiating
Pathnow returns a concrete platform-specific subclass, one ofPosixPathorWindowsPath, matching the behavior ofpathlib.Path. (#2959)Bugfixes
Miscellaneous internal changes
v0.24.0Compare Source
Full Changelog: python-trio/trio@v0.23.2...v0.24.0
Features
New helper classes:
testing.RaisesGroupandtesting.Matcher.In preparation for changing the default of
strict_exception_groupstoTrue, we're introducing a set of helper classes that can be used in place ofpytest.raisesin tests, to check for an expectedExceptionGroup.These are provisional, and only planned to be supplied until there's a good solution in
pytest. See pytest-dev/pytest#11538 (#2785)Deprecations and removals
MultiErrorhas been fully removed, and all relevant trio functions now raise ExceptionGroups instead. This should not affect end users that have transitioned to usingexcept*or catching ExceptionGroup/BaseExceptionGroup. (#2891)v0.23.2Compare Source
Full Changelog: python-trio/trio@v0.23.1...v0.23.2
Features
nursery.start_soon(),trio.run(),trio.to_thread.run_sync(), and other similar functions accepting(func, *args). This means type checkers will be able to verify types are used correctly.nursery.start()is not fully typed yet however. (#2881)Bugfixes
open_memory_channelas generic. (#2873)Miscellaneous internal changes
pyproject.toml. (#2860)v0.23.1Compare Source
Full Changelog: python-trio/trio@v0.23.0...v0.23.1
Bugfixes
v0.23.0Compare Source
Full Changelog: python-trio/trio@v0.22.2...v0.23.0
Headline features
Features
Cancelledexception, even though it wasn't cancelled. Most users probably never noticed either way, but injecting aCancelledhere is not really useful, and in some rare cases caused confusion or problems, so Trio no longer does that. (#1457)trio.to_thread.run_sync,trio.from_thread.runandtrio.from_thread.run_syncnow reuse the task and cancellation status of the host task; this means that context variables and cancel scopes naturally propagate 'through' threads spawned by Trio. You can also usetrio.from_thread.check_cancelledto efficiently check for cancellation without reentering the Trio thread. (#2392)trio.lowlevel.start_guest_runnow does a bit more setup of the guest run before it returns to its caller, so that the caller can immediately make calls totrio.current_time,trio.lowlevel.spawn_system_task,trio.lowlevel.current_trio_token, etc. (#2696)Bugfixes
trio.TaskStatus.started,trio.Nursery.startwill no longer wrap the exception in an undocumentedExceptionGroup. Previously,trio.Nursery.startwould incorrectly raise anExceptionGroupcontaining it when usingtrio.run(..., strict_exception_groups=True). (#2611)Deprecations and removals
trio.to_thread.run_syncthat was previously calledcancellableis now namedabandon_on_cancel. It still does the same thing -- allow the thread to be abandoned if the call totrio.to_thread.run_syncis cancelled -- but since we now have other ways to propagate a cancellation without abandoning the thread, "cancellable" has become somewhat of a misnomer. The oldcancellablename is now deprecated. (#2841)math.inffor thebacklogargument inopen_tcp_listeners, making its docstring correct in the fact that onlyTypeErroris raised if invalid arguments are passed. (#2842)Removals without deprecations
MultiErrortraceback handling for IPython. As of version 8.15ExceptionGroupis handled natively. (#2702)Miscellaneous internal changes
sniffiousing thesniffio.thread_localinterface that is preferred since sniffio v1.3.0. This should be less likely than the previous approach to causesniffio.current_async_libraryto return incorrect results due to unintended inheritance of contextvars. (#2700)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.