diff --git a/Lib/concurrent/futures/interpreter.py b/Lib/concurrent/futures/interpreter.py index 310acc4de08b93..b85e437540a243 100644 --- a/Lib/concurrent/futures/interpreter.py +++ b/Lib/concurrent/futures/interpreter.py @@ -61,6 +61,7 @@ def prepare(cls, initializer, initargs, shared): elif initializer is not None: pickled = pickle.dumps((initializer, initargs)) initscript = f'''if True: + import pickle initializer, initargs = pickle.loads({pickled!r}) initializer(*initargs) '''