Skip to content

Commit

Permalink
remove disable_threading_excepthook
Browse files Browse the repository at this point in the history
  • Loading branch information
jakkdl committed Jun 25, 2023
1 parent 57ca1ac commit b4fdb17
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion trio/_core/_tests/test_thread_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 0 additions & 13 deletions trio/_core/_tests/tutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit b4fdb17

Please sign in to comment.