Skip to content

gh-114807: multiprocessing: don't raise ImportError if _multiprocessing is missing #114808

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

Merged

Conversation

hoodmane
Copy link
Contributor

@hoodmane hoodmane commented Jan 31, 2024

_multiprocessing is only used under the if _winapi block so I think it makes sense to move the import behind the same try/catch block.

…tiprocessing is missing

_multiprocessing is only used under the `if _winapi` block so I think it makes
sense to move the import behind the same try/catch block.
@Jason-Y-Z
Copy link
Contributor

Jason-Y-Z commented Feb 10, 2024

Thanks for the fix, you might want to add a news entry with https://blurb-it.herokuapp.com/. Otherwise LGTM

@hoodmane
Copy link
Contributor Author

This is a tiny change and I think people are unlikely to be interested, so probably no news entry is necessary? But I'm happy to add one if you think it's newsworthy.

Copy link
Member

@gpshead gpshead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, simple obvious refactoring. not news entry worthy.

@gpshead gpshead merged commit 4b75032 into python:main Feb 11, 2024
@hoodmane hoodmane deleted the toplevel-multiprocessing-connection-import branch February 12, 2024 02:22
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull request 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.
ambv pushed a commit to ambv/cpython that referenced this pull request Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants