There are various places in the stdlib where we access the .__annotations__ attribute. Under PEP-649 / PEP-749, this now forces evaluation of lazy annotations. We should avoid evaluating annotations where it is not necessary.
For example, currently typing.Protocol evaluates its annotations at protocol creation time.
Linked PRs
There are various places in the stdlib where we access the
.__annotations__attribute. Under PEP-649 / PEP-749, this now forces evaluation of lazy annotations. We should avoid evaluating annotations where it is not necessary.For example, currently
typing.Protocolevaluates its annotations at protocol creation time.Linked PRs
typing._proto_hook#132534@reprlib.recursive_repr()#133411