tractor/tractor
Tyler Goodlet 534e5d150d Drop `msg` kwarg from `Context.cancel()`
Well first off, turns out it's never used and generally speaking
doesn't seem to help much with "runtime hacking/debugging"; why would
we need to "fabricate" a msg when `.cancel()` is called to self-cancel?

Also (and since `._maybe_cancel_and_set_remote_error()` now takes an
`error: BaseException` as input and thus expects error-msg unpacking
prior to being called), we now manually set `Context._cancel_msg: dict`
just prior to any remote error assignment - so any case where we would
have fabbed a "cancel msg" near calling `.cancel()`, just do the manual
assign.

In this vein some other subtle changes:
- obviously don't set `._cancel_msg` in `.cancel()` since it's no longer
  an input.
- generally do walrus-style `error := unpack_error()` before applying
  and setting remote error-msg state.
- always raise any `._remote_error` in `.result()` instead of returning
  the exception instance and check before AND after the underlying mem
  chan read.
- add notes/todos around `raise self._remote_error from None` masking of
  (runtime) errors in `._maybe_raise_remote_err()` and use it inside
  `.result()` since we had the inverse duplicate logic there anyway..

Further, this adds and extends a ton of (internal) interface docs and
details comments around the `Context` API including many subtleties
pertaining to calling `._maybe_cancel_and_set_remote_error()`.
2023-10-17 16:50:52 -04:00
..
devx Ignore kbis in `open_crash_handler()` by default 2023-10-16 15:45:34 -04:00
experimental Move move context code into new `._context` mod 2023-05-15 10:00:45 -04:00
trionics Mk `gather_contexts()` support `@acm`s yielding `None` 2023-09-27 14:05:22 -04:00
__init__.py Add comments around diff between `C/context` refs 2023-10-16 15:45:02 -04:00
_child.py Rename our core module to `_runtime` 2022-09-15 23:41:28 -04:00
_clustering.py Passthrough runtime kwargs from `open_actor_cluster()` 2022-12-11 19:56:08 -05:00
_context.py Drop `msg` kwarg from `Context.cancel()` 2023-10-17 16:50:52 -04:00
_discovery.py Init-support for "multi homed" transports 2023-09-27 16:25:21 -04:00
_entry.py Init-support for "multi homed" transports 2023-09-27 16:25:21 -04:00
_exceptions.py `._exceptions`: typing and error unpacking updates 2023-10-16 16:23:30 -04:00
_forkserver_override.py Re-license code base for distribution under AGPL 2021-12-14 23:33:27 -05:00
_ipc.py Init-support for "multi homed" transports 2023-09-27 16:25:21 -04:00
_mp_fixup_main.py Avoid importing mp for as long as possible 2022-02-17 11:55:26 -05:00
_multiaddr.py Rename to `parse_maddr()` and fill out doc strings 2023-09-29 14:49:18 -04:00
_portal.py Write more comprehensive `Portal.cancel_actor()` doc str 2023-10-08 15:57:18 -04:00
_root.py Oof, default reg addrs needs to be in `list[tuple]` form.. 2023-10-07 18:52:37 -04:00
_runtime.py Runtime level log on debug REPL exits 2023-10-16 15:46:21 -04:00
_shm.py Updates from latest `piker.data._sharedmem` changes 2023-06-22 17:16:17 -04:00
_spawn.py Kick off `.devx` subpkg for our dev tools B) 2023-09-28 14:14:50 -04:00
_state.py Move `NoRuntime` import inside `current_actor()` to avoid cycle 2023-05-15 10:00:45 -04:00
_streaming.py Factor non-yield stream msg processing into helper 2023-10-16 15:35:16 -04:00
_supervise.py Kick off `.devx` subpkg for our dev tools B) 2023-09-28 14:14:50 -04:00
log.py .log: more correct handling for `get_logger(__name__)` usage 2023-07-07 14:48:37 -04:00
msg.py Make `NamespacePath` work on object refs 2023-07-12 13:07:30 -04:00
to_asyncio.py Move `.to_asyncio` to modern optional value type annots 2023-07-21 15:08:46 -04:00