Skip to content

Allow import of multiprocessing.connection even if _multiprocessing is missing #114807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hoodmane opened this issue Jan 31, 2024 · 0 comments
Closed
Assignees
Labels
topic-multiprocessing type-bug An unexpected behavior, bug, or error

Comments

@hoodmane
Copy link
Contributor

hoodmane commented Jan 31, 2024

Bug report

Bug description:

Currently if _multiprocessing is missing then from multiprocessing import connection raises an ImportError. It would be nice to delay the error until someone attempts to actually use multiprocessing.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

@hoodmane hoodmane added the type-bug An unexpected behavior, bug, or error label Jan 31, 2024
gpshead pushed a commit that referenced this issue Feb 11, 2024
…ng is missing (#114808)

`_multiprocessing` is only used under the `if _winapi:` block, this moves the import to be within the `_winapi` ImportError handling try/except for equivalent treatment.
@gpshead gpshead self-assigned this Feb 11, 2024
@gpshead gpshead closed this as completed Feb 11, 2024
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this issue Feb 14, 2024
…ocessing is missing (python#114808)

`_multiprocessing` is only used under the `if _winapi:` block, this moves the import to be within the `_winapi` ImportError handling try/except for equivalent treatment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-multiprocessing type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants