Skip to content

Commit

Permalink
update pydantic version
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Oct 2, 2023
1 parent 627a257 commit efc03a1
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

1 comment on commit efc03a1

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'TiPg Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.30.

Benchmark suite Current: efc03a1 Previous: 1fc3b73 Ratio
tests/benchmarks.py::test_benchmark_item[html-Saskatchewan] 11.323553519864605 iter/sec (stddev: 0.06070816995876414) 16.619669156275016 iter/sec (stddev: 0.043674931223312355) 1.47

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.