Hi Eric,
to follow up on https://bugs.python.org/msg411943
I'm currently a bit negative on moving to get_type_hints, even though I got it working for the test suite. I think your worries with nesting are well placed, particularly with namespaces and such.
In that vein, I suggest we move forward with patching the existing implementation with the discussed regex restrictions. I'm not sure if you want to remove the test cases with leading spaces; it seems not too important.
While we're there I found a bug in the test suite, a missing comma that can be fixed at the same time:
https://github.com/python/cpython/blob/b1a3446f077b7d56b89f55d98dadb8018986a3e5/Lib/test/test_dataclasses.py#L3080
Do you have any other concerns before I take a stab at this? |