summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-08-22 18:29:59 (GMT)
committerGitHub <noreply@github.com>2021-08-22 18:29:59 (GMT)
commit9ffe582a018a2babd14e874ae2b169370633fe33 (patch)
tree7256d65d02544420e22e7119c2dd68830a255f5f /Doc
parentd63114caf9384ead7baf872598acdff25315a5bf (diff)
downloadcpython-9ffe582a018a2babd14e874ae2b169370633fe33.zip
cpython-9ffe582a018a2babd14e874ae2b169370633fe33.tar.gz
cpython-9ffe582a018a2babd14e874ae2b169370633fe33.tar.bz2
bpo-44926: `get_type_hints`: Add note about type aliases with forward refs (GH-27859) (GH-27860)
(cherry picked from commit 16b9be4861e007ad483611ba0479feb2b90ea783) Co-authored-by: Maximilian Hils <git@maximilianhils.com>
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`.