Compare commits

..

1 Commits

Author SHA1 Message Date
Tyler Goodlet 4fca7317ea Add `typing_extensions`, it's a sub-dep of `stackscope`?
Oddly my env was borked bc this (apparently missed by `uv`?) sub-dep
wasn't installed and then `stackscope` was silently failing import and
caused the shield-pause test to also fail (since it couldn't match the
expected `log.devx()` on console). The import failure is not very
explanatory due to the `log.warning()`; change it to `.error()` level.

Also, explicitly import `_sync_pause_from_builtin` in
`examples/debugging/restore_builtin_breakpoint.py` to ensure the ref is
exported properly from `.devx.debug` (which it wasn't during dev of the
prior commit Bp).
2025-05-15 15:08:21 -04:00
3 changed files with 2 additions and 13 deletions

View File

@ -237,7 +237,7 @@ def enable_stack_on_sig(
try:
import stackscope
except ImportError:
log.error(
log.warning(
'`stackscope` not installed for use in debug mode!'
)
return None

View File

@ -144,7 +144,6 @@ def _post_mortem(
__tracebackhide__: bool = hide_tb
with _maybe_open_repl_fixture(
repl=repl,
repl_fixture=repl_fixture,
boxed_maybe_exc=boxed_maybe_exc,
) as enter_repl:

View File

@ -90,7 +90,6 @@ if TYPE_CHECKING:
Actor,
)
from ._post_mortem import BoxedMaybeException
from ._repl import PdbREPL
log = get_logger(__package__)
@ -110,11 +109,6 @@ _repl_fail_msg: str|None = (
# |_https://docs.python.org/3/library/contextlib.html#using-a-context-manager-as-a-function-decorator
@cm
def _maybe_open_repl_fixture(
repl: PdbREPL,
# ^XXX **always provided** by the low-level REPL-invoker,
# - _post_mortem()
# - _pause()
repl_fixture: (
AbstractContextManager[bool]
|None
@ -140,10 +134,7 @@ def _maybe_open_repl_fixture(
repl_fixture
or
rt_repl_fixture
)(
repl=repl,
maybe_bxerr=boxed_maybe_exc
)
)(maybe_bxerr=boxed_maybe_exc)
with _repl_fixture as enter_repl:
@ -261,7 +252,6 @@ async def _pause(
# nonlocal repl_fixture
with _maybe_open_repl_fixture(
repl=repl,
repl_fixture=repl_fixture,
) as enter_repl:
if not enter_repl: