Skip to content

Commit b48f1f4

Browse files
chore(internal): update pydantic dependency
1 parent 1cf74fe commit b48f1f4

File tree

3 files changed

+86
-61
lines changed

3 files changed

+86
-61
lines changed

requirements-dev.lock

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ prompt-toolkit==3.0.52
8989
# via llama-stack-client
9090
pyaml==25.7.0
9191
# via llama-stack-client
92-
pydantic==2.10.3
92+
pydantic==2.11.9
9393
# via llama-stack-client
94-
pydantic-core==2.27.1
94+
pydantic-core==2.33.2
9595
# via pydantic
9696
pygments==2.19.1
9797
# via
@@ -141,6 +141,9 @@ typing-extensions==4.12.2
141141
# pydantic
142142
# pydantic-core
143143
# pyright
144+
# typing-inspection
145+
typing-inspection==0.4.1
146+
# via pydantic
144147
tzdata==2025.2
145148
# via pandas
146149
urllib3==2.5.0

src/llama_stack_client/_models.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,15 @@ def model_dump(
256256
mode: Literal["json", "python"] | str = "python",
257257
include: IncEx | None = None,
258258
exclude: IncEx | None = None,
259-
by_alias: bool = False,
259+
by_alias: bool | None = None,
260260
exclude_unset: bool = False,
261261
exclude_defaults: bool = False,
262262
exclude_none: bool = False,
263263
round_trip: bool = False,
264264
warnings: bool | Literal["none", "warn", "error"] = True,
265265
context: dict[str, Any] | None = None,
266266
serialize_as_any: bool = False,
267+
fallback: Callable[[Any], Any] | None = None,
267268
) -> dict[str, Any]:
268269
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump
269270
@@ -295,10 +296,12 @@ def model_dump(
295296
raise ValueError("context is only supported in Pydantic v2")
296297
if serialize_as_any != False:
297298
raise ValueError("serialize_as_any is only supported in Pydantic v2")
299+
if fallback is not None:
300+
raise ValueError("fallback is only supported in Pydantic v2")
298301
dumped = super().dict( # pyright: ignore[reportDeprecated]
299302
include=include,
300303
exclude=exclude,
301-
by_alias=by_alias,
304+
by_alias=by_alias if by_alias is not None else False,
302305
exclude_unset=exclude_unset,
303306
exclude_defaults=exclude_defaults,
304307
exclude_none=exclude_none,
@@ -313,13 +316,14 @@ def model_dump_json(
313316
indent: int | None = None,
314317
include: IncEx | None = None,
315318
exclude: IncEx | None = None,
316-
by_alias: bool = False,
319+
by_alias: bool | None = None,
317320
exclude_unset: bool = False,
318321
exclude_defaults: bool = False,
319322
exclude_none: bool = False,
320323
round_trip: bool = False,
321324
warnings: bool | Literal["none", "warn", "error"] = True,
322325
context: dict[str, Any] | None = None,
326+
fallback: Callable[[Any], Any] | None = None,
323327
serialize_as_any: bool = False,
324328
) -> str:
325329
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json
@@ -348,11 +352,13 @@ def model_dump_json(
348352
raise ValueError("context is only supported in Pydantic v2")
349353
if serialize_as_any != False:
350354
raise ValueError("serialize_as_any is only supported in Pydantic v2")
355+
if fallback is not None:
356+
raise ValueError("fallback is only supported in Pydantic v2")
351357
return super().json( # type: ignore[reportDeprecated]
352358
indent=indent,
353359
include=include,
354360
exclude=exclude,
355-
by_alias=by_alias,
361+
by_alias=by_alias if by_alias is not None else False,
356362
exclude_unset=exclude_unset,
357363
exclude_defaults=exclude_defaults,
358364
exclude_none=exclude_none,

0 commit comments

Comments
 (0)