Skip to content
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-100673: Removed erroneous note in the get_type_hints docs #100701

Merged
merged 1 commit into from Jan 7, 2023

Conversation

FrozenBob
Copy link
Contributor

@FrozenBob FrozenBob commented Jan 3, 2023

typing.get_type_hints still includes base class type hints, contrary to a note in the docs claiming this was changed in Python 3.10. The note was a mistake. This PR removes the incorrect note.

typing.get_type_hints still includes base class type hints.
@cpython-cla-bot
Copy link

cpython-cla-bot bot commented Jan 3, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

Copy link
Contributor

@hauntsaninja hauntsaninja left a comment

Thank you! cc @JelleZijlstra @sobolevn as reviewer of #99990

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Thanks, this looks good to me. I confirmed that, despite the behaviour of __annotations__ changing between 3.9 and 3.10, there was no behaviour change to get_type_hints between 3.9 and 3.10. (Cc. @MonadChains, as the author of #99990, and @sobolevn, who suggested adding the note to the get_type_hints docs.)

@AlexWaygood AlexWaygood merged commit deaf090 into python:main Jan 7, 2023
15 checks passed
@miss-islington
Copy link
Contributor

miss-islington commented Jan 7, 2023

Thanks @FrozenBob for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒🤖

@miss-islington
Copy link
Contributor

miss-islington commented Jan 7, 2023

Sorry, @FrozenBob and @AlexWaygood, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker deaf090699a7312cccb0637409f44de3f382389b 3.10

@bedevere-bot
Copy link

bedevere-bot commented Jan 7, 2023

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 7, 2023
…ythonGH-100701)

Removed erroneous note in the get_type_hints docs

typing.get_type_hints still includes base class type hints.
(cherry picked from commit deaf090)

Co-authored-by: FrozenBob <30644137+FrozenBob@users.noreply.github.com>
miss-islington added a commit that referenced this pull request Jan 7, 2023
Removed erroneous note in the get_type_hints docs

typing.get_type_hints still includes base class type hints.
(cherry picked from commit deaf090)

Co-authored-by: FrozenBob <30644137+FrozenBob@users.noreply.github.com>
@sobolevn
Copy link
Member

sobolevn commented Jan 7, 2023

Yeah, I still think that adding a note about __annotations__ is worth it, but just not about get_type_hints() this time :)

AlexWaygood pushed a commit to AlexWaygood/cpython that referenced this pull request Jan 7, 2023
…ython#100701)

Removed erroneous note in the get_type_hints docs

typing.get_type_hints still includes base class type hints.

(cherry picked from commit deaf090)
@bedevere-bot
Copy link

bedevere-bot commented Jan 7, 2023

GH-100826 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit that referenced this pull request Jan 7, 2023
…100701) (GH-100826)

Removed erroneous note in the get_type_hints docs

typing.get_type_hints still includes base class type hints.

(cherry picked from commit deaf090)

Automerge-Triggered-By: GH:AlexWaygood
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 news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants