If Pydantic v2+ is installed, the following warning is given when importing pynqmetadata:
UserWarning: Valid config keys have changed in V2:
* 'underscore_attrs_are_private' has been removed
warnings.warn(message, UserWarning)
The offending line is here:
|
class Config: |
|
underscore_attrs_are_private = True |
The Pydantic v2 migration guide says:
"the Pydantic V2 behavior is now the same as if this was always set to True in Pydantic V1"
Which means this can be removed when using v2. Suggest adding if/else with version checks.
If Pydantic v2+ is installed, the following warning is given when importing
pynqmetadata:The offending line is here:
PYNQ-Metadata/pynqmetadata/models/metadata_extension.py
Lines 18 to 19 in 81950f8
The Pydantic v2 migration guide says:
Which means this can be removed when using v2. Suggest adding if/else with version checks.