The package currently uses several deprecated Pydantic v2 methods that should be updated to their new equivalents:
parse_obj -> model_validate
dict -> model_dump
__fields_set__ -> model_fields_set
These deprecation warnings appear when using the package with Pydantic v2:
- PydanticDeprecatedSince20: The parse_obj method is deprecated; use model_validate instead.
- PydanticDeprecatedSince20: The dict method is deprecated; use model_dump instead.
- PydanticDeprecatedSince20: The fields_set attribute is deprecated, use model_fields_set instead
These methods will be removed in Pydantic v3.0, so they should be updated to ensure future compatibility.
Relevant files:
datamodel_code_generator/parser/jsonschema.py
See the Pydantic V2 Migration Guide for more details on the changes.
The package currently uses several deprecated Pydantic v2 methods that should be updated to their new equivalents:
parse_obj->model_validatedict->model_dump__fields_set__->model_fields_setThese deprecation warnings appear when using the package with Pydantic v2:
These methods will be removed in Pydantic v3.0, so they should be updated to ensure future compatibility.
Relevant files:
datamodel_code_generator/parser/jsonschema.pySee the Pydantic V2 Migration Guide for more details on the changes.