I think PEP 649 would suit your purposes? Along with inspect.get_annotations
.
The difference between PEP 649 and the current behavior I think is that the annotations would be evaluated lazily when accessed rather than immediately.
There are discussions already about PEP 649 vs. PEP 563 (i.e. making from __future__ import annotations
default). This I think is the latest one: Type annotations, PEP 649 and PEP 563
I don’t think there is appetite to keep compile level flags around that change the behavior of Python around permanently. Generally __future__
imports are meant to have a specific version of Python when they will become default and the behavior switching is removed.