summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pyrepl/test_pyrepl.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2025-05-25 17:52:04 (GMT)
committerGitHub <noreply@github.com>2025-05-25 17:52:04 (GMT)
commit9c6d2dbe26e30114773bf55147d36960cb89e519 (patch)
tree07f3e026a41f0ef7a1fb6c938ddfb2e16bec1d26 /Lib/test/test_pyrepl/test_pyrepl.py
parent8c6653428f32189e4779a5ed444cf42e811368e0 (diff)
downloadcpython-9c6d2dbe26e30114773bf55147d36960cb89e519.zip
cpython-9c6d2dbe26e30114773bf55147d36960cb89e519.tar.gz
cpython-9c6d2dbe26e30114773bf55147d36960cb89e519.tar.bz2
[3.14] gh-133960: Improve typing.evaluate_forward_ref (GH-133961) (#134663)
gh-133960: Improve typing.evaluate_forward_ref (GH-133961) As explained in GH-133960, this removes most of the behavior differences with ForwardRef.evaluate. The remaining difference is about recursive evaluation of forwardrefs; this is practically useful in cases where an annotation refers to a type alias that itself is string-valued. This also improves several edge cases that were previously not handled optimally. For example, the function now takes advantage of the partial evaluation behavior of ForwardRef.evaluate() to evaluate more ForwardRefs in the FORWARDREF format. This also fixes GH-133959 as a side effect, because the buggy behavior in GH-133959 derives from evaluate_forward_ref(). (cherry picked from commit 57fef27cfc2bdfc1e3a65ef8c8a760198d15b14d) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Lib/test/test_pyrepl/test_pyrepl.py')
0 files changed, 0 insertions, 0 deletions