Skip to content

Commit

Permalink
Update pydantic to > 2.9.0 (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani authored Sep 10, 2024
1 parent 287cb22 commit 6ae24e5
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 25 deletions.
16 changes: 8 additions & 8 deletions requirements/linting.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
#
# pip-compile --no-emit-index-url --output-file=requirements/linting.txt requirements/linting.in
#
black==24.4.2
black==24.8.0
# via -r requirements/linting.in
cfgv==3.4.0
# via pre-commit
click==8.1.7
# via black
distlib==0.3.8
# via virtualenv
filelock==3.15.4
filelock==3.16.0
# via virtualenv
identify==2.6.0
# via pre-commit
mypy==1.11.1
mypy==1.11.2
# via -r requirements/linting.in
mypy-extensions==1.0.0
# via
Expand All @@ -28,7 +28,7 @@ packaging==24.1
# via black
pathspec==0.12.1
# via black
platformdirs==4.2.2
platformdirs==4.3.2
# via
# black
# virtualenv
Expand All @@ -40,19 +40,19 @@ pyyaml==6.0.1
# via
# -r requirements/linting.in
# pre-commit
ruff==0.5.5
ruff==0.6.4
# via -r requirements/linting.in
tokenize-rt==5.2.0
tokenize-rt==6.0.0
# via pyupgrade
tomli==2.0.1
# via
# black
# mypy
types-pyyaml==6.0.12.20240724
types-pyyaml==6.0.12.20240808
# via -r requirements/linting.in
typing-extensions==4.12.2
# via
# black
# mypy
virtualenv==20.26.3
virtualenv==20.26.4
# via pre-commit
16 changes: 8 additions & 8 deletions requirements/pyproject.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ azure-identity==1.17.1
# via pydantic-settings (pyproject.toml)
azure-keyvault-secrets==4.8.0
# via pydantic-settings (pyproject.toml)
certifi==2024.7.4
certifi==2024.8.30
# via requests
cffi==1.16.0
cffi==1.17.1
# via cryptography
charset-normalizer==3.3.2
# via requests
cryptography==43.0.0
cryptography==43.0.1
# via
# azure-identity
# msal
# pyjwt
idna==3.7
idna==3.8
# via requests
isodate==0.6.1
# via azure-keyvault-secrets
msal==1.30.0
msal==1.31.0
# via
# azure-identity
# msal-extensions
Expand All @@ -39,11 +39,11 @@ portalocker==2.10.1
# via msal-extensions
pycparser==2.22
# via cffi
pydantic==2.8.2
pydantic==2.9.1
# via pydantic-settings (pyproject.toml)
pydantic-core==2.20.1
pydantic-core==2.23.3
# via pydantic
pyjwt[crypto]==2.8.0
pyjwt[crypto]==2.9.0
# via
# msal
# pyjwt
Expand Down
14 changes: 7 additions & 7 deletions requirements/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#
# pip-compile --no-emit-index-url --output-file=requirements/testing.txt requirements/testing.in
#
black==24.4.2
black==24.8.0
# via pytest-examples
click==8.1.7
# via black
coverage[toml]==7.6.0
coverage[toml]==7.6.1
# via -r requirements/testing.in
exceptiongroup==1.2.2
# via pytest
Expand All @@ -26,27 +26,27 @@ packaging==24.1
# pytest
pathspec==0.12.1
# via black
platformdirs==4.2.2
platformdirs==4.3.2
# via black
pluggy==1.5.0
# via pytest
pygments==2.18.0
# via rich
pytest==8.3.2
pytest==8.3.3
# via
# -r requirements/testing.in
# pytest-examples
# pytest-mock
# pytest-pretty
pytest-examples==0.0.12
pytest-examples==0.0.13
# via -r requirements/testing.in
pytest-mock==3.14.0
# via -r requirements/testing.in
pytest-pretty==1.2.0
# via -r requirements/testing.in
rich==13.7.1
rich==13.8.0
# via pytest-pretty
ruff==0.5.5
ruff==0.6.4
# via pytest-examples
tomli==2.0.1
# via
Expand Down
6 changes: 4 additions & 2 deletions tests/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2170,14 +2170,16 @@ class Settings(BaseSettings):

def test_protected_namespace_defaults():
# pydantic default
with pytest.warns(UserWarning, match='Field "model_prefixed_field" has conflict with protected namespace "model_"'):
with pytest.warns(
UserWarning, match='Field "model_prefixed_field" in Model has conflict with protected namespace "model_"'
):

class Model(BaseSettings):
model_prefixed_field: str

# pydantic-settings default
with pytest.raises(
UserWarning, match='Field "settings_prefixed_field" has conflict with protected namespace "settings_"'
UserWarning, match='Field "settings_prefixed_field" in Model1 has conflict with protected namespace "settings_"'
):

class Model1(BaseSettings):
Expand Down

0 comments on commit 6ae24e5

Please sign in to comment.