|
anns = getattr(cls, "__annotations__", {}) |
uses
__annotations__
However, it looks as though an upcoming incompatible change to Python will change __annotations__ into a list of strings.
It seems like the correct public API to use to retrieve the information attrs wants would be get_type_hints.
As a bonus, fixing this might make #265 easier to implement.
attrs/src/attr/_make.py
Line 213 in aa50117
__annotations__However, it looks as though an upcoming incompatible change to Python will change
__annotations__into a list of strings.It seems like the correct public API to use to retrieve the information
attrswants would beget_type_hints.As a bonus, fixing this might make #265 easier to implement.