Backport get_origin() and get_args() by jstasiak · Pull Request #698 · python/typing · GitHub
Skip to content

Backport get_origin() and get_args() - #698

Merged
gvanrossum merged 4 commits into
python:masterfrom
jstasiak:backport-get_origin-get_args
Feb 7, 2020
Merged

Backport get_origin() and get_args()#698
gvanrossum merged 4 commits into
python:masterfrom
jstasiak:backport-get_origin-get_args

Conversation

@jstasiak

@jstasiak jstasiak commented Feb 6, 2020

Copy link
Copy Markdown
Contributor

The implementations come from CPython commit 427c84f13f77 with one small
change – the get_origin's docstring mentions Annotated as it's also
supported.

get_origin() and get_args() introduced in [1] and modified in [2] to
support Annotated.

[1] python/cpython#13685
[2] python/cpython#18260

The implementations come from CPython commit 427c84f13f77 with one small
change – the get_origin's docstring mentions Annotated as it's also
supported.

get_origin() and get_args() introduced in [1] and modified in [2] to
support Annotated.

[1] python/cpython#13685
[2] python/cpython#18260
… 3.8

Otherwise typing_extensions.get_origin() would not recognize
typing_extensions.Annotated on 3.8.
@jstasiak

jstasiak commented Feb 6, 2020

Copy link
Copy Markdown
Contributor Author

@gvanrossum

Copy link
Copy Markdown
Member

Yeah, it looks like it belongs in the exclude list (maybe only in 3.8.x?)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sys.version_info[:2] >= (3, 9)

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. I'd wait a few days for @ilevkivskyi -- Ivan, if you're okay with my review just say so and I'll merge it.

@ilevkivskyi ilevkivskyi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 👍

@gvanrossum
gvanrossum merged commit 7e354ef into python:master Feb 7, 2020
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.

4 participants