Skip to content

Update the usage of pydantic.model_validator due to deprecation warnings #596

Description

@phackstock

Looks like we should update the usage of the @model_validator:

.venv/lib/python3.14/site-packages/nomenclature/config.py:121
  /home/hackstock/Documents/code/scse-update-legacy/.venv/lib/python3.14/site-packages/nomenclature/config.py:121: PydanticDeprecatedSince212: Using `@model_validator` with mode='after' on a classmethod is deprecated. Instead, use an instance method. See the documentation at https://docs.pydantic.dev/2.13/concepts/validators/#model-after-validator. Deprecated in Pydantic V2.12 to be removed in V3.0.
    @model_validator(mode="after")

.venv/lib/python3.14/site-packages/nomenclature/config.py:295
  /home/hackstock/Documents/code/scse-update-legacy/.venv/lib/python3.14/site-packages/nomenclature/config.py:295: PydanticDeprecatedSince212: Using `@model_validator` with mode='after' on a classmethod is deprecated. Instead, use an instance method. See the documentation at https://docs.pydantic.dev/2.13/concepts/validators/#model-after-validator. Deprecated in Pydantic V2.12 to be removed in V3.0.
    @model_validator(mode="after")

.venv/lib/python3.14/site-packages/nomenclature/config.py:391
  /home/hackstock/Documents/code/scse-update-legacy/.venv/lib/python3.14/site-packages/nomenclature/config.py:391: PydanticDeprecatedSince212: Using `@model_validator` with mode='after' on a classmethod is deprecated. Instead, use an instance method. See the documentation at https://docs.pydantic.dev/2.13/concepts/validators/#model-after-validator. Deprecated in Pydantic V2.12 to be removed in V3.0.
    @model_validator(mode="after")

.venv/lib/python3.14/site-packages/nomenclature/config.py:408
  /home/hackstock/Documents/code/scse-update-legacy/.venv/lib/python3.14/site-packages/nomenclature/config.py:408: PydanticDeprecatedSince212: Using `@model_validator` with mode='after' on a classmethod is deprecated. Instead, use an instance method. See the documentation at https://docs.pydantic.dev/2.13/concepts/validators/#model-after-validator. Deprecated in Pydantic V2.12 to be removed in V3.0.
    @model_validator(mode="after")

.venv/lib/python3.14/site-packages/nomenclature/processor/region.py:190
  /home/hackstock/Documents/code/scse-update-legacy/.venv/lib/python3.14/site-packages/nomenclature/processor/region.py:190: PydanticDeprecatedSince212: Using `@model_validator` with mode='after' on a classmethod is deprecated. Instead, use an instance method. See the documentation at https://docs.pydantic.dev/2.13/concepts/validators/#model-after-validator. Deprecated in Pydantic V2.12 to be removed in V3.0.
    @model_validator(mode="after")

.venv/lib/python3.14/site-packages/nomenclature/processor/region.py:203
  /home/hackstock/Documents/code/scse-update-legacy/.venv/lib/python3.14/site-packages/nomenclature/processor/region.py:203: PydanticDeprecatedSince212: Using `@model_validator` with mode='after' on a classmethod is deprecated. Instead, use an instance method. See the documentation at https://docs.pydantic.dev/2.13/concepts/validators/#model-after-validator. Deprecated in Pydantic V2.12 to be removed in V3.0.
    @model_validator(mode="after")

.venv/lib/python3.14/site-packages/nomenclature/processor/region.py:222
  /home/hackstock/Documents/code/scse-update-legacy/.venv/lib/python3.14/site-packages/nomenclature/processor/region.py:222: PydanticDeprecatedSince212: Using `@model_validator` with mode='after' on a classmethod is deprecated. Instead, use an instance method. See the documentation at https://docs.pydantic.dev/2.13/concepts/validators/#model-after-validator. Deprecated in Pydantic V2.12 to be removed in V3.0.
    @model_validator(mode="after")

.venv/lib/python3.14/site-packages/nomenclature/processor/region.py:229
  /home/hackstock/Documents/code/scse-update-legacy/.venv/lib/python3.14/site-packages/nomenclature/processor/region.py:229: PydanticDeprecatedSince212: Using `@model_validator` with mode='after' on a classmethod is deprecated. Instead, use an instance method. See the documentation at https://docs.pydantic.dev/2.13/concepts/validators/#model-after-validator. Deprecated in Pydantic V2.12 to be removed in V3.0.
    @model_validator(mode="after")

.venv/lib/python3.14/site-packages/nomenclature/processor/region.py:236
  /home/hackstock/Documents/code/scse-update-legacy/.venv/lib/python3.14/site-packages/nomenclature/processor/region.py:236: PydanticDeprecatedSince212: Using `@model_validator` with mode='after' on a classmethod is deprecated. Instead, use an instance method. See the documentation at https://docs.pydantic.dev/2.13/concepts/validators/#model-after-validator. Deprecated in Pydantic V2.12 to be removed in V3.0.
    @model_validator(mode="after")

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions