Make thread excepthook portable and support chaining

Make thread excepthook portable and support chaining
Fix pyproject.toml license format deprecation warning
Resolves: RHEL-192970

Signed-off-by: John Kacur <jkacur@redhat.com>
This commit is contained in:
John Kacur 2026-07-07 16:41:39 -04:00
parent 0a28422f19
commit 85e45d8445
3 changed files with 56 additions and 1 deletions

View File

@ -0,0 +1,11 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -18,7 +18,7 @@ analyze for standard statistical measurements (i.e mode, median, range,
mean, variance and standard deviation) and a report is generated.
""", content-type = "text/plain"}
requires-python = ">=3.10"
-license = {text = "GPL-2.0-or-later"}
+license = "GPL-2.0-or-later"
dependencies = [
"lxml",
"requests",

View File

@ -0,0 +1,37 @@
From 656f8e6466a3950ff2747389d0202a3815c21a5c Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Tue, 7 Jul 2026 14:07:05 -0400
Subject: [PATCH] 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.
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/__init__.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/rteval/__init__.py b/rteval/__init__.py
index 2eadb2045e2b..6e49889a6d67 100644
--- a/rteval/__init__.py
+++ b/rteval/__init__.py
@@ -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()
--
2.54.0

View File

@ -1,6 +1,6 @@
Name: rteval
Version: 3.10
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Utility to evaluate system suitability for RT Linux
Group: Development/Tools
@ -33,6 +33,8 @@ Requires: rtla
BuildArch: noarch
#Patches
Patch1: rteval-Make-thread-excepthook-portable-and-support-c.patch
Patch2: rteval-3.10-fix-pyproject-license.patch
%description
The rteval script is a utility for measuring various aspects of
@ -66,6 +68,11 @@ to the screen.
%{_bindir}/rteval
%changelog
* Tue Jul 07 2026 John Kacur <jkacur@redhat.com> - 3.10-2
- Make thread excepthook portable and support chaining
- Fix pyproject.toml license format deprecation warning
Resolves: RHEL-192970
* Wed Nov 19 2025 John Kacur <jkacur@redhat.com> - 3.10-1
- Rebase to upstream rteval-3.10
Resolves: RHEL-82914, RHEL-111000, RHEL-114928