tractor/tractor
Tyler Goodlet a5126862b9 Re-impl as `DebugStatus.maybe_enter_repl_fixture()`
Dropping the `_maybe_open_repl_fixture()` approach and instead using
a `DebugStatus._fixture_stack = ExitStack()` which provides for much
simpler support around both sync and async pausing APIs thanks to only
invoking `repl_fixture.__exit__()` on actual `PdbREPL` interaction being
complete!

Deats,
- all `repl_fixture` detection logic still happens in one place (the new
  method) but we aren't limited to closing it via an immediate post REPL
  `.__exit__()` call which instead is triggered by,
- `DebugStatus.release()` which now calls `._fixture_stack.close()` and
  thus only invokes `repl_fixture.__exit__()` when user REPL-ing is
  **actually complete** an arbitrary amount of debugging time later.
- include the notes for `@acm` support above the new method, though not
  sure if they're as relevant any more?

Benefits,
- we can drop the previously added indent levels from
  `_enter_repl_sync()` and `_post_mortem()`.
- now we automatically have support for the `.pause_from_sync()` API
  since `_enter_repl_sync()` doesn't close the prior
  `_maybe_open_repl_fixture()` immediately when `debug_func=None`; the
  user's `__exit__()` is only ever called once `.release()` is.

Other,
- add big 'CASE' comments around the various blocks in
  `.pause_from_sync()`, i was having trouble figuring out which i was
  using from a `breakpoint()` in a dependent app..
2025-07-13 15:55:39 -04:00
..
_testing Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-13 15:53:35 -04:00
devx Re-impl as `DebugStatus.maybe_enter_repl_fixture()` 2025-07-13 15:55:39 -04:00
experimental Add API-modernize-todo on `experimental._pubsub.fan_out_to_ctxs` 2025-07-08 18:05:05 -04:00
ipc Drop 'IPC' prefix from `._server` types 2025-07-13 15:26:37 -04:00
msg Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-13 15:53:35 -04:00
trionics Expose `.trionics.maybe_collapse_eg` 2025-07-13 15:53:35 -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 Clean up some imports in `._clustering` 2025-03-27 13:38:47 -04:00
_context.py Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-13 15:53:35 -04:00
_discovery.py Fix now invalid `Actor._peers` ref.. 2025-07-09 23:09:41 -04:00
_entry.py Mv `.hide_runtime_frames()` -> `.devx._frame_stack` 2025-07-13 15:53:35 -04:00
_exceptions.py Add `TransportClosed.from_src_exc()` 2025-07-08 18:05:05 -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 Fix doc string "its" typo.. 2025-03-20 19:50:31 -04:00
_portal.py Decouple actor-state from low-level ipc-server 2025-07-08 18:05:05 -04:00
_root.py Mv `.hide_runtime_frames()` -> `.devx._frame_stack` 2025-07-13 15:53:35 -04:00
_rpc.py Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-13 15:53:35 -04:00
_runtime.py Cherry-pick conflict resolution 2025-07-13 15:53:35 -04:00
_spawn.py Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-13 15:53:35 -04:00
_state.py Add initial `repl_fixture` support B) 2025-07-13 15:53:35 -04:00
_streaming.py Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-13 15:53:35 -04:00
_supervise.py Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-13 15:53:35 -04:00
log.py Fix ref-err on `logger` input to `get_console_log()` 2025-07-13 15:53:35 -04:00
to_asyncio.py Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-13 15:53:35 -04:00