tractor/tractor/ipc
Gud Boi efeb6c148c Lazy-import optional 3rd-party deps (gh #470)
Move every import-time-only-by-accident dep off the eager
`import tractor` path so cold child-actor boots only pay for
what they actually use:

- `bidict` -> `TYPE_CHECKING` in `discovery._addr`
  (annotation-only; `_address_types` is a plain `dict`
  literal).
- `multiaddr` -> `TYPE_CHECKING` + fn-local imports in
  `discovery._multiaddr.mk_maddr()`/`parse_maddr()`; also
  `TYPE_CHECKING` the `Multiaddr` annots in `ipc._tcp`/`._uds`
  (adds future-annots to `._multiaddr`).
- `colorlog` -> fn-local in `log.get_console_log()`.
- `pdbp` + `wrapt` -> fn-local in
  `devx._frame_stack.hide_runtime_frames()`/`api_frame()`.
- `platformdirs` -> fn-local in `runtime._state.get_rt_dir()`.

Still eager (documented follow-ups),
- `pdbp` via `devx.debug._repl` class-bases
  (`PdbREPL(pdbp.Pdb)`) + the module-lvl `@pdbp.hideframe` in
  `._tty_lock`; needs a `._repl` restructure.
- `platformdirs` via the `UDSAddress.def_bindspace: ClassVar`
  class-body eval of `get_rt_dir()`; needs an `Address`-proto
  rework.
- `stackscope` is already fn-local; `setproctitle` is not
  imported anywhere.

Prompt-IO: ai/prompt-io/claude/20260702T155626Z_65bf9df5_prompt_io.md
(this patch was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-08-12 17:15:55 -04:00
..
__init__.py Move concrete `Address`es to each tpt module 2025-07-08 18:05:05 -04:00
_chan.py Drop resolved channel log-guard TODO 2026-08-12 12:51:43 -04:00
_fd_share.py Move concrete `Address`es to each tpt module 2025-07-08 18:05:05 -04:00
_linux.py Address Copilot review nits on PR #462 2026-06-18 13:37:55 -04:00
_mp_bs.py Fix `SharedMemory` under `subint_forkserver` 2026-06-17 17:39:44 -04:00
_ringbuf.py Add buf_size to RBToken and add sender cancel test, move disable_mantracker to its own _mp_bs module 2025-07-08 12:57:28 -04:00
_server.py Use `is not None` check for peer-connect `event` 2026-06-24 18:19:16 -04:00
_shm.py Fix `SharedMemory` under `subint_forkserver` 2026-06-17 17:39:44 -04:00
_tcp.py Lazy-import optional 3rd-party deps (gh #470) 2026-08-12 17:15:55 -04:00
_transport.py Guard receive-path transport rendering 2026-08-12 13:48:40 -04:00
_types.py Factor actor-embedded IPC-tpt-server to `ipc` subsys 2025-07-08 18:05:05 -04:00
_uds.py Lazy-import optional 3rd-party deps (gh #470) 2026-08-12 17:15:55 -04:00