Open Daraan opened 3 weeks ago
Backports evaluate_forward_ref from JelleZijlstra's PR https://github.com/python/cpython/pull/119891 / PEP 749.
evaluate_forward_ref
The most tricky part seems to be in recursive ForwardRefs, at least in my tests they worked better in 3.9 and but not in 3.8 and 3.10. If someone has some nice examples how to break it I gladly add them. Limitation has been added to the docs.
ForwardRef
Tests are also tested against cpython main https://github.com/python/cpython/commit/079875e39
main
Backports
evaluate_forward_ref
from JelleZijlstra's PR https://github.com/python/cpython/pull/119891 / PEP 749.The most tricky part seems to be in recursive
ForwardRef
s, at least in my tests they worked better in 3.9 and but not in 3.8 and 3.10. If someone has some nice examples how to break it I gladly add them. Limitation has been added to the docs.Tests are also tested against cpython
main
https://github.com/python/cpython/commit/079875e39