We add a class object to manage the schema version logic and refactor parts of the code to use this new schema version manager object to resolve the version and also perform validation, allowing us to handle the -1 as latest schema and other related validations without duplicating logic.
It was also drawn to my attention that we have to be backwards compatible with python-3.8 and above, thus some type hints still use earlier syntax and some are using newer ones, i faced this errors during the CI tests, thus test type hints are backwards compatible from python-3.8.
About this change - What it does
Add support for -1 also as the latest schema version.
We add a class object to manage the schema version logic and refactor parts of the code to use this new schema version manager object to resolve the version and also perform validation, allowing us to handle the
-1
as latest schema and other related validations without duplicating logic.It was also drawn to my attention that we have to be backwards compatible with
python-3.8
and above, thus some type hints still use earlier syntax and some are using newer ones, i faced this errors during the CI tests, thus test type hints are backwards compatible frompython-3.8
.References:
668
Why this way
We want to keep the version related logic simple and dry.