diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2024-09-23 19:06:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-23 19:06:19 (GMT) |
commit | 2e0d445364f6d9832e81263c1c68440654924fc4 (patch) | |
tree | 3e2d591603fe99380cb94f3aba9fa9aa75c08330 /Python/errors.c | |
parent | e7d465a607b77a552d1e07f3fafa81ef5fc799d2 (diff) | |
download | cpython-2e0d445364f6d9832e81263c1c68440654924fc4.zip cpython-2e0d445364f6d9832e81263c1c68440654924fc4.tar.gz cpython-2e0d445364f6d9832e81263c1c68440654924fc4.tar.bz2 |
gh-119180: Fix annotationlib.ForwardRef.evaluate with no globals (#124326)
We were sometimes passing None as the globals argument to eval(), which makes it
inherit the globals from the calling scope. Instead, ensure that globals is always
non-None. The test was passing accidentally because I passed "annotationlib" as a
module object; fix that. Also document the parameters to ForwardRef() and remove
two unused private ones.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Diffstat (limited to 'Python/errors.c')
0 files changed, 0 insertions, 0 deletions