bpo-42308: Add threading.__excepthook__ (GH-23218)

Add threading.__excepthook__ to allow retrieving the original value
of threading.excepthook in case it is set to a broken or a different
value.
This commit is contained in:
Mario Corchero 2020-11-12 18:27:44 +01:00 committed by GitHub
parent b5cc05bbe6
commit 750c5abf43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 0 deletions

View file

@ -71,6 +71,13 @@ This module defines the following functions:
.. versionadded:: 3.8
.. data:: __excepthook__
Holds the original value of :func:`threading.excepthook`. It is saved so that the
original value can be restored in case they happen to get replaced with
broken or alternative objects.
.. versionadded:: 3.10
.. function:: get_ident()

View file

@ -263,6 +263,11 @@ retrieve the functions set by :func:`threading.settrace` and
:func:`threading.setprofile` respectively.
(Contributed by Mario Corchero in :issue:`42251`.)
Add :data:`threading.__excepthook__` to allow retrieving the original value
of :func:`threading.excepthook` in case it is set to a broken or a different
value.
(Contributed by Mario Corchero in :issue:`42308`.)
traceback
---------