Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

forkserver.set_forkserver_preload() silent preload import failures when sys.path is required #117378

Closed
Assignees
gpshead
Labels
3.12only security fixes3.13bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytopic-multiprocessingtype-bugAn unexpected behavior, bug, or error
@doublex

Description

@doublex

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

Metadata

Metadata

Assignees

Labels

3.12only security fixes3.13bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytopic-multiprocessingtype-bugAn unexpected behavior, bug, or error

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp