Skip to content

Commit

Permalink
Merge branch 'fix/pydantic_deprecation_warnings' of https://github.co…
Browse files Browse the repository at this point in the history
…m/wpeterw/cachetory into fix/pydantic_deprecation_warnings
  • Loading branch information
wieri494 committed Jan 13, 2024
2 parents cdc0043 + ada12fe commit a7f878c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cachetory/serializers/compressors/zlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def deserialize(self, data: bytes) -> bytes:


class _UrlParams(BaseModel):
compression_level: Annotated[int, Field(ge=-1, le=9)] = Field( # type: ignore
compression_level: Annotated[int, Field(ge=-1, le=9)] = Field(
zlib.Z_DEFAULT_COMPRESSION,
alias="compression-level",
)
2 changes: 1 addition & 1 deletion cachetory/serializers/compressors/zstd.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ def deserialize(self, data: bytes) -> bytes:

class _UrlParams(BaseModel):
compression_level: int = Field(3, alias="compression-level")
compression_threads: Annotated[int, Field(ge=0)] = Field(0, alias="compression-threads") # type: ignore
compression_threads: Annotated[int, Field(ge=0)] = Field(0, alias="compression-threads")
2 changes: 1 addition & 1 deletion cachetory/serializers/pickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def deserialize(self, data: bytes) -> ValueT:


class _UrlParams(BaseModel):
pickle_protocol: Annotated[int, Field(ge=0, le=pickle.HIGHEST_PROTOCOL)] = Field( # type: ignore
pickle_protocol: Annotated[int, Field(ge=0, le=pickle.HIGHEST_PROTOCOL)] = Field(
pickle.HIGHEST_PROTOCOL,
alias="pickle-protocol",
)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ build-backend = "poetry_dynamic_versioning.backend"
[tool.poetry.dependencies]
django = {version = "^4.0.0", optional = true}
ormsgpack = {version = "^1.4.0", optional = true, markers = "platform_python_implementation == 'CPython'"}
pydantic = "<3.0.0"
pydantic = ">2.0.0.0, <3.0.0.0"
python = "^3.8.0"
redis = {version = "^4.4.2 || ^5.0.0", optional = true}
typing-extensions = "^4.4.0"
Expand Down

0 comments on commit a7f878c

Please sign in to comment.