threading: properly export excepthook, ExceptHookArgs (#4797)

An `import X as Y` where X != Y no longer exports, so
27a45df479 caused them to be un-exported.
This commit is contained in:
Ran Benita
2020-12-02 15:58:52 +02:00
committed by GitHub
parent 906b4ec5ba
commit 1958f3ec67
2 changed files with 8 additions and 2 deletions

View File

@@ -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,):

View File

@@ -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,):