Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
Bug indef main():https://github.com/python/cpython/blob/main/Lib/multiprocessing/forkserver.py#L167
The paramsys_path is ignored. Result:ModuleNotFoundError for preloaded modules.
a) Usingsys_path fixes this issue
b) Maybe better remove "pass" and report and error to simplify problem solving
ifpreload:if'__main__'inpreloadandmain_pathisnotNone:process.current_process()._inheriting=Truetry:spawn.import_main_path(main_path)finally:delprocess.current_process()._inheriting+ifsys_path:+sys.path=sys_pathformodnameinpreload:try:__import__(modname)exceptImportError:-pass+warnings.warn('forkserver: preloading module failed %s'%modname)
CPython versions tested on:
3.12
Operating systems tested on:
No response
Linked PRs
- gh-117378: Fix multiprocessing forkserver preload sys.path inheritance. #126538
- [3.13] gh-117378: Fix multiprocessing forkserver preload sys.path inheritance. (GH-126538) #126632
- [3.12] gh-117378: Fix multiprocessing forkserver preload sys.path inheritance. (GH-126538) #126633
- gh-117378: Clear up the NEWS entry wording #126634
- gh-117378: Only run the new multiprocessing SysPath test when appropriate #126635
- [3.13] gh-117378: Only run the new multiprocessing SysPath test when appropriate (GH-126635) #126652
- [3.12] gh-117378: Only run the new multiprocessing SysPath test when appropriate (GH-126635) #126653
- [3.13] gh-117378: Clear up the NEWS entry wording (GH-126634) #126668
- [3.12] gh-117378: Clear up the NEWS entry wording (GH-126634) #126669
Metadata
Metadata
Assignees
Labels
Projects
Status
Done