From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 16 Aug 2023 12:22:22 +0000 (-0700) Subject: [3.12] More actionable error message when spawn is incorrectly used. (GH-102203)... X-Git-Tag: v3.12.0rc2~157 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c2fb25a7145cbb6bbe92de28a230e963fe4d696f;p=thirdparty%2FPython%2Fcpython.git [3.12] More actionable error message when spawn is incorrectly used. (GH-102203) (#107990) More actionable error message when spawn is incorrectly used. (GH-102203) (cherry picked from commit a794ebeb028f7ef287c780d3890f816db9c21c51) Co-authored-by: Yuxin Wu Co-authored-by: Yuxin Wu Co-authored-by: Oleg Iarygin --- diff --git a/Lib/multiprocessing/spawn.py b/Lib/multiprocessing/spawn.py index f1af77091047..daac1ecc34b5 100644 --- a/Lib/multiprocessing/spawn.py +++ b/Lib/multiprocessing/spawn.py @@ -150,7 +150,11 @@ def _check_not_importing_main(): ... The "freeze_support()" line can be omitted if the program - is not going to be frozen to produce an executable.''') + is not going to be frozen to produce an executable. + + To fix this issue, refer to the "Safe importing of main module" + section in https://docs.python.org/3/library/multiprocessing.html + ''') def get_preparation_data(name):