-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
gh-139905: Provide suggestion in error message if Generic.__init_subclass__
was not called
#139943
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
Conversation
Misc/NEWS.d/next/Library/2025-10-11-10-02-56.gh-issue-139905.UyJIR_.rst
Outdated
Show resolved
Hide resolved
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase And if you don't make the requested changes, you will be poked with soft cushions! |
I have made the requested changes; please review again |
Thanks for making the requested changes! @picnixz: please review the changes made to this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modulo my comment on the msg.
Misc/NEWS.d/next/Library/2025-10-11-10-02-56.gh-issue-139905.UyJIR_.rst
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you!
Should we backport this? It seems pretty safe but maybe a better error message should be seen as a feature, not a bugfix. |
I was also wondering this. The existing error message is so confusing that I lean towards backporting here tbh, especially since — as you say — it does seem pretty safe |
Thanks @StanFromIreland for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…it_subclass__` was not called (pythonGH-139943) (cherry picked from commit 5776d0d) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
…it_subclass__` was not called (pythonGH-139943) (cherry picked from commit 5776d0d) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
GH-139955 is a backport of this pull request to the 3.14 branch. |
GH-139956 is a backport of this pull request to the 3.13 branch. |
Generic.__init_subclass__
is not called #139905