You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(utilities): the threading excepthook falls back to threading.__excepthook__, which Python 3.8 and 3.9 lack #1691
Describe the bug threading.__excepthook__ was added in Python 3.10, but requires-python is >=3.6. Two library lines call it:
pcapkit/utilities/exceptions.py:355, the re-entrancy fallback.
pcapkit/utilities/exceptions.py:371, when no previous hook was saved.
On 3.8 and 3.9 the fallback therefore raises AttributeError: module 'threading' has no attribute '__excepthook__' from inside threading.excepthook. The tests use it as well, at tests/utilities/test_exceptions_excepthook.py:546, :606 and :651.
Reproduction
Four ThreadingExcepthookTests tests fail on both legs.
Library: test_a_reentrant_threading_delegate_falls_back_instead_of_recursing. The traceback ends at exceptions.py:355.
Test-side, where the library delegates correctly and PREVIOUS_THREADING_HOOK_RAN prints first:
Expected behavior
Before 3.10, fall back to the default hook that threading.excepthook held at import, in the library and in the tests alike.
Found while triaging main's KTLO legs at f20d0a600: Python 3.8 (KTLO) job 115570853800 (27 failed) and Python 3.9 (KTLO) job 115570853966 (9 failed). Since #1672, KTLO legs exit 0, so this shows only as a ::warning. Reproduced locally on CPython 3.8.20 and 3.9.25.
Activity
fix(utilities): fall back to the default threading excepthook before …
fix(utilities): fall back to the default threading excepthook before …