Skip to content

Commit fc4c36e

Browse files
committed
Replace Deprecation
1 parent 0631486 commit fc4c36e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

cppython/core/schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from pathlib import Path
55
from typing import Annotated, Any, NewType, Protocol, runtime_checkable
66

7-
from pydantic import BaseModel, Field, field_validator, model_validator
7+
from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator
88
from pydantic.types import DirectoryPath
99

1010
from cppython.utility.plugin import Plugin as SynodicPlugin
@@ -14,7 +14,7 @@
1414
class CPPythonModel(BaseModel):
1515
"""The base model to use for all CPPython models"""
1616

17-
model_config = {'populate_by_name': False}
17+
model_config = ConfigDict(validate_by_name=False, validate_by_alias=True)
1818

1919

2020
class ProjectData(CPPythonModel, extra='forbid'):

pyproject.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ dependencies = [
2323

2424
[project.optional-dependencies]
2525
pytest = [
26-
"pytest>=8.3.5",
27-
"pytest-mock>=3.14.0",
26+
"pytest>=8.3.5",
27+
"pytest-mock>=3.14.0",
2828
]
2929

3030
git = [
31-
"dulwich>=0.22.8",
31+
"dulwich>=0.22.8",
3232
]
3333

3434
pdm = [
35-
"pdm>=2.22.4",
35+
"pdm>=2.22.4",
3636
]
3737

3838
[project.urls]
@@ -57,13 +57,13 @@ cppython = "cppython.test.pytest.fixtures"
5757

5858
[dependency-groups]
5959
lint = [
60-
"ruff>=0.11.2",
61-
"mypy>=1.15.0",
60+
"ruff>=0.11.2",
61+
"mypy>=1.15.0",
6262
]
6363
test = [
64-
"pytest>=8.3.5",
65-
"pytest-cov>=6.0.0",
66-
"pytest-mock>=3.14.0",
64+
"pytest>=8.3.5",
65+
"pytest-cov>=6.0.0",
66+
"pytest-mock>=3.14.0",
6767
]
6868

6969
[project.scripts]

0 commit comments

Comments
 (0)