summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2021-08-20 14:36:51 (GMT)
committerGitHub <noreply@github.com>2021-08-20 14:36:51 (GMT)
commit16b9be4861e007ad483611ba0479feb2b90ea783 (patch)
tree83aa996ec2979df25cacc3d4abca8ff073bb96c9 /Doc
parentf5d7a8d29c49ad47254fa098abb7a510e5e7b45e (diff)
downloadcpython-16b9be4861e007ad483611ba0479feb2b90ea783.zip
cpython-16b9be4861e007ad483611ba0479feb2b90ea783.tar.gz
cpython-16b9be4861e007ad483611ba0479feb2b90ea783.tar.bz2
bpo-44926: `get_type_hints`: Add note about type aliases with forward refs (#27859)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/typing.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index e8d7c9e..47d6c3a 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -2013,6 +2013,13 @@ Introspection helpers
'name': Annotated[str, 'some marker']
}
+ .. note::
+
+ :func:`get_type_hints` does not work with imported
+ :ref:`type aliases <type-aliases>` that include forward references.
+ Enabling postponed evaluation of annotations (:pep:`563`) may remove
+ the need for most forward references.
+
.. versionchanged:: 3.9
Added ``include_extras`` parameter as part of :pep:`593`.