summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d
diff options
context:
space:
mode:
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>2021-04-26 17:31:21 (GMT)
committerGitHub <noreply@github.com>2021-04-26 17:31:21 (GMT)
commit1b1f9852bda85c01ef124858f293e9c13e04ffce (patch)
tree30b50ebb738a3a80ce5fff7f0b259af366774d48 /Misc/NEWS.d
parent94549ee728cd88d1ef053aab50da422f9e99b434 (diff)
downloadcpython-1b1f9852bda85c01ef124858f293e9c13e04ffce.zip
cpython-1b1f9852bda85c01ef124858f293e9c13e04ffce.tar.gz
cpython-1b1f9852bda85c01ef124858f293e9c13e04ffce.tar.bz2
bpo-42904: Change search order of typing.get_type_hints eval (#25632)
While surprising (searching globals before locals in one specific case), this is needed for backwards compatibility.
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r--Misc/NEWS.d/next/Library/2021-04-26-23-39-47.bpo-42904.ejjsyR.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2021-04-26-23-39-47.bpo-42904.ejjsyR.rst b/Misc/NEWS.d/next/Library/2021-04-26-23-39-47.bpo-42904.ejjsyR.rst
new file mode 100644
index 0000000..632941a
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2021-04-26-23-39-47.bpo-42904.ejjsyR.rst
@@ -0,0 +1,5 @@
+For backwards compatbility with previous minor versions of Python,
+if :func:`typing.get_type_hints` receives no namespace dictionary arguments,
+:func:`typing.get_type_hints` will search through the global then local
+namespaces during evaluation of stringized type annotations
+(string forward references) inside a class.