tractor/tractor
Gud Boi 03c9c4808b Tried out an alt approach for `.to_asyncio` crashes
This change is masked out now BUT i'm leaving it in for reference.

I was debugging a multi-actor fault where the primary source actor was
an infected-aio-subactor (`brokerd.ib`) and it seemed like the REPL was only
entering on the `trio` side (at a `.open_channel_from()`) and not
eventually breaking in the `asyncio.Task`. But, since (changing
something?) it seems to be working now, it's just that the `trio` side
seems to sometimes handle before the (source/causing and more
child-ish) `asyncio`-task, which is a bit odd and not expected..
We could likely refine (maybe with an inter-loop-task REPL lock?) this
at some point and ensure a child-`asyncio` task which errors always
grabs the REPL **first**?

Lowlevel deats/further-todos,
- add (masked) `maybe_open_crash_handler()` block around
  `asyncio.Task` execution with notes about weird parent-addr
  delivery bug in `test_sync_pause_from_aio_task`
  * yeah dunno what that's about but made a bug; seems to be IPC
    serialization of the `TCPAddress` struct somewhere??
- add inter-loop lock TODO for avoiding aio-task clobbering
  trio-tasks when both crash in debug-mode

Also,
- change import from `tractor.devx.debug` to `tractor.devx`
- adjust `get_logger()` call to use new implicit mod-name detection
  added to `.log.get_logger()`, i.e. sin `name=__name__`.
- some teensie refinements to `open_channel_from()`:
  * swap return type annotation for  to `tuple[LinkedTaskChannel, Any]`
    (was `Any`).
  * update doc-string to clarify started-value delivery
  * add err-log before `.pause()` in what should be an unreachable path.
  * add todo to swap the `(first, chan)` pair to match that of ctx..

(this commit msg was generated in some part by [`claude-code`][claude-code-gh])

[claude-code-gh]: https://github.com/anthropics/claude-code
2026-02-08 19:04:56 -05:00
..
_testing Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-14 00:00:12 -04:00
devx Toss in masked `.set_trace()` for unshielded `.pause()` debug 2026-01-23 20:46:13 -05:00
experimental Add API-modernize-todo on `experimental._pubsub.fan_out_to_ctxs` 2025-07-08 18:05:05 -04:00
ipc Always pass a `tn` to `._server._serve_ipc_eps()` 2025-08-20 11:30:58 -04:00
msg Check off REPL-ing todo add masked usage in `drain_to_final_msg()` 2025-09-11 10:13:04 -04:00
trionics Tweaks from copilot, type fix, typos, language. 2025-09-11 10:01:25 -04:00
__init__.py move tractor._ipc.py into tractor.ipc._chan.py 2025-07-08 12:57:28 -04:00
_addr.py Move concrete `Address`es to each tpt module 2025-07-08 18:05:05 -04:00
_child.py Adjust `._child` instantiation of `Actor` to use newly named `uuid` arg 2025-07-08 12:57:28 -04:00
_clustering.py Fix cluster suite, chng to new `gather_contexts()` 2025-08-18 10:46:37 -04:00
_code_load.py Mv `load_module_from_path()` to a new `._code_load` submod 2026-01-23 20:46:13 -05:00
_context.py Solve another OoB cancellation case, the bg task one 2025-09-11 13:12:52 -04:00
_discovery.py Switch to strict-eg nurseries almost everywhere 2025-08-18 10:46:37 -04:00
_entry.py Drop `actor_info: str` from `._entry` logs 2025-08-15 16:24:06 -04:00
_exceptions.py Move `.is_multi_cancelled()` to `.trioniics._beg` 2025-07-16 15:49:18 -04:00
_forkserver_override.py Re-license code base for distribution under AGPL 2021-12-14 23:33:27 -05:00
_mp_fixup_main.py Avoid importing mp for as long as possible 2022-02-17 11:55:26 -05:00
_multiaddr.py Add `uds` to `._multiaddr`, tweak typing 2026-02-04 09:10:21 -05:00
_portal.py Set `Channel._cancel_called` via `chan` var 2025-08-18 21:30:48 -04:00
_root.py Hide `collapse_eg()` frame as used from `open_root_actor()` 2025-08-20 10:44:42 -04:00
_rpc.py Hide `._rpc._invoke()` frame, again.. 2026-01-23 20:46:13 -05:00
_runtime.py Comment/docs tweaks per copilot reivew 2025-08-20 12:36:08 -04:00
_spawn.py Add attempt at non-root-parent REPL guarding 2025-08-19 14:15:14 -04:00
_state.py Use `platformdirs` for `.config.get_rt_dir()` 2026-01-23 20:48:11 -05:00
_streaming.py Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-14 00:00:12 -04:00
_supervise.py Rename var for and hide the `_open_and_supervise_one_cancels_all_nursery` frame 2025-09-11 10:13:04 -04:00
log.py Implicitly name sub-logs by caller's mod 2026-01-23 20:46:07 -05:00
to_asyncio.py Tried out an alt approach for `.to_asyncio` crashes 2026-02-08 19:04:56 -05:00