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.27
which flips on strict egs (ExceptionGroup
s) by default. This originally broke most of our test suite an generally internalRemoteActorError
relay and propagation as per the surgery completed in #8..strict_exception_groups=False
in various core-runtime and test-suitetrio.open_nursery()
usagede91ca7
Flip tostrict_exception_groups=False
in core tns3e37508
A couple more loose-egs flag flips0af83bd
Go to loose egs inActor
root & service nurseries (for now..)except*:
handlers for topical/manual eg “loosify-ing”.67c6834
Handle egs on failedrequest_root_stdio_lock()
539ae7d
Draft some eg collapsing helpers (this adds a newtrionics._beg
mod FYI)b6e4e58
Another loose-egs flag intest_child_manages_service_nursery
ea29a1c
Various test tweaks related to 3.13 egs1a0e631
Another couple loose-ifies for discovery and advanced fault suites8027746
Fix docs tests with yet another loosie-goosie42389f8
Usecollapse_eg()
in broadcaster suite307e3cf
Another loosie in the trioisms suiteasyncio
re-mucking its SIGINT machinery; all the miserable details of which can be found in #2..asyncio.Queue
provides for more explicit aio-side graceful teardown detection using the newasyncio.Queue.shutdown()
/.QueueShutDown
feats delivered in,680501a
Add per-side graceful-exit/cancel excs-as-signalsdc19659
Continue supporting py3.11+asyncio.Task.cancel()
and instead hackily checking for and doing,5a9a3a4
Hm,asyncio.Task._fut_waiter.set_exception()
tests/devx/test_debugger.py
suite(s).$PYTHON_COLORS
for test debugger suite.. which lands in #2, and934f453
Disable tb colors in._testing.mk_cmd()
readline.backend: str
and seemingly cpython itself being more commonly built (definitely with our move touv
for pking) to uselibedit
meaning our use ofpdbp
gets REPL UX issues (tab complete, vi mode) without specially configuring.9324d82
Handle cpython builds withlibedit
forreadline
Additional dep related changes include,
uv
config, choose the linux distro’scpython
over those distributed by astral.msgspec>=0.19.0
release which supports 3.13+9681406
Bump up topytest>=8.3.5
to match “GH actions”Miscellaneous refinements,
various minor
.devx
related repairs/adjustments,68784a8
Matchmaybe_open_crash_handler()
to non-maybe versionfd6d250
Unpack errors frompdb.bdb
0696e7d
Fixroundtripped
ref error invalidate_payload_msg()
e42bc33
Move bp to-match-comments on same line for py3.13RE frame-hiding on internal errors,
0e76a2d
Exposehide_tb: bool
from.open_nursery()
d6ed798
Hideopen_nursery()
frame by def78028ca
Show frames when decode is handed bad input4d865b8
Bind another_bexc
for debugginchanges in namespacing,
030a9b5
Expose._state.debug_mode()
predicate at top levelTo-cherry into #2
34ce5fd
Dropasyncio
-canc error from._exceptions
66bc38f
Add equiv ofAsyncioCancelled
for aio side38497fa
Comment-tag pause points inasycnio_bp.py
d97e426bca
to4a6bac2fb1
4a6bac2fb1
toe42bc33bd6
@ -81,3 +81,3 @@
# enables the multi-process debugger support
debug_mode: bool = False,
maybe_enable_greenback: bool = False, # `.pause_from_sync()/breakpoint()` support
maybe_enable_greenback: bool = True, # `.pause_from_sync()/breakpoint()` support
Not sure if this is the right choice, seems like it can’t hurt since we consider
greenback
a--dev
dep?@ -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.Cancelled
from 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
trio
about 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 Channel
from ._portal import Portal as Portal
from ._runtime import Actor as Actor
from . import hilevel as hilevel
woof, 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
trio
release, 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_asyncio
stuff.Prolly woulda been better landed in #2 but, meh.Nm, was all todo with egs again.
Python 3.13 supportto Python 3.13 supporte42bc33bd6
toeda48c8021
Looking forward to #22 in order to get rid of all the
strict_exceptions=False
warningsIndeed!
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.