diff --git a/tests/discovery/test_registrar.py b/tests/discovery/test_registrar.py index 18f94c43..60b2b10c 100644 --- a/tests/discovery/test_registrar.py +++ b/tests/discovery/test_registrar.py @@ -552,7 +552,7 @@ def test_stale_entry_is_deleted( registry_addrs=[reg_addr], ) as maybe_portal: # because the transitive - # `._discovery.maybe_open_portal()` call should + # `._api.maybe_open_portal()` call should # fail and implicitly call `.delete_addr()` assert maybe_portal is None registry: dict = await unpack_reg(_reg_ptl) diff --git a/tests/test_multi_program.py b/tests/test_multi_program.py index 100f01c6..5894ee70 100644 --- a/tests/test_multi_program.py +++ b/tests/test_multi_program.py @@ -122,7 +122,7 @@ async def get_root_portal( # connect back to our immediate parent which should also # be the actor-tree's root. - from tractor.discovery._discovery import get_root + from tractor.discovery._api import get_root ptl: Portal async with get_root() as ptl: root_aid: Aid = ptl.chan.aid diff --git a/tractor/__init__.py b/tractor/__init__.py index 1aafe98e..287ac940 100644 --- a/tractor/__init__.py +++ b/tractor/__init__.py @@ -30,7 +30,7 @@ from ._streaming import ( MsgStream as MsgStream, stream as stream, ) -from .discovery._discovery import ( +from .discovery._api import ( get_registry as get_registry, find_actor as find_actor, wait_for_actor as wait_for_actor, diff --git a/tractor/devx/debug/_tty_lock.py b/tractor/devx/debug/_tty_lock.py index 9f7b71e7..3d2be681 100644 --- a/tractor/devx/debug/_tty_lock.py +++ b/tractor/devx/debug/_tty_lock.py @@ -1013,7 +1013,7 @@ async def request_root_stdio_lock( DebugStatus.req_task = current_task() req_err: BaseException|None = None try: - from tractor.discovery._discovery import get_root + from tractor.discovery._api import get_root # NOTE: we need this to ensure that this task exits # BEFORE the REPl instance raises an error like # `bdb.BdbQuit` directly, OW you get a trio cs stack diff --git a/tractor/discovery/__init__.py b/tractor/discovery/__init__.py index 13e10b0a..93c19e62 100644 --- a/tractor/discovery/__init__.py +++ b/tractor/discovery/__init__.py @@ -21,7 +21,7 @@ and location management of (service) actors. NOTE: to avoid circular imports, this ``__init__`` does NOT eagerly import submodules. Use direct module paths like ``tractor.discovery._addr`` or -``tractor.discovery._discovery`` instead. +``tractor.discovery._api`` instead. ''' from ._multiaddr import ( diff --git a/tractor/discovery/_discovery.py b/tractor/discovery/_api.py similarity index 100% rename from tractor/discovery/_discovery.py rename to tractor/discovery/_api.py diff --git a/tractor/ipc/_server.py b/tractor/ipc/_server.py index 6cfbf474..3fd965c5 100644 --- a/tractor/ipc/_server.py +++ b/tractor/ipc/_server.py @@ -274,7 +274,7 @@ async def maybe_wait_on_canced_subs( # ephemeral `.register_actor()` request! # -[ ] also, that should be avoidable by # re-using any existing chan from the - # `._discovery.get_registry()` call as + # `._api.get_registry()` call as # well.. log.runtime( f'Peer IPC broke but subproc is alive?\n\n' diff --git a/tractor/runtime/_runtime.py b/tractor/runtime/_runtime.py index 618d33da..210d489c 100644 --- a/tractor/runtime/_runtime.py +++ b/tractor/runtime/_runtime.py @@ -115,7 +115,7 @@ from ..devx import ( debug, pformat as _pformat ) -from ..discovery._discovery import get_registry +from ..discovery._api import get_registry from ._portal import Portal from . import _state from ..spawn import _mp_fixup_main