Skip to content

Commit be2c3d2

Browse files
gh-136549: Fix signature of threading.excepthook() (GH-136559)
1 parent 5e1e21d commit be2c3d2

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
@@ -5916,6 +5916,7 @@ def test_sysconfig_module_has_signatures(self):
59165916
def test_threading_module_has_signatures(self):
59175917
import threading
59185918
self._test_module_has_signatures(threading)
5919+
self.assertIsNotNone(inspect.signature(threading.__excepthook__))
59195920

59205921
def test_thread_module_has_signatures(self):
59215922
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
@@ -2330,7 +2330,7 @@ thread_excepthook(PyObject *module, PyObject *args)
23302330
}
23312331

23322332
PyDoc_STRVAR(excepthook_doc,
2333-
"_excepthook($module, (exc_type, exc_value, exc_traceback, thread), /)\n\
2333+
"_excepthook($module, args, /)\n\
23342334
--\n\
23352335
\n\
23362336
Handle uncaught Thread.run() exception.");

0 commit comments

Comments
 (0)