Skip to content

More actionable error message when spawn is incorrectly used. #102203

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
merged 3 commits into from
Aug 16, 2023

Conversation

ppwwyyxx
Copy link
Contributor

Users of my library report this as an issue to my project when they encounter this error. The error message can be made more actionable - pointing them to a more detailed documentation that explains the fix.

@ppwwyyxx
Copy link
Contributor Author

Can I get a reviewer? Thanks

@arhadthedev
Copy link
Member

@pitrou, @gpshead (as active multiprocessing experts)

@ppwwyyxx
Copy link
Contributor Author

Hi, multiprocessing experts @pitrou and @gpshead, can you take a moment to look at this change in error message?

@pitrou
Copy link
Member

pitrou commented Aug 14, 2023

@serhiy-storchaka What do you think?

@serhiy-storchaka
Copy link
Member

Sorry, I am not an expert in this field and there are no code changes that I can quickly understand and review.

I can only point out that including web links in an error message is unusual, but this multi-line error message is already unusual. The code was added by @roudkerk in bpo-8713.

@gpshead gpshead added docs Documentation in the Doc dir needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Aug 16, 2023
@gpshead
Copy link
Member

gpshead commented Aug 16, 2023

This is effectively a documentation change. It's an error message that should not be seen often, but is intended to tell people how to fix their code so they don't hit the error. Expanding on it and linking back to the multiprocessing docs seems fine to me, even if unusual.

@gpshead gpshead merged commit a794ebe into python:main Aug 16, 2023
@miss-islington
Copy link
Contributor

Thanks @ppwwyyxx for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-107990 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Aug 16, 2023
@bedevere-bot
Copy link

GH-107991 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Aug 16, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 16, 2023
…GH-102203)

(cherry picked from commit a794ebe)

Co-authored-by: Yuxin Wu <[email protected]>
Co-authored-by: Yuxin Wu <[email protected]>
Co-authored-by: Oleg Iarygin <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 16, 2023
…GH-102203)

(cherry picked from commit a794ebe)

Co-authored-by: Yuxin Wu <[email protected]>
Co-authored-by: Yuxin Wu <[email protected]>
Co-authored-by: Oleg Iarygin <[email protected]>
gpshead pushed a commit that referenced this pull request Aug 16, 2023
…H-102203) (#107991)

More actionable error message when spawn is incorrectly used. (GH-102203)
(cherry picked from commit a794ebe)

Co-authored-by: Yuxin Wu <[email protected]>
Co-authored-by: Yuxin Wu <[email protected]>
Co-authored-by: Oleg Iarygin <[email protected]>
Yhg1s pushed a commit that referenced this pull request Aug 16, 2023
…H-102203) (#107990)

More actionable error message when spawn is incorrectly used. (GH-102203)
(cherry picked from commit a794ebe)

Co-authored-by: Yuxin Wu <[email protected]>
Co-authored-by: Yuxin Wu <[email protected]>
Co-authored-by: Oleg Iarygin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news stdlib Python modules in the Lib dir topic-multiprocessing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants