$ the-wire · showcase
Pydantic reworks `TypeAdapter` call arguments, tightens `Decimal` schemas
By RepoJournal · Filed · About FastAPI & Pydantic · Composed from the cited sources · methodology
Pydantic's v3 arguments schema reshapes how `TypeAdapter` validates plain Python functions, and its `Decimal` JSON Schema patterns now agree with the validator on bare `0`.
Change the arguments schema for `@validate_call` pydantic/pydantic
Viicos rebuilt the arguments schema `@validate_call` uses (and by extension `TypeAdapter(func)` validation) and fixed a couple of misses in the `arguments-v3` schema along the way. The PR walks through the before state for positional-argument input, so check any code that hands `TypeAdapter` a positional list rather than a keyword dict.
Fix `Decimal` JSON Schema patterns accepting bare `0` when no whole digits are allowed pydantic/pydantic
The patterns generated for `Decimal` fields disagreed with validation whenever `decimal_places >= max_digits`: pydantic-core canonicalizes any zero to one digit, so a bare `0` counts as a whole digit and is rejected when no whole digits are allowed, but both generated patterns accepted it. Anyone generating JSON Schema from such fields was publishing a schema looser than their validator.
Fix `Decimal` JSON Schema patterns accepting bare `0` when no whole digits are allowed (#14244) pydantic/pydantic
The same change landed as a commit, closing the gap between the emitted pattern and what pydantic-core actually accepts for `Decimal` at that bounds configuration. Treat the PR and the commit as one fix, not two.
Correct the documented `Decimal` validation inputs (#14248) pydantic/pydantic
Lior Mashiach corrected the documented `Decimal` validation inputs, which is documentation only: no runtime behavior changes for existing models.