From 3e561c811db938e02db0340ab815d94109f276ba Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Wed, 2 Dec 2020 15:08:41 +0200 Subject: [PATCH] threading: properly export excepthook, ExceptHookArgs An `import X as Y` where X != Y no longer exports, so 27a45df479ff2685e376d04894fffdacc3fcaa7e caused them to be un-exported. --- stdlib/2and3/_dummy_threading.pyi | 5 ++++- stdlib/2and3/threading.pyi | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/stdlib/2and3/_dummy_threading.pyi b/stdlib/2and3/_dummy_threading.pyi index c262e3a77fd0..625ec7b5c4f6 100644 --- a/stdlib/2and3/_dummy_threading.pyi +++ b/stdlib/2and3/_dummy_threading.pyi @@ -155,7 +155,10 @@ class Event: def wait(self, timeout: Optional[float] = ...) -> bool: ... if sys.version_info >= (3, 8): - from _thread import _excepthook as excepthook, _ExceptHookArgs as ExceptHookArgs + from _thread import _excepthook, _ExceptHookArgs + + excepthook = _excepthook + ExceptHookArgs = _ExceptHookArgs class Timer(Thread): if sys.version_info >= (3,): diff --git a/stdlib/2and3/threading.pyi b/stdlib/2and3/threading.pyi index c262e3a77fd0..625ec7b5c4f6 100644 --- a/stdlib/2and3/threading.pyi +++ b/stdlib/2and3/threading.pyi @@ -155,7 +155,10 @@ class Event: def wait(self, timeout: Optional[float] = ...) -> bool: ... if sys.version_info >= (3, 8): - from _thread import _excepthook as excepthook, _ExceptHookArgs as ExceptHookArgs + from _thread import _excepthook, _ExceptHookArgs + + excepthook = _excepthook + ExceptHookArgs = _ExceptHookArgs class Timer(Thread): if sys.version_info >= (3,):