diff --git a/trio/_core/_tests/test_thread_cache.py b/trio/_core/_tests/test_thread_cache.py index 5f19a5ac64..3cf750ca4b 100644 --- a/trio/_core/_tests/test_thread_cache.py +++ b/trio/_core/_tests/test_thread_cache.py @@ -5,7 +5,7 @@ import sys from contextlib import contextmanager -from .tutil import slow, gc_collect_harder, disable_threading_excepthook +from .tutil import slow, gc_collect_harder from .. import _thread_cache from .._thread_cache import start_thread_soon, ThreadCache diff --git a/trio/_core/_tests/tutil.py b/trio/_core/_tests/tutil.py index e66127d20a..31bc59e4cb 100644 --- a/trio/_core/_tests/tutil.py +++ b/trio/_core/_tests/tutil.py @@ -95,19 +95,6 @@ def restore_unraisablehook(): sys.unraisablehook = prev -@contextmanager -def disable_threading_excepthook(): # pragma: no cover # not used - if sys.version_info >= (3, 10): - threading.excepthook, prev = threading.__excepthook__, threading.excepthook - else: - threading.excepthook, prev = _noop, threading.excepthook - - try: - yield - finally: - threading.excepthook = prev - - # template is like: # [1, {2.1, 2.2}, 3] -> matches [1, 2.1, 2.2, 3] or [1, 2.2, 2.1, 3] def check_sequence_matches(seq, template):