When encoding a type that pydantic knows about but the default JSON encoder doesn't, some deprecation warnings appear:
PydanticDeprecatedSince20: pydantic_encoder is deprecated, use pydantic_core.to_jsonable_python instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.4/migration/
and
PydanticDeprecatedSince20: pydantic_encoder is deprecated, use BaseModel.model_dump instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.4/migration
Hello, thanks for
quart-schema
!When encoding a type that
pydantic
knows about but the default JSON encoder doesn't, some deprecation warnings appear:and
The affected code for the first warning seems to be here: https://github.com/pgjones/quart-schema/blob/a2171e82cf20ae070c5471e4ae353a2cb3e55846/src/quart_schema/extension.py#L116
I'm not sure about the second one, the line shows
python3.10/site-packages/typing_extensions.py:2360
but that doesn't make a lot of sense.Code that triggers this:
For reference, this was with Python 3.10.12, and pip list says: