smarie / python-pyfields

Define fields in python classes. Easily.
https://smarie.github.io/python-pyfields
BSD 3-Clause "New" or "Revised" License
45 stars 10 forks source link

Type hints from annotations are not correct since python 3.10 #93

Open smarie opened 5 months ago

smarie commented 5 months ago

Correctly reading annotations change a lot in 3.10. The intent is to simplify things but our code does need to be adapted. the best practice is now to use inspect.get_annotations(eval_str=True) to get the de-stringified annotations. Still things need to be checked concerning inheritance behaviours.

https://docs.python.org/3/howto/annotations.html