Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update pydantic version #126

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading