Drop uneeded backframe traceback hide annotation

sigint_ignore_in_pdb_repl
Tyler Goodlet 2022-02-14 10:30:55 -05:00
parent f8494de478
commit ee3dc5123f
1 changed files with 1 additions and 9 deletions

View File

@ -259,16 +259,11 @@ async def _hijack_stdin_for_child(
orig_handler = signal.signal( orig_handler = signal.signal(
signal.SIGINT, signal.SIGINT,
shield_sigint, shield_sigint,
# partial(shield_sigint, pdb=pdb),
) )
# try:
# yield
try: try:
with ( with (
trio.CancelScope(shield=True), trio.CancelScope(shield=True),
# disable_sigint(),
): ):
try: try:
lock = None lock = None
async with _acquire_debug_lock(subactor_uid) as lock: async with _acquire_debug_lock(subactor_uid) as lock:
@ -584,10 +579,6 @@ def shield_sigint(
''' '''
__tracebackhide__ = True __tracebackhide__ = True
frame = sys._getframe()
last_f = frame.f_back
last_f.f_globals['__tracebackhide__'] = True
global _local_task_in_debug, _global_actor_in_debug global _local_task_in_debug, _global_actor_in_debug
in_debug = _global_actor_in_debug in_debug = _global_actor_in_debug
@ -604,6 +595,7 @@ def shield_sigint(
log.pdb( log.pdb(
f"Ignoring SIGINT while child in debug mode: `{in_debug}`" f"Ignoring SIGINT while child in debug mode: `{in_debug}`"
) )
else: else:
log.pdb( log.pdb(
"Ignoring SIGINT while in debug mode" "Ignoring SIGINT while in debug mode"