rteval: Make thread excepthook portable and support chaining
PATCH 1/1 rteval: Make thread excepthook portable and support chaining
Replace the direct use of threading.__excepthook__ with the original threading.excepthook captured at module initialization. This enables compatibility with Python versions 3.8 and 3.9 (where __excepthook__ is not defined) and preserves any custom exception hooks registered by test runners or parent programs.
--- rteval/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
rteval/__init__.py +2 -1
@@ -41,10 +41,11 @@ def sig_handler(signum, frame): else: raise RuntimeError(f"SIGNAL received! ({signum})") +orig_excepthook = threading.excepthook def except_hook(args): global threaderr - threading.__excepthook__(args) + orig_excepthook(args) threaderr = True stopsig.set()
base-commit: 6b38190d2d66968b637dada5c8af9226ca8a7a5b
Signature · 1 line
2.55.0
PATCH 1/1 rteval: Make thread excepthook portable and support chaining
Replace the direct use of threading.__excepthook__ with the original threading.excepthook captured at module initialization. This enables compatibility with Python versions 3.8 and 3.9 (where __excepthook__ is not defined) and preserves any custom exception hooks registered by test runners or parent programs.
--- rteval/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
rteval/__init__.py +2 -1
@@ -41,10 +41,11 @@ def sig_handler(signum, frame): else: raise RuntimeError(f"SIGNAL received! ({signum})") +orig_excepthook = threading.excepthook def except_hook(args): global threaderr - threading.__excepthook__(args) + orig_excepthook(args) threaderr = True stopsig.set()
Signature · 1 line
2.54.0