summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/concurrent/futures/__init__.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/concurrent/futures/__init__.py b/Lib/concurrent/futures/__init__.py
index 72aca818d3..8434fcf4b5 100644
--- a/Lib/concurrent/futures/__init__.py
+++ b/Lib/concurrent/futures/__init__.py
@@ -40,11 +40,13 @@ def __getattr__(name):
global ProcessPoolExecutor, ThreadPoolExecutor
if name == 'ProcessPoolExecutor':
- from .process import ProcessPoolExecutor
- return ProcessPoolExecutor
+ from .process import ProcessPoolExecutor as pe
+ ProcessPoolExecutor = pe
+ return pe
if name == 'ThreadPoolExecutor':
- from .thread import ThreadPoolExecutor
- return ThreadPoolExecutor
+ from .thread import ThreadPoolExecutor as te
+ ThreadPoolExecutor = te
+ return te
raise AttributeError(f"module {__name__} has no attribute {name}")