Skip to content

Commit 9c3ba84

Browse files
committed
Change __main__ warning message from 'import' to 'preload'
For consistency with module preload warnings, use 'Failed to preload __main__' instead of 'Failed to import __main__'.
1 parent a399218 commit 9c3ba84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/multiprocessing/forkserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def main(listener_fd, alive_r, preload, main_path=None, sys_path=None,
247247
with warnings.catch_warnings():
248248
warnings.simplefilter('always', ImportWarning)
249249
warnings.warn(
250-
f"Failed to import __main__ from {main_path!r}: {e}",
250+
f"Failed to preload __main__ from {main_path!r}: {e}",
251251
ImportWarning,
252252
stacklevel=2
253253
)

0 commit comments

Comments
 (0)