Python 3.13 support #18
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "py313_support"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Bumping to latest minor release with some refinements and wart fixes along the way!
Main breaking/unexpected changes due to deps
Those requiring attention are detailed in #8 and i’ll briefly re-list here,
trio’s release schedule requires we bump to at leasttrio>0.27which flips on strict egs (ExceptionGroups) by default. This originally broke most of our test suite an generally internalRemoteActorErrorrelay and propagation as per the surgery completed in #8..strict_exception_groups=Falsein various core-runtime and test-suitetrio.open_nursery()usagede91ca7Flip tostrict_exception_groups=Falsein core tns3e37508A couple more loose-egs flag flips0af83bdGo to loose egs inActorroot & service nurseries (for now..)except*:handlers for topical/manual eg “loosify-ing”.67c6834Handle egs on failedrequest_root_stdio_lock()539ae7dDraft some eg collapsing helpers (this adds a newtrionics._begmod FYI)b6e4e58Another loose-egs flag intest_child_manages_service_nurseryea29a1cVarious test tweaks related to 3.13 egs1a0e631Another couple loose-ifies for discovery and advanced fault suites8027746Fix docs tests with yet another loosie-goosie42389f8Usecollapse_eg()in broadcaster suite307e3cfAnother loosie in the trioisms suiteasynciore-mucking its SIGINT machinery; all the miserable details of which can be found in #2..asyncio.Queueprovides for more explicit aio-side graceful teardown detection using the newasyncio.Queue.shutdown()/.QueueShutDownfeats delivered in,680501aAdd per-side graceful-exit/cancel excs-as-signalsdc19659Continue supporting py3.11+asyncio.Task.cancel()and instead hackily checking for and doing,5a9a3a4Hm,asyncio.Task._fut_waiter.set_exception()tests/devx/test_debugger.pysuite(s).$PYTHON_COLORSfor test debugger suite.. which lands in #2, and934f453Disable tb colors in._testing.mk_cmd()readline.backend: strand seemingly cpython itself being more commonly built (definitely with our move touvfor pking) to uselibeditmeaning our use ofpdbpgets REPL UX issues (tab complete, vi mode) without specially configuring.9324d82Handle cpython builds withlibeditforreadlineAdditional dep related changes include,
uvconfig, choose the linux distro’scpythonover those distributed by astral.msgspec>=0.19.0release which supports 3.13+9681406Bump up topytest>=8.3.5to match “GH actions”Miscellaneous refinements,
various minor
.devxrelated repairs/adjustments,68784a8Matchmaybe_open_crash_handler()to non-maybe versionfd6d250Unpack errors frompdb.bdb0696e7dFixroundtrippedref error invalidate_payload_msg()e42bc33Move bp to-match-comments on same line for py3.13RE frame-hiding on internal errors,
0e76a2dExposehide_tb: boolfrom.open_nursery()d6ed798Hideopen_nursery()frame by def78028caShow frames when decode is handed bad input4d865b8Bind another_bexcfor debugginchanges in namespacing,
030a9b5Expose._state.debug_mode()predicate at top levelTo-cherry into #2
34ce5fdDropasyncio-canc error from._exceptions66bc38fAdd equiv ofAsyncioCancelledfor aio side38497faComment-tag pause points inasycnio_bp.pyd97e426bcato4a6bac2fb14a6bac2fb1toe42bc33bd6@ -81,3 +81,3 @@# enables the multi-process debugger supportdebug_mode: bool = False,maybe_enable_greenback: bool = False, # `.pause_from_sync()/breakpoint()` supportmaybe_enable_greenback: bool = True, # `.pause_from_sync()/breakpoint()` supportNot sure if this is the right choice, seems like it can’t hurt since we consider
greenbacka--devdep?@ -83,0 +100,4 @@# TODO, ask ronny how to impl this .. XD# ids='unmask_from_canc={0}, canc_from_finally={1}',#.format,)def test_acm_embedded_nursery_propagates_enter_err(This test demonstrates a footgun i recently discovered debugging silent process tree cancellation in
modden.Turns out if you raise
trio.Cancelledfrom a finally it’ll suppress any underlying error raised from the cancel scope.. This is actually expected behavior but definitely unexpected IHMO.I spoke to core
trioabout it over chat but noone seemed that concerned XDSo i’ve replicated the condition as well as attempted to provide a devx-y solution to unwrap the underlying error for the user if detected in any
BaseException.__context__and then use.add_note()to report that the cancellation’s suppression.@ -66,3 +67,4 @@ from ._root import (from ._ipc import Channel as Channelfrom ._portal import Portal as Portalfrom ._runtime import Actor as Actorfrom . import hilevel as hilevelwoof, this should be removed since that subpkg won’t land until #12 ?
@ -64,2 +64,3 @@ctx.open_stream() as stream,trio.open_nursery() as n,trio.open_nursery(strict_exception_groups=False,You’ll find the bulk of the strict-eg-style “sidestepping” is just this for now..
XD
I know that it’ll set to be removed in an upcoming
triorelease, but we’re likely just going to have to delivery our own version for a variety of remote-error relaying cases, particularly pertaining to RPC semantics.It’s something to be followed up in #22
@ -199,2 +255,2 @@)await trio.sleep_forever()# TODO, factor this into a `trionics.collapse()`?except* BaseException as beg:prolly coulda also used
._beg.collapse_eg()here too..Ahh well someone will swap it eventually, at least whenever we have to solve #22
@ -289,3 +351,3 @@def test_aio_cancelled_from_aio_causes_trio_cancelled(reg_addr):def test_aio_cancelled_from_aio_causes_trio_cancelled(Ahh i guess this was a aio related refinement of a test discovered while working through strict egs alongside usingto_asynciostuff.Prolly woulda been better landed in #2 but, meh.Nm, was all todo with egs again.
Python 3.13 supportto Python 3.13 supporte42bc33bd6toeda48c8021Looking forward to #22 in order to get rid of all the
strict_exceptions=FalsewarningsIndeed!
I’m just holding off on doing it now bc i’d like to take a look at their original implementation and then really think about where we want to keep to the original
.trionics._beg.collapse_eg()style.