[Python-checkins] More actionable error message when spawn is incorrectly used. (#102203)
gpshead
webhook-mailer at python.org
Tue Aug 15 21:03:49 EDT 2023
https://github.com/python/cpython/commit/a794ebeb028f7ef287c780d3890f816db9c21c51
commit: a794ebeb028f7ef287c780d3890f816db9c21c51
branch: main
author: Yuxin Wu <ppwwyyxxc at gmail.com>
committer: gpshead <greg at krypto.org>
date: 2023-08-15T18:03:45-07:00
summary:
More actionable error message when spawn is incorrectly used. (#102203)
Co-authored-by: Yuxin Wu <ppwwyyxx at users.noreply.github.com>
Co-authored-by: Oleg Iarygin <oleg at arhadthedev.net>
files:
M Lib/multiprocessing/spawn.py
diff --git a/Lib/multiprocessing/spawn.py b/Lib/multiprocessing/spawn.py
index f1af770910471..daac1ecc34b55 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):
More information about the Python-checkins
mailing list