Update `tractor` private-API refs across codebase
Port internal `tractor._<mod>` references to their new public or reorganized paths after `tractor` refactored its subpkg layout. Deats, - `tractor._portal.Portal` -> `tractor.Portal`. - `tractor._supervise.ActorNursery` -> `tractor.ActorNursery`. - `tractor._multiaddr` -> `tractor.discovery._multiaddr`. - `tractor._addr` -> `tractor.discovery._addr`. - `tractor._state._runtime_vars` -> `tractor.runtime._state._runtime_vars`. - `tractor._state.is_debug_mode()` -> `tractor.runtime._state.is_debug_mode()`. Files touched: `brokers/data.py`, `cli/__init__.py`, `data/feed.py`, `service/_actor_runtime.py`, `service/_mngr.py`, `storage/cli.py`, `tsp/_annotate.py`, `ui/kivy/monitor.py`, `ui/kivy/option_chain.py`. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-coderepair_tests
parent
94ac2ee82a
commit
611597ee18
|
|
@ -425,7 +425,7 @@ class DataFeed:
|
||||||
async def stream_to_file(
|
async def stream_to_file(
|
||||||
watchlist_name: str,
|
watchlist_name: str,
|
||||||
filename: str,
|
filename: str,
|
||||||
portal: tractor._portal.Portal,
|
portal: tractor.Portal,
|
||||||
tickers: List[str],
|
tickers: List[str],
|
||||||
brokermod: ModuleType,
|
brokermod: ModuleType,
|
||||||
rate: int,
|
rate: int,
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ from types import ModuleType
|
||||||
import click
|
import click
|
||||||
import trio
|
import trio
|
||||||
import tractor
|
import tractor
|
||||||
from tractor._multiaddr import parse_maddr
|
from tractor.discovery._multiaddr import parse_maddr
|
||||||
|
|
||||||
from ..log import (
|
from ..log import (
|
||||||
get_console_log,
|
get_console_log,
|
||||||
|
|
@ -345,7 +345,7 @@ def services(
|
||||||
if not ports:
|
if not ports:
|
||||||
ports: list[int] = [_default_registry_port]
|
ports: list[int] = [_default_registry_port]
|
||||||
|
|
||||||
addr = tractor._addr.wrap_address(
|
addr = tractor.discovery._addr.wrap_address(
|
||||||
addr=(host, ports[0])
|
addr=(host, ports[0])
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ from ._sampling import (
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from .flows import Flume
|
from .flows import Flume
|
||||||
from tractor._addr import Address
|
from tractor.discovery._addr import Address
|
||||||
from tractor.msg.types import Aid
|
from tractor.msg.types import Aid
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ async def open_piker_runtime(
|
||||||
try:
|
try:
|
||||||
actor = tractor.current_actor()
|
actor = tractor.current_actor()
|
||||||
except tractor._exceptions.NoRuntime:
|
except tractor._exceptions.NoRuntime:
|
||||||
tractor._state._runtime_vars[
|
tractor.runtime._state._runtime_vars[
|
||||||
'piker_vars'
|
'piker_vars'
|
||||||
] = tractor_runtime_overrides
|
] = tractor_runtime_overrides
|
||||||
|
|
||||||
|
|
@ -264,7 +264,7 @@ async def maybe_open_pikerd(
|
||||||
**kwargs,
|
**kwargs,
|
||||||
|
|
||||||
) -> (
|
) -> (
|
||||||
tractor._portal.Portal
|
tractor.Portal
|
||||||
|ClassVar[Services]
|
|ClassVar[Services]
|
||||||
):
|
):
|
||||||
'''
|
'''
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ log = get_logger(name=__name__)
|
||||||
# new actors and supervises them to completion?
|
# new actors and supervises them to completion?
|
||||||
class Services:
|
class Services:
|
||||||
|
|
||||||
actor_n: tractor._supervise.ActorNursery
|
actor_n: tractor.ActorNursery
|
||||||
service_n: trio.Nursery
|
service_n: trio.Nursery
|
||||||
debug_mode: bool # tractor sub-actor debug mode flag
|
debug_mode: bool # tractor sub-actor debug mode flag
|
||||||
service_tasks: dict[
|
service_tasks: dict[
|
||||||
|
|
|
||||||
|
|
@ -306,7 +306,7 @@ def ldshm(
|
||||||
# TODO: call null-seg fixer somehow?
|
# TODO: call null-seg fixer somehow?
|
||||||
if null_segs:
|
if null_segs:
|
||||||
|
|
||||||
if tractor._state.is_debug_mode():
|
if tractor.runtime._state.is_debug_mode():
|
||||||
await tractor.pause()
|
await tractor.pause()
|
||||||
# async with (
|
# async with (
|
||||||
# trio.open_nursery() as tn,
|
# trio.open_nursery() as tn,
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ async def markup_gaps(
|
||||||
prev_r: pl.DataFrame = prev_row_by_i
|
prev_r: pl.DataFrame = prev_row_by_i
|
||||||
|
|
||||||
# debug any missing pre-row
|
# debug any missing pre-row
|
||||||
if tractor._state.is_debug_mode():
|
if tractor.runtime._state.is_debug_mode():
|
||||||
await tractor.pause()
|
await tractor.pause()
|
||||||
|
|
||||||
istart: int = prev_r['index'][0]
|
istart: int = prev_r['index'][0]
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ async def stream_symbol_selection():
|
||||||
|
|
||||||
async def _async_main(
|
async def _async_main(
|
||||||
name: str,
|
name: str,
|
||||||
portal: tractor._portal.Portal,
|
portal: tractor.Portal,
|
||||||
symbols: List[str],
|
symbols: List[str],
|
||||||
brokermod: ModuleType,
|
brokermod: ModuleType,
|
||||||
loglevel: str = 'info',
|
loglevel: str = 'info',
|
||||||
|
|
|
||||||
|
|
@ -436,7 +436,7 @@ class OptionChain(object):
|
||||||
|
|
||||||
|
|
||||||
async def new_chain_ui(
|
async def new_chain_ui(
|
||||||
portal: tractor._portal.Portal,
|
portal: tractor.Portal,
|
||||||
symbol: str,
|
symbol: str,
|
||||||
brokermod: types.ModuleType,
|
brokermod: types.ModuleType,
|
||||||
rate: int = 1,
|
rate: int = 1,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue