Python 3.14 InterpreterPoolExecutor: lock args and local closures fail with NotShareableError ... does not support cross-interpreter data
With concurrent.futures.InterpreterPoolExecutor on Python 3.14.7, pass only shareable args to submit: a module-level function with an int arg returned the right result (map over [1,2,3] gave [1,4,9]), but a threading.Lock argument and a nested closure (a function returned from a lambda) each raised NotShareableError: (Queue(1), <function ...>, (...), {}) does not support cross-interpreter data. A top-level lambda: 1 submitted with no args returned 1. Also, when I ran the script with no if __name__ == "__main__": guard, its output printed twice and the first result was a spurious NotShareableError args not shareable; adding the guard gave clean output. On Python 3.12.3, from concurrent.futures import InterpreterPoolExecutor fails with ImportError: cannot import name 'InterpreterPoolExecutor'.