https://github.com/python/cpython/commit/d733a1ed7738c1498703f4c5d2f04f39c156659e
commit: d733a1ed7738c1498703f4c5d2f04f39c156659e
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2025-07-12T16:16:19Z
summary:

[3.13] gh-136549: Fix signature of threading.excepthook() (GH-136559) 
(GH-136590)

(cherry picked from commit be2c3d284ecce67474a260b8c37e2f1e0628a9cf)

Co-authored-by: Serhiy Storchaka <[email protected]>

files:
A Misc/NEWS.d/next/Library/2025-07-11-23-04-39.gh-issue-136549.oAi8u4.rst
M Lib/test/test_inspect/test_inspect.py
M Modules/_threadmodule.c

diff --git a/Lib/test/test_inspect/test_inspect.py 
b/Lib/test/test_inspect/test_inspect.py
index d729447929f612..977c3d07252d04 100644
--- a/Lib/test/test_inspect/test_inspect.py
+++ b/Lib/test/test_inspect/test_inspect.py
@@ -6004,6 +6004,7 @@ def test_sysconfig_module_has_signatures(self):
     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
index 00000000000000..f3050ad5d5aa10
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2025-07-11-23-04-39.gh-issue-136549.oAi8u4.rst
@@ -0,0 +1 @@
+Fix signature of :func:`threading.excepthook`.
diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c
index b390678854a850..3f9e0a948568ca 100644
--- a/Modules/_threadmodule.c
+++ b/Modules/_threadmodule.c
@@ -2314,7 +2314,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.");

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to