-
Notifications
You must be signed in to change notification settings - Fork 12
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExceptiongGroup
s and trio>=0.22
#333
Conversation
3806365
to
6f8c665
Compare
Beauty, now it's just some debugger test cases which are borked.. I've got a patch which solves this (as well as a general solution for the "un-contactable subactor left a stale lock state") but, it's going to require these the tests to be adjusted since they'll fail earlier now with less locks due to the new "block list" approach working. |
Hmm i might break out the new debugger fix stuff into a new dependent PR since it is somewhat unrelated to this specific change set. Also might do the same for the uuid-in-log msgs adjustment? |
ea2c416
to
24b481a
Compare
24b481a
to
b7ba1d3
Compare
Alright factored out the relevant debugger locking solution stuff into #337. |
Turns out this test was being silently ignored due to incorrect usage of sync opening of our `.open_nursery()` block (with a `with` not `async with`) and thus was an noop XD Instead this fixes the test to call a `tractor` discovery built-in without starting the runtime (which is now done implicitly when a user opens a nursery) which should result in the prior expected outcome, a `RuntimeError`.
b7ba1d3
to
882c33f
Compare
trio>=0.22
ExceptiongGroup
s and trio>=0.22
63b486d
to
62fc462
Compare
馃挜 almost there! |
Pretty sure this is the final touch to alleviate all our debug lock headaches! Instead of trying to revert to the "last" handler (as `pdb` does internally in the stdlib) we always just revert to the handler `trio` registers during startup. Further this seems to allow cancelling the root-side locking task if it's detected as stale IFF we only do this when the root actor is in a "no more IPC peers" state. Deatz: - (always) set `._debug.Lock._trio_handler` as the `trio` version, not some last used handler to make sure we're getting the ctrl-c handling we want when not in debug mode. - assign the trio handler in `open_root_actor()` `._runtime._async_main()` to be sure it's applied in subactors as well as the root. - only do debug lock blocking and root-side-locking-task cancels when a "no peers" condition is detected in the root actor: i.e. no IPC channels are detected by the root meaning it's impossible any actor has a sane lock-state ongoing for debug mode.
If we pack the nursery parent task's error into the `errors` table directly in the handler, we don't need to specially handle packing that same error into any exception group raised while handling sub-actor cancellation; drops some ugly indentation ;)
0129381
to
274c66c
Compare
All the mega-deats in the nooz file 馃弰馃徏 |
Attempting to get the new
py3.11
driven exception group backport support in. See pep 654 for dirty deats.Pertains to fixing #332 and appears to have caused a bunch of test hangs particularly in the debugger suite (which I've manually verified) which need some investigation.
UPDATE tests now fixed with the landing of #337 馃弰馃徏