[Python-checkins] [3.11] More actionable error message when spawn is incorrectly used. (GH-102203) (#107991)
gpshead
webhook-mailer at python.org
Tue Aug 15 21:43:32 EDT 2023
https://github.com/python/cpython/commit/3f7dfb6d392f6278e6aee9233003dcaa45e2e736
commit: 3f7dfb6d392f6278e6aee9233003dcaa45e2e736
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: gpshead <greg at krypto.org>
date: 2023-08-16T01:43:28Z
summary:
[3.11] More actionable error message when spawn is incorrectly used. (GH-102203) (#107991)
More actionable error message when spawn is incorrectly used. (GH-102203)
(cherry picked from commit a794ebeb028f7ef287c780d3890f816db9c21c51)
Co-authored-by: Yuxin Wu <ppwwyyxxc at gmail.com>
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