Skip to content

Conversation

@jstasiak
Copy link
Contributor

@jstasiak jstasiak commented Feb 6, 2020

Following [1] this prevents multiple runtime implementations of Annotated
and get_type_hints from existing on Python 3.9 (which has recently
merged PEP 593 changes[2]). Reexporting allows code targetting both
Python pre-3.9 and 3.9+ to be able to import from typing_extensions and
to keep working without changes.

_AnnotatedAlias import is needed for #698 to work.

[1] python/cpython#18260 (comment)
[2] python/cpython#18260

Following [1] this prevents multiple runtime implementations of Annotated
and get_type_hints from existing on Python 3.9 (which has recently
merged PEP 593 changes[2]). Reexporting allows code targetting both
Python pre-3.9 and 3.9+ to be able to import from typing_extensions and
to keep working without changes.

[1] python/cpython#18260 (comment)
[2] python/cpython#18260
Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

Same comment as for #698.

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

3 participants