Skip to content

Commit

Permalink
re-enable pydantic 1.9 (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
olirice committed Aug 16, 2023
1 parent 561548e commit 8d1f249
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion postgrest/base_request_builder.py
Expand Up @@ -18,7 +18,14 @@

from httpx import Headers, QueryParams
from httpx import Response as RequestResponse
from pydantic import BaseModel, field_validator
from pydantic import BaseModel

try:
# >= 2.0.0
from pydantic import field_validator
except ImportError:
# < 2.0.0
from pydantic import validator as field_validator

from .types import CountMethod, Filters, RequestMethod, ReturnMethod
from .utils import AsyncClient, SyncClient, sanitize_param
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -21,7 +21,7 @@ packages = [
python = "^3.8"
httpx = "^0.24.0"
deprecation = "^2.1.0"
pydantic = ">=2.1.0,<3.0"
pydantic = ">=1.9,<3.0"
strenum = "^0.4.9"

[tool.poetry.dev-dependencies]
Expand Down

0 comments on commit 8d1f249

Please sign in to comment.