Skip to content

Commit d733a1e

Browse files
[3.13] gh-136549: Fix signature of threading.excepthook() (GH-136559) (GH-136590)
(cherry picked from commit be2c3d2) Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent 360540f commit d733a1e

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

Lib/test/test_inspect/test_inspect.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6004,6 +6004,7 @@ def test_sysconfig_module_has_signatures(self):
60046004
def test_threading_module_has_signatures(self):
60056005
import threading
60066006
self._test_module_has_signatures(threading)
6007+
self.assertIsNotNone(inspect.signature(threading.__excepthook__))
60076008

60086009
def test_thread_module_has_signatures(self):
60096010
import _thread
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix signature of :func:`threading.excepthook`.

Modules/_threadmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2314,7 +2314,7 @@ thread_excepthook(PyObject *module, PyObject *args)
23142314
}
23152315

23162316
PyDoc_STRVAR(excepthook_doc,
2317-
"_excepthook($module, (exc_type, exc_value, exc_traceback, thread), /)\n\
2317+
"_excepthook($module, args, /)\n\
23182318
--\n\
23192319
\n\
23202320
Handle uncaught Thread.run() exception.");

0 commit comments

Comments
 (0)