Re: In support of PEP 649
Guido:
It seems a little disingenuous to claim discussions about annotations don’t concern you when you’re actively using them (for typing, no less, in the case of pydantic). And I am sure a project as popular (by their own description) as pydantic will find a way forward if PEP 649 is rejected, despite overdramatized claims.
I also maintain a library that uses type annotations in a runtime context (cattrs), but in a slightly different way than Pydantic. My project is much less popular than Pydantic (to be expected, since it only deals with de/serialization and the class definition layer is attrs/dataclasses), and the first issue filed on my bug tracker about future annotations was created at the end of 2019, so that's when I started thinking about it. To be honest, supporting stringified annotations was a lot of work to do in an efficient way (and that's the main reason cattrs has two converter classes now), but there was plenty of time and I simply did the work. The new design is even faster than the old one.
participants (1)
-
Tin Tvrtković