Skip to content

Commit efc03a1

Browse files
committed
update pydantic version
1 parent 627a257 commit efc03a1

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Note: Minor version `0.X.0` update might break the API, It's recommended to pin
1212

1313
- replace `string_to_table(...)` by `unnest(string_to_array(...))` to support Postgres<14
1414

15+
### changed
16+
17+
- update pydantic minimum version to >=2.4
18+
1519
## [0.4.3] - 2023-08-28
1620

1721
### fixed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies = [
2727
"fastapi>=0.100.0",
2828
"jinja2>=2.11.2,<4.0.0",
2929
"morecantile>=5.0,<6.0",
30-
"pydantic~=2.0",
30+
"pydantic>=2.4,<3.0",
3131
"pydantic-settings~=2.0",
3232
"geojson-pydantic>=1.0,<2.0",
3333
"pygeofilter>=0.2.0,<0.3.0",

tipg/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from pydantic import (
77
DirectoryPath,
88
Field,
9-
FieldValidationInfo,
109
PostgresDsn,
10+
ValidationInfo,
1111
field_validator,
1212
model_validator,
1313
)
@@ -132,7 +132,7 @@ class PostgresSettings(BaseSettings):
132132
# https://github.com/tiangolo/full-stack-fastapi-postgresql/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/backend/app/app/core/config.py#L42
133133
@field_validator("database_url", mode="before")
134134
def assemble_db_connection(
135-
cls, v: Optional[str], info: FieldValidationInfo
135+
cls, v: Optional[str], info: ValidationInfo
136136
) -> PostgresDsn:
137137
"""Validate db url settings."""
138138
if isinstance(v, str):

0 commit comments

Comments
 (0)