We should consider switching to more modern data validation libraries such as "pydantic".
Motivation
The schema library we are using is pretty outdated these days. We are using a very old version of schema that was released in 2014. We have a couple of complaints with the current system:
We currently are relying on "evil" metaclasses that implicitly inject attributes to classes at runtime. This both doesn't work very well with IDEs and also is just hard to make sense of from a developers point of view.
Additionally, all of the attributes we are defining in these schemas have no docstring, and therefore their expected usage and data is completely unknown to new users.
The current schema library can have some pretty awful output for users, and can be difficult to parse and determine what went wrong. Here's an example output:
Note that if we use pydantic, we must use pydantic < 2.6, as 2.6 introduced a breaking change with Python 3.7 which is our lowest support Python version as of now.
We should consider switching to more modern data validation libraries such as "pydantic".
Motivation The schema library we are using is pretty outdated these days. We are using a very old version of schema that was released in 2014. We have a couple of complaints with the current system:
Related Conversations
https://github.com/AcademySoftwareFoundation/rez/pull/1662#issuecomment-1975197881
Note that if we use
pydantic
, we must use pydantic < 2.6, as 2.6 introduced a breaking change with Python 3.7 which is our lowest support Python version as of now.