mirror of
https://github.com/anomalyco/opencode-sdk-python.git
synced 2026-05-19 08:09:57 +00:00
chore(internal): update pydantic dependency
This commit is contained in:
parent
9d4fc2b970
commit
9751764207
3 changed files with 20 additions and 8 deletions
|
|
@ -88,9 +88,9 @@ pluggy==1.5.0
|
||||||
propcache==0.3.1
|
propcache==0.3.1
|
||||||
# via aiohttp
|
# via aiohttp
|
||||||
# via yarl
|
# via yarl
|
||||||
pydantic==2.10.3
|
pydantic==2.11.9
|
||||||
# via opencode-ai
|
# via opencode-ai
|
||||||
pydantic-core==2.27.1
|
pydantic-core==2.33.2
|
||||||
# via pydantic
|
# via pydantic
|
||||||
pygments==2.18.0
|
pygments==2.18.0
|
||||||
# via rich
|
# via rich
|
||||||
|
|
@ -126,6 +126,9 @@ typing-extensions==4.12.2
|
||||||
# via pydantic
|
# via pydantic
|
||||||
# via pydantic-core
|
# via pydantic-core
|
||||||
# via pyright
|
# via pyright
|
||||||
|
# via typing-inspection
|
||||||
|
typing-inspection==0.4.1
|
||||||
|
# via pydantic
|
||||||
virtualenv==20.24.5
|
virtualenv==20.24.5
|
||||||
# via nox
|
# via nox
|
||||||
yarl==1.20.0
|
yarl==1.20.0
|
||||||
|
|
|
||||||
|
|
@ -55,9 +55,9 @@ multidict==6.4.4
|
||||||
propcache==0.3.1
|
propcache==0.3.1
|
||||||
# via aiohttp
|
# via aiohttp
|
||||||
# via yarl
|
# via yarl
|
||||||
pydantic==2.10.3
|
pydantic==2.11.9
|
||||||
# via opencode-ai
|
# via opencode-ai
|
||||||
pydantic-core==2.27.1
|
pydantic-core==2.33.2
|
||||||
# via pydantic
|
# via pydantic
|
||||||
sniffio==1.3.0
|
sniffio==1.3.0
|
||||||
# via anyio
|
# via anyio
|
||||||
|
|
@ -68,5 +68,8 @@ typing-extensions==4.12.2
|
||||||
# via opencode-ai
|
# via opencode-ai
|
||||||
# via pydantic
|
# via pydantic
|
||||||
# via pydantic-core
|
# via pydantic-core
|
||||||
|
# via typing-inspection
|
||||||
|
typing-inspection==0.4.1
|
||||||
|
# via pydantic
|
||||||
yarl==1.20.0
|
yarl==1.20.0
|
||||||
# via aiohttp
|
# via aiohttp
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,7 @@ class BaseModel(pydantic.BaseModel):
|
||||||
mode: Literal["json", "python"] | str = "python",
|
mode: Literal["json", "python"] | str = "python",
|
||||||
include: IncEx | None = None,
|
include: IncEx | None = None,
|
||||||
exclude: IncEx | None = None,
|
exclude: IncEx | None = None,
|
||||||
by_alias: bool = False,
|
by_alias: bool | None = None,
|
||||||
exclude_unset: bool = False,
|
exclude_unset: bool = False,
|
||||||
exclude_defaults: bool = False,
|
exclude_defaults: bool = False,
|
||||||
exclude_none: bool = False,
|
exclude_none: bool = False,
|
||||||
|
|
@ -264,6 +264,7 @@ class BaseModel(pydantic.BaseModel):
|
||||||
warnings: bool | Literal["none", "warn", "error"] = True,
|
warnings: bool | Literal["none", "warn", "error"] = True,
|
||||||
context: dict[str, Any] | None = None,
|
context: dict[str, Any] | None = None,
|
||||||
serialize_as_any: bool = False,
|
serialize_as_any: bool = False,
|
||||||
|
fallback: Callable[[Any], Any] | None = None,
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump
|
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump
|
||||||
|
|
||||||
|
|
@ -295,10 +296,12 @@ class BaseModel(pydantic.BaseModel):
|
||||||
raise ValueError("context is only supported in Pydantic v2")
|
raise ValueError("context is only supported in Pydantic v2")
|
||||||
if serialize_as_any != False:
|
if serialize_as_any != False:
|
||||||
raise ValueError("serialize_as_any is only supported in Pydantic v2")
|
raise ValueError("serialize_as_any is only supported in Pydantic v2")
|
||||||
|
if fallback is not None:
|
||||||
|
raise ValueError("fallback is only supported in Pydantic v2")
|
||||||
dumped = super().dict( # pyright: ignore[reportDeprecated]
|
dumped = super().dict( # pyright: ignore[reportDeprecated]
|
||||||
include=include,
|
include=include,
|
||||||
exclude=exclude,
|
exclude=exclude,
|
||||||
by_alias=by_alias,
|
by_alias=by_alias if by_alias is not None else False,
|
||||||
exclude_unset=exclude_unset,
|
exclude_unset=exclude_unset,
|
||||||
exclude_defaults=exclude_defaults,
|
exclude_defaults=exclude_defaults,
|
||||||
exclude_none=exclude_none,
|
exclude_none=exclude_none,
|
||||||
|
|
@ -313,13 +316,14 @@ class BaseModel(pydantic.BaseModel):
|
||||||
indent: int | None = None,
|
indent: int | None = None,
|
||||||
include: IncEx | None = None,
|
include: IncEx | None = None,
|
||||||
exclude: IncEx | None = None,
|
exclude: IncEx | None = None,
|
||||||
by_alias: bool = False,
|
by_alias: bool | None = None,
|
||||||
exclude_unset: bool = False,
|
exclude_unset: bool = False,
|
||||||
exclude_defaults: bool = False,
|
exclude_defaults: bool = False,
|
||||||
exclude_none: bool = False,
|
exclude_none: bool = False,
|
||||||
round_trip: bool = False,
|
round_trip: bool = False,
|
||||||
warnings: bool | Literal["none", "warn", "error"] = True,
|
warnings: bool | Literal["none", "warn", "error"] = True,
|
||||||
context: dict[str, Any] | None = None,
|
context: dict[str, Any] | None = None,
|
||||||
|
fallback: Callable[[Any], Any] | None = None,
|
||||||
serialize_as_any: bool = False,
|
serialize_as_any: bool = False,
|
||||||
) -> str:
|
) -> str:
|
||||||
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json
|
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json
|
||||||
|
|
@ -348,11 +352,13 @@ class BaseModel(pydantic.BaseModel):
|
||||||
raise ValueError("context is only supported in Pydantic v2")
|
raise ValueError("context is only supported in Pydantic v2")
|
||||||
if serialize_as_any != False:
|
if serialize_as_any != False:
|
||||||
raise ValueError("serialize_as_any is only supported in Pydantic v2")
|
raise ValueError("serialize_as_any is only supported in Pydantic v2")
|
||||||
|
if fallback is not None:
|
||||||
|
raise ValueError("fallback is only supported in Pydantic v2")
|
||||||
return super().json( # type: ignore[reportDeprecated]
|
return super().json( # type: ignore[reportDeprecated]
|
||||||
indent=indent,
|
indent=indent,
|
||||||
include=include,
|
include=include,
|
||||||
exclude=exclude,
|
exclude=exclude,
|
||||||
by_alias=by_alias,
|
by_alias=by_alias if by_alias is not None else False,
|
||||||
exclude_unset=exclude_unset,
|
exclude_unset=exclude_unset,
|
||||||
exclude_defaults=exclude_defaults,
|
exclude_defaults=exclude_defaults,
|
||||||
exclude_none=exclude_none,
|
exclude_none=exclude_none,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue