We clearly rely on g2p requiring pydantic for us, but since Pydantic v1 and v2 are quite different, we should declare the version we expect in requirements.txt, and fix this deprecation warning I got from web_api.py with Pydantic 2.4.0 installed:
C:\Users\joanise\Miniconda3\envs\ras-py38\lib\site-packages\pydantic\fields.py:798: PydanticDeprecatedSince20: Using extra keyword arguments on Field is deprecated and will be removed. Use json_schema_extra instead. (Extra keys: 'example'). Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.4/migration/
For the deprecation warning, it appears to be as simple as having to always use examples=[ ... ] instead of using example=... when there is only one example.
We clearly rely on g2p requiring pydantic for us, but since Pydantic v1 and v2 are quite different, we should declare the version we expect in
requirements.txt
, and fix this deprecation warning I got fromweb_api.py
with Pydantic 2.4.0 installed: