]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-136549: Fix signature of threading.excepthook() (GH-136559) (GH-136589)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 12 Jul 2025 16:18:23 +0000 (18:18 +0200)
committerGitHub <noreply@github.com>
Sat, 12 Jul 2025 16:18:23 +0000 (16:18 +0000)
(cherry picked from commit be2c3d284ecce67474a260b8c37e2f1e0628a9cf)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_inspect/test_inspect.py
Misc/NEWS.d/next/Library/2025-07-11-23-04-39.gh-issue-136549.oAi8u4.rst [new file with mode: 0644]
Modules/_threadmodule.c

index 55942c2823c4920ce8c9b779ce01a3603b054924..0a8926e00cf8b9704a698a99d6873a4bd49a1f22 100644 (file)
@@ -5916,6 +5916,7 @@ class TestSignatureDefinitions(unittest.TestCase):
     def test_threading_module_has_signatures(self):
         import threading
         self._test_module_has_signatures(threading)
+        self.assertIsNotNone(inspect.signature(threading.__excepthook__))
 
     def test_thread_module_has_signatures(self):
         import _thread
diff --git a/Misc/NEWS.d/next/Library/2025-07-11-23-04-39.gh-issue-136549.oAi8u4.rst b/Misc/NEWS.d/next/Library/2025-07-11-23-04-39.gh-issue-136549.oAi8u4.rst
new file mode 100644 (file)
index 0000000..f3050ad
--- /dev/null
@@ -0,0 +1 @@
+Fix signature of :func:`threading.excepthook`.
index 73dfb9438450957c9c7da857626ba87a42df22fe..121b0f803715af3ae5aabf28a6b9e3af1f561584 100644 (file)
@@ -2317,7 +2317,7 @@ thread_excepthook(PyObject *module, PyObject *args)
 }
 
 PyDoc_STRVAR(excepthook_doc,
-"_excepthook($module, (exc_type, exc_value, exc_traceback, thread), /)\n\
+"_excepthook($module, args, /)\n\
 --\n\
 \n\
 Handle uncaught Thread.run() exception.");