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()usagestrict_exception_groups=Falsein core tnsActorroot & service nurseries (for now..)except*:handlers for topical/manual eg “loosify-ing”.request_root_stdio_lock()trionics._begmod FYI)test_child_manages_service_nurserycollapse_eg()in broadcaster 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,asyncio.Task.cancel()and instead hackily checking for and doing,asyncio.Task._fut_waiter.set_exception()tests/devx/test_debugger.pysuite(s).$PYTHON_COLORSfor test debugger suite.. which lands in #2, and._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+pytest>=8.3.5to match “GH actions”Miscellaneous refinements,
various minor
.devxrelated repairs/adjustments,maybe_open_crash_handler()to non-maybe versionpdb.bdbroundtrippedref error invalidate_payload_msg()RE frame-hiding on internal errors,
hide_tb: boolfrom.open_nursery()open_nursery()frame by def_bexcfor debugginchanges in namespacing,
._state.debug_mode()predicate at top levelTo-cherry into #2
asyncio-canc error from._exceptionsAsyncioCancelledfor aio sideasycnio_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.