1
0
Fork 0
tractor/tractor
Tyler Goodlet 343b7c9712 Even moar bitty `Context` refinements
- set `._state._ctxvar_Context` just after `StartAck` inside
  `open_context_from_portal()` so that `current_ipc_ctx()` always
  works on the 'parent' side.
- always set `.canceller` to any `MsgTypeError.src_uid` and otherwise to
  any maybe-detected `.src_uid` (i.e. for RAEs).
- always set `.canceller` to us when we rx a ctxc which reports us as
  its canceller; this is a sanity check on definite "self cancellation".
- adjust `._is_self_cancelled()` logic to only be `True` when
  `._remote_error` is both a ctxc with a `.canceller` set to us AND
  when `Context.canceller` is also set to us (since the change above)
  as a little bit of extra rigor.
- fill-in/fix some `.repr_state` edge cases:
  - merge self-vs.-peer ctxc cases to one block and distinguish via
    nested `._is_self_cancelled()` check.
  - set 'errored' for all exception matched cases despite `.canceller`.
  - add pre-`Return` phase statuses:
   |_'pre-started' and 'syncing-to-child' depending on side and when
     `._stream` has not (yet) been set.
   |_'streaming' and 'streaming-finished' depending on side when
     `._stream` is set and whether it was stopped/closed.
- tweak drainage log-message to use "outcome" instead of "result".
- use new `.devx.pformat.pformat_cs()` inside `_maybe_cancel_and_set_remote_error()`
  but, IFF the log level is at least 'cancel'.
2024-05-08 14:02:56 -04:00
..
_testing Start a new `._testing.fault_simulation` 2024-04-03 10:19:50 -04:00
devx Move `_debug.pformat_cs()` into `devx.pformat` 2024-05-08 13:30:15 -04:00
experimental Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
msg Allow `Stop` passthrough from `PldRx.recv_msg_w_pld()` 2024-05-08 08:50:16 -04:00
trionics Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
__init__.py Expose `MsgTypeError` from pkg 2024-04-05 16:32:15 -04:00
_child.py Hide `._entry`/`._child` frames, tweak some more type annots 2024-04-14 17:49:18 -04:00
_clustering.py Passthrough runtime kwargs from `open_actor_cluster()` 2022-12-11 19:56:08 -05:00
_context.py Even moar bitty `Context` refinements 2024-05-08 14:02:56 -04:00
_discovery.py More spaceless union type annots 2024-03-11 10:33:06 -04:00
_entry.py "Icons" in `._entry`'s subactor `.info()` messages 2024-05-06 13:12:44 -04:00
_exceptions.py Change to `RemoteActorError.pformat()` 2024-05-06 13:01:56 -04:00
_forkserver_override.py Re-license code base for distribution under AGPL 2021-12-14 23:33:27 -05:00
_ipc.py Move `MsgTypeError` maker func to `._exceptions` 2024-04-22 18:24:02 -04:00
_mp_fixup_main.py Avoid importing mp for as long as possible 2022-02-17 11:55:26 -05:00
_multiaddr.py Fix doc string "its" typo.. 2023-11-06 15:44:21 -05:00
_portal.py Change to `RemoteActorError.pformat()` 2024-05-06 13:01:56 -04:00
_root.py Tweak `breakpoint()` usage error message 2024-04-30 12:56:29 -04:00
_rpc.py Add a "current IPC `Context`" `ContextVar` 2024-05-07 15:35:45 -04:00
_runtime.py Mk `process_messages()` return last msg; summary logging 2024-04-30 12:15:46 -04:00
_shm.py Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
_spawn.py Type annot the proc from `trio.lowlevel.open_process()` 2024-04-30 12:59:38 -04:00
_state.py Add a "current IPC `Context`" `ContextVar` 2024-05-07 15:35:45 -04:00
_streaming.py More bitty (runtime) logging tweaks 2024-04-26 13:13:04 -04:00
_supervise.py Annotate nursery and portal methods for `CallerInfo` scanning 2024-04-18 15:17:50 -04:00
log.py Add a `.log.at_least_level()` predicate 2024-05-08 13:33:59 -04:00
to_asyncio.py Provision for infected-`asyncio` debug mode support 2024-03-25 16:09:32 -04:00