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 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| _portal.py | ||
| _rpc.py | ||
| _runtime.py | ||
| _state.py | ||
| _supervise.py | ||