From 1958f3ec67cf624c76c8a85c3471c56ddf8c4150 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Wed, 2 Dec 2020 15:58:52 +0200 Subject: [PATCH] threading: properly export excepthook, ExceptHookArgs (#4797) 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 c262e3a77..625ec7b5c 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 c262e3a77..625ec7b5c 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,):