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

@ -1200,6 +1200,10 @@ except ImportError:
stderr.flush()
# Original value of threading.excepthook
__excepthook__ = excepthook
def _make_invoke_excepthook():
# Create a local namespace to ensure that variables remain alive
# when _invoke_excepthook() is called, even if it is called late during