What's Changed
- Add StringConstraints for use as Annotated metadata by @adriangb in #6605
- Try to fix intermittently failing CI by @adriangb in #6683
- Remove redundant example of optional vs default. by @ehiggs-deliverect in #6676
- Docs update by @samuelcolvin in #6692
- Remove the Validate always section in validator docs by @adriangb in #6679
- Fix recursion error in json schema generation by @adriangb in #6720
- Fix incorrect subclass check for secretstr by @AlexVndnblcke in #6730
- update pdm / pdm lockfile to 2.8.0 by @davidhewitt in #6714
- unpin pdm on more CI jobs by @davidhewitt in #6755
- improve source locations for auxiliary packages in docs by @davidhewitt in #6749
- Assume builtins don't accept an info argument by @adriangb in #6754
- Fix bug where calling
help(BaseModelSubclass)
raises errors by @hramezani in #6758 - Fix mypy plugin handling of @model_validator(mode="after") by @ljodal in #6753
- update pydantic-core to 2.3.1 by @davidhewitt in #6756
- Mypy plugin for settings by @hramezani in #6760
- Use contentSchema keyword for JSON schema by @dmontagu in #6715
- fast-path checking finite decimals by @davidhewitt in #6769
- Docs update by @samuelcolvin in #6771
- Improve json schema doc by @hramezani in #6772
- Update validator docs by @adriangb in #6695
- Fix typehint for wrap validator by @dmontagu in #6788
- 🐛 Fix validation warning for unions of Literal and other type by @lig in #6628
- Update documentation for generics support in V2 by @tpdorsey in #6685
- add pydantic-core build info to
version_info()
by @samuelcolvin in #6785 - Fix pydantic dataclasses that use slots with default values by @dmontagu in #6796
- Fix inheritance of hash function for frozen models by @dmontagu in #6789
- ✨ Add
SkipJsonSchema
annotation by @Kludex in #6653 - Error if an invalid field name is used with Field by @dmontagu in #6797
- Add GenericModel to MOVED_IN_V2 by @adriangb in #6776
- Remove unused code from
docs/usage/types/custom.md
by @hramezani in #6803 - Fix float -> Decimal coercion precision loss by @adriangb in #6810
- remove email validation from the north star benchmark by @davidhewitt in #6816
- Fix link to mypy by @progsmile in #6824
- Improve initialization hooks example by @hramezani in #6822
- Fix default port for mongosrv DSNs by @dmontagu in #6827
- Improve API documentation, in particular more links between usage and API docs by @samuelcolvin in #6780
- update pydantic-core to 2.4.0 by @davidhewitt in #6831
- Fix annotated_types.MaxLen validator for custom sequence types by @ImogenBits in #6809
- Update V1 by @hramezani in #6833
- Make it so callable JSON schema extra works by @dmontagu in #6798
- Fix serialization issue with InstanceOf by @dmontagu in #6829
- Add back support for
json_encoders
by @adriangb in #6811 - Update field annotations when building the schema by @dmontagu in #6838
- Use WeakValueDictionary to fix generic memory leak by @dmontagu in #6681
- Add
config.defer_build
to optionally make model building lazy by @samuelcolvin in #6823 - delegate UUID serialization to pydantic-core by @davidhewitt in #6850
- Update
json_encoders
docs by @adriangb in #6848 - Fix error message for staticmethod/classmethod order with validate_call by @dmontagu in #6686
- Improve documentation for config by @samuelcolvin in #6847
- Update serialization doc to mention
Field.exclude
takes priority over call-timeinclude/exclude
by @hramezani in #6851 - Allow customizing core schema generation by making
GenerateSchema
public by @adriangb in #6737 - Prepare for release of v2.1.0 by @samuelcolvin in #6853
New Contributors
- @ehiggs-deliverect made their first contribution in #6676
- @AlexVndnblcke made their first contribution in #6730
- @ljodal made their first contribution in #6753
- @progsmile made their first contribution in #6824
- @ImogenBits made their first contribution in #6809
Full Changelog: v2.0.3...v2.1.0