2021-02-24 18:39:14 +00:00
|
|
|
import trio
|
2020-10-04 13:54:36 +00:00
|
|
|
import tractor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async def name_error():
|
2024-05-28 13:22:59 +00:00
|
|
|
getattr(doggypants) # noqa (on purpose)
|
2020-10-04 13:54:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
async def main():
|
2021-02-24 18:39:14 +00:00
|
|
|
async with tractor.open_nursery(
|
|
|
|
|
debug_mode=True,
|
2024-05-28 13:22:59 +00:00
|
|
|
) as an:
|
2020-10-04 13:54:36 +00:00
|
|
|
|
2024-05-28 13:22:59 +00:00
|
|
|
# TODO: ideally the REPL arrives at this frame in the parent,
|
|
|
|
|
# ABOVE the @api_frame of `Portal.run_in_actor()` (which
|
|
|
|
|
# should eventually not even be a portal method ... XD)
|
|
|
|
|
# await tractor.pause()
|
|
|
|
|
p: tractor.Portal = await an.run_in_actor(name_error)
|
|
|
|
|
|
|
|
|
|
# with this style, should raise on this line
|
Fix review nits from PR #460 self-review
Address the actionable findings from the `/code-review` pass
(#1-6); the d2-ext + docstring nits (#7-10) are left for a
follow-up.
Deats,
- `uds_transport_actor_tree.py`: `portal.chan.raddr.sockpath` is
the *shared listener* socket (named for the root registrar), NOT
the child's path — relabel it + lead with the per-child peer pid,
and stop claiming it's the child addr in the docstring,
- `docs.yml`: scope the `pages` `concurrency` group to the `deploy`
job w/ `cancel-in-progress: false` so a PR build can't cancel an
in-flight production deploy,
- `architecture.rst`: `'subint'` is not a selectable `start_method`
on this branch (`SpawnMethodKey` lacks it) — reframe as
in-development/roadmap,
- `context.rst`: `StreamOverrun` isn't re-exported from `tractor`;
point at `tractor._exceptions`,
- `debugging/`: sweep the 3 literalinclude'd examples off the
deprecated `.result()` -> `.wait_for_result()`,
- `quickstart.rst`: proc-title is `name@pid` (per `Aid.reprol`),
not `@uuid`.
NOTE, the `debugging/` examples are pexpect-tested; re-run
`tests/devx/test_debugger.py` for them.
(this patch was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-06-25 21:07:44 +00:00
|
|
|
await p.wait_for_result()
|
2024-05-28 13:22:59 +00:00
|
|
|
|
|
|
|
|
# with this alt style should raise at `open_nusery()`
|
Fix review nits from PR #460 self-review
Address the actionable findings from the `/code-review` pass
(#1-6); the d2-ext + docstring nits (#7-10) are left for a
follow-up.
Deats,
- `uds_transport_actor_tree.py`: `portal.chan.raddr.sockpath` is
the *shared listener* socket (named for the root registrar), NOT
the child's path — relabel it + lead with the per-child peer pid,
and stop claiming it's the child addr in the docstring,
- `docs.yml`: scope the `pages` `concurrency` group to the `deploy`
job w/ `cancel-in-progress: false` so a PR build can't cancel an
in-flight production deploy,
- `architecture.rst`: `'subint'` is not a selectable `start_method`
on this branch (`SpawnMethodKey` lacks it) — reframe as
in-development/roadmap,
- `context.rst`: `StreamOverrun` isn't re-exported from `tractor`;
point at `tractor._exceptions`,
- `debugging/`: sweep the 3 literalinclude'd examples off the
deprecated `.result()` -> `.wait_for_result()`,
- `quickstart.rst`: proc-title is `name@pid` (per `Aid.reprol`),
not `@uuid`.
NOTE, the `debugging/` examples are pexpect-tested; re-run
`tests/devx/test_debugger.py` for them.
(this patch was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-06-25 21:07:44 +00:00
|
|
|
# return await p.wait_for_result()
|
2020-10-04 13:54:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2021-02-24 18:39:14 +00:00
|
|
|
trio.run(main)
|