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__":
__tracebackhide__: bool = True
parser = argparse.ArgumentParser()
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.
'''
__tracebackhide__: bool = True
_state._current_actor = actor
trio_main = partial(
async_main,

View File

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

View File

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