Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up Pydantic v2 Migration warnings #1823

Open
rdeaton-freenome opened this issue Jan 29, 2024 · 1 comment
Open

Clean up Pydantic v2 Migration warnings #1823

rdeaton-freenome opened this issue Jan 29, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@rdeaton-freenome
Copy link

There's quite a few warnings generated by Pydantic v2 generated models that could be cleaned up to make a lot less noise in downstream project users.

Some examples:

datamodel_code_generator/parser/jsonschema.py:1663: PydanticDeprecatedSince20: The `parse_obj` method is deprecated; use `model_validate` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
    root_obj = JsonSchemaObject.parse_obj(raw)

datamodel_code_generator/parser/jsonschema.py:299: PydanticDeprecatedSince20: The `__fields_set__` attribute is deprecated, use `model_fields_set` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
    return 'default' in self.__fields_set__ or 'default_factory' in self.extras
@koxudaxi koxudaxi added the enhancement New feature or request label Jan 30, 2024
@koxudaxi
Copy link
Owner

@rdeaton-freenome
Thank you for creating the issue.
I agree with you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants