Skip to content

refactor: migrate pydantic from v1 to v2#34

Open
e-kwsm wants to merge 1 commit into
OpenChemistry:mainfrom
e-kwsm:pydantic2
Open

refactor: migrate pydantic from v1 to v2#34
e-kwsm wants to merge 1 commit into
OpenChemistry:mainfrom
e-kwsm:pydantic2

Conversation

@e-kwsm

@e-kwsm e-kwsm commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Fix the following warning:

UserWarning: Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater.

  • run bump-pydantic

    PydanticDeprecatedSince20: min_items is deprecated and will be
    removed, use min_length instead. Deprecated in Pydantic V2.0 to be
    removed in V3.0. See Pydantic V2 Migration Guide at
    https://errors.pydantic.dev/2.12/migration/

    PydanticDeprecatedSince20: max_items is deprecated and will be
    removed, use max_length instead. Deprecated in Pydantic V2.0 to be
    removed in V3.0. See Pydantic V2 Migration Guide at
    https://errors.pydantic.dev/2.12/migration/

  • replace deprecated schema_json

    PydanticDeprecatedSince20: The schema_json method is deprecated;
    use model_json_schema and json.dumps instead. Deprecated in
    Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide
    at https://errors.pydantic.dev/2.12/migration/

- run bump-pydantic

    PydanticDeprecatedSince20: `min_items` is deprecated and will be
    removed, use `min_length` instead. Deprecated in Pydantic V2.0 to be
    removed in V3.0. See Pydantic V2 Migration Guide at
    https://errors.pydantic.dev/2.12/migration/

    PydanticDeprecatedSince20: `max_items` is deprecated and will be
    removed, use `max_length` instead. Deprecated in Pydantic V2.0 to be
    removed in V3.0. See Pydantic V2 Migration Guide at
    https://errors.pydantic.dev/2.12/migration/

- replace deprecated schema_json

    PydanticDeprecatedSince20: The `schema_json` method is deprecated;
    use `model_json_schema` and json.dumps instead. Deprecated in
    Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide
    at https://errors.pydantic.dev/2.12/migration/

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant