[issue41041] Multiprocesing Pool borken on macOS REPL

2020-06-19 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: -Digital India title: Digital India -> Multiprocesing Pool borken on macOS REPL type: security -> behavior ___ Python tracker

[issue41041] Multiprocesing Pool borken on macOS REPL

2020-06-19 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Some related note in documentation about repl with commit : https://github.com/python/cpython/commit/73dd030c8b71a7080648554652912982054b1177 > Note Functionality within this package requires that the __main__ module be > importable by the

[issue41041] Multiprocesing Pool borken on macOS REPL

2020-06-19 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: There is a documentation ticket already open : https://bugs.python.org/issue33553 -- nosy: +xtreak ___ Python tracker ___

[issue41041] Multiprocesing Pool borken on macOS REPL

2020-06-19 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Thanks. That's an annoying side effect of having spawn by default on macOS then. Could it be possible in `pool.map()` to detect that some of the objects are from main and would fail and then raise an error message in the parent process before

[issue41041] Multiprocesing Pool borken on macOS REPL

2020-06-19 Thread Eric V. Smith
Eric V. Smith added the comment: To be unpickle-able, the code for f needs to be imported, which it can't be from the repl. Windows has this same issue, due to also not using fork(). >From >https://docs.python.org/3/library/pickle.html#what-can-be-pickled-and-unpickled: > "Thus the defining

[issue41041] Multiprocesing Pool borken on macOS REPL

2020-06-19 Thread Matthias Bussonnier
New submission from Matthias Bussonnier : $ python Python 3.8.2 | packaged by conda-forge | (default, Apr 24 2020, 07:56:27) [Clang 9.0.1 ] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from multiprocessing import Pool >>> >>> def f(x): ... return x*x