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>
J
Jelle Zijlstra committed
2e0d445364f6d9832e81263c1c68440654924fc4
Parent: e7d465a
Committed by GitHub <noreply@github.com>
on 9/23/2024, 7:06:19 PM