-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-117492: Clarify documentation of typing.Never
#117678
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
gh-117492: Clarify documentation of typing.Never
#117678
Conversation
Co-authored-by: Jelle Zijlstra <[email protected]>
typing.NoReturn
& typing.Never
typing.Never
typing.Never
typing.NoReturn
This comment was marked as resolved.
This comment was marked as 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.
I'm definitely going to oppose deprecating NoReturn
, sorry! Perhaps if we were inventing it from scratch we wouldn't give it that name, but I haven't seen anything that would justify the huge disruption for users that would be caused by a deprecation
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 |
OK, but if we keep it, we should say that |
This reverts commit 1b3c55c.
Alex, I have made the requested changes; please review again, but what do we do then instead? Opinions seem to be somewhat divided. |
Thanks for making the requested changes! @AlexWaygood: please review the changes made to this pull request. |
I concur with Jelle |
I've removed the style suggestion, but just to clarify, this still holds right?
So, you shouldn't do this in 3.11 (if you're not aiming for backwards compatibility): from typing import NoReturn
def never_call_me(arg: NoReturn) -> None:
pass |
Sorry for my impatience, but do we merge the documentation of |
I'll take a look soon. I might indeed want to document the two together. |
By the way, @nineteendo, thanks for taking charge of this concern and making a pull request. I might have done it myself eventually, but concluded I wasn't yet up to the task given the ambiguous nature of the subject matter. So, thanks! |
I am afraid it will take at least until May 16 for this to be reviewed (1 month before pinging the issue + 1 week waiting for a response). @JelleZijlstra seems to be quite busy. https://devguide.python.org/getting-started/pull-request-lifecycle/#reviewing |
I pushed some changes:
I'll give other maintainers some time for a review. |
Thanks for taking some time, this looks a lot cleaner. |
Thanks for your work, @JelleZijlstra; it looks great. |
Co-authored-by: Erlend E. Aasland <[email protected]>
Thanks @nineteendo for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
…7678) (cherry picked from commit 852263e) Co-authored-by: Nice Zombies <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
GH-118547 is a backport of this pull request to the 3.12 branch. |
…#118547) (cherry picked from commit 852263e) Co-authored-by: Jelle Zijlstra <[email protected]> Co-authored-by: Nice Zombies <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
Co-authored-by: Jelle Zijlstra <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
📚 Documentation preview 📚: https://cpython-previews--117678.org.readthedocs.build/en/117678/library/typing.html#typing.Never