forked from goodboy/tractor
1
0
Fork 0

Hide `._entry`/`._child` frames, tweak some more type annots

runtime_to_msgspec
Tyler Goodlet 2024-04-14 17:49:18 -04:00
parent 2edfed75eb
commit f72b972348
4 changed files with 8 additions and 6 deletions

View File

@ -36,6 +36,7 @@ def parse_ipaddr(arg):
if __name__ == "__main__": if __name__ == "__main__":
__tracebackhide__: bool = True
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument("--uid", type=parse_uid) parser.add_argument("--uid", type=parse_uid)

View File

@ -106,6 +106,7 @@ def _trio_main(
Entry point for a `trio_run_in_process` subactor. Entry point for a `trio_run_in_process` subactor.
''' '''
__tracebackhide__: bool = True
_state._current_actor = actor _state._current_actor = actor
trio_main = partial( trio_main = partial(
async_main, async_main,

View File

@ -513,7 +513,7 @@ async def trio_proc(
# }) # })
# track subactor in current nursery # track subactor in current nursery
curr_actor = current_actor() curr_actor: Actor = current_actor()
curr_actor._actoruid2nursery[subactor.uid] = actor_nursery curr_actor._actoruid2nursery[subactor.uid] = actor_nursery
# resume caller at next checkpoint now that child is up # resume caller at next checkpoint now that child is up

View File

@ -119,11 +119,11 @@ class ActorNursery:
name: str, name: str,
*, *,
bind_addrs: list[tuple[str, int]] = [_default_bind_addr], bind_addrs: list[tuple[str, int]] = [_default_bind_addr],
rpc_module_paths: list[str] | None = None, rpc_module_paths: list[str]|None = None,
enable_modules: list[str] | None = None, enable_modules: list[str]|None = None,
loglevel: str | None = None, # set log level per subactor loglevel: str|None = None, # set log level per subactor
nursery: trio.Nursery | None = None, nursery: trio.Nursery|None = None,
debug_mode: bool | None = None, debug_mode: bool|None = None,
infect_asyncio: bool = False, infect_asyncio: bool = False,
) -> Portal: ) -> Portal:
''' '''