Skip to content

Commit

Permalink
Merge pull request #126 from developmentseed/updatePydantic24
Browse files Browse the repository at this point in the history
update pydantic version
  • Loading branch information
vincentsarago authored Oct 2, 2023
2 parents 627a257 + efc03a1 commit 70778c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Note: Minor version `0.X.0` update might break the API, It's recommended to pin

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

### changed

- update pydantic minimum version to >=2.4

## [0.4.3] - 2023-08-28

### fixed
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies = [
"fastapi>=0.100.0",
"jinja2>=2.11.2,<4.0.0",
"morecantile>=5.0,<6.0",
"pydantic~=2.0",
"pydantic>=2.4,<3.0",
"pydantic-settings~=2.0",
"geojson-pydantic>=1.0,<2.0",
"pygeofilter>=0.2.0,<0.3.0",
Expand Down
4 changes: 2 additions & 2 deletions tipg/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from pydantic import (
DirectoryPath,
Field,
FieldValidationInfo,
PostgresDsn,
ValidationInfo,
field_validator,
model_validator,
)
Expand Down Expand Up @@ -132,7 +132,7 @@ class PostgresSettings(BaseSettings):
# https://github.com/tiangolo/full-stack-fastapi-postgresql/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/backend/app/app/core/config.py#L42
@field_validator("database_url", mode="before")
def assemble_db_connection(
cls, v: Optional[str], info: FieldValidationInfo
cls, v: Optional[str], info: ValidationInfo
) -> PostgresDsn:
"""Validate db url settings."""
if isinstance(v, str):
Expand Down

0 comments on commit 70778c5

Please sign in to comment.