forked from goodboy/tractor
Since it turns out there's even case(s) in `trio` core that are guilty (of implementing things like checkpoints in exc handlers), this adds facility for ignoring explicit cases via `inspect.FrameInfo` field matching from the unmasked `exc_ctx` within `maybe_raise_from_masking_exc()`. Impl deats, - use `inspect.getinnerframes()/getmodule()` to extract the equivalent "guilty place in code" which raised the masked error which we'd like to ignore and **not unmask**. - start a `_mask_cases: dict` which describes the entries to ignore by matching against a specific `FrameInfo`'s fields from indexed from `getinnerframes()`. - describe in that table the case i hit with `trio.WouldBlock` being always masked by a `Cancelled` due to way `trio.Lock.acquire()` implements the blocking case in the would-block handler.. - always call into a new `is_expected_masking_case()` predicate (from `maybe_raise_from_masking_exc()`) on matching `exc_ctx` types. |
||
|---|---|---|
| .. | ||
| _testing | ||
| devx | ||
| experimental | ||
| ipc | ||
| msg | ||
| trionics | ||
| __init__.py | ||
| _addr.py | ||
| _child.py | ||
| _clustering.py | ||
| _context.py | ||
| _discovery.py | ||
| _entry.py | ||
| _exceptions.py | ||
| _forkserver_override.py | ||
| _mp_fixup_main.py | ||
| _multiaddr.py | ||
| _portal.py | ||
| _root.py | ||
| _rpc.py | ||
| _runtime.py | ||
| _spawn.py | ||
| _state.py | ||
| _streaming.py | ||
| _supervise.py | ||
| log.py | ||
| to_asyncio.py | ||