What's Changed
- Add
pydantic.typing.evaluate_forwardref
on the REMOVED_IN_V2 list by @Kludex in #5559 - Move types documentation to usage/types and fix links by @tpdorsey in #5556
- Fix bug caused by builtin generics not converting str to ForwardRef by @dmontagu in #5554
- Add docstrings for decorators.py by @tpdorsey in #5565
- Bump typing-extensions minimum version to 4.5.0 by @KanchiShimono in #5552
- Add test for validate_call by @hramezani in #5574
- Fix reviewer name on pyproject.toml by @Kludex in #5577
- test for allow info with
Decimal
by @samuelcolvin in #5585 - raise
TypeError
inField
andPrivateAttr
by @samuelcolvin in #5587 - Use only relative imports by @Kludex in #5576
- Change bare-enum behavior for strict json by @adriangb in #5591
- Json schema modify function as middleware by @adriangb in #5570
- Fix bug with recursive models with multiple references to the same type by @dmontagu in #5555
- Add a test for validation using context by @dmontagu in #5593
- Support UUID serialization to JSON by @Kludex in #5564
- Minor formatting fixes in docs by @tpdorsey in #5575
- Add test that proves order is preserved by @Kludex in #5600
- Uprev pydantic-core to 0.26.0 by @adriangb in #5602
- Support more complex typing structures with
Annotated
by @Kludex in #5603 - Improve consistency of error messages for Enum by @dmontagu in #5604
- Make it possible to have a plain BaseModel field annotation by @dmontagu in #5609
- Pydantic core 0.27.0 by @dmontagu in #5612
- Support
PathLike
by @samuelcolvin in #5589 - Add test for exotic approaches to forward refs by @dmontagu in #5526
- Add tests for date types by @Kludex in #5605
- Use PDM for lockfiles & env management by @adriangb in #5610
- Add
datetime_parse
module to the migration logic by @Kludex in #5617 - Migration notes for optional and nullable fields by @tpdorsey in #5618
- Fix dataclass module name by @adriangb in #5624
- Create a GetCoreSchemaHandler class by @adriangb in #5619
- Add model_validator to
pydantic.__all__
by @dmontagu in #5633 - using "mike" for documenting multiple versions by @samuelcolvin in #5626
- docs preview with CloudFlare pages by @samuelcolvin in #5638
- port alpha release blog post by @samuelcolvin in #5637
- fix blog images and devtools example by @samuelcolvin in #5639
- Attempt to fix CI python versions by @dmontagu in #5643
- Add make help command by @dmontagu in #5634
- Fix double-calling of json schema funcs w/ Annotated by @adriangb in #5647
- remove unused info arguments from validator functions by @samuelcolvin in #5653
- set URL for errors by @samuelcolvin in #5655
- Add error message for
unique_items
parameter inconlist
by @Kludex in #5650 - Update copy_on_model_validation tests by @hramezani in #5658
- Add missing types docs by @tpdorsey in #5616
- Error more eagerly for proper subclasses of generics that we don't know how to validate by @dmontagu in #5629
- Add alias generators to pydantic by @dmontagu in #5568
- Expand alias generator docstrings by @tpdorsey in #5669
- Expand validate_call docstring by @tpdorsey in #5670
- Remove xfail from
tests.test_edge_cases.test_int_subclass
as it is expected behavior by @hramezani in #5665 - 🐛
Sequence[str]
does not raise onstr
by @lig in #5599 - Delegate equality checks for BaseModel by @dmontagu in #5662
- Pin urllib3 in CI by @adriangb in #5675
- Add
deprecated
onBaseModel
methods by @Kludex in #5646 - Fix walk and apply by @adriangb in #5652
- Add job to create a tweet on release by @Kludex in #5567
- Add support for
*
tofield_validator
by @Kludex in #5657 - Re-add schema_extra functionality removed from config by @dmontagu in #5676
- Revise models docs to indicate attributes are copied for validation by @tpdorsey in #5632
- ✨ Add
Base64
and a generalEncoded
types by @lig in #5615 - Remove Kludex from hooky temporarily by @dmontagu in #5678
- rename tests/internal.py -> tests/test_internal.py by @adriangb in #5684
- Rename AnalyzedType to TypeAdapter by @hramezani in #5689
- Move errors docs to top nav by @tpdorsey in #5685
- Add
__prepare_pydantic_annotations__
for custom types by @adriangb in #5674 - Fix botched merge w/ rename of AnalyzedType -> TypeAdapter by @adriangb in #5692
- Use pydantic core main by @adriangb in #5680
- Test: Add test for variadic generic by @caniko in #5625
- 🔥 Remove Hypothesis plugin for now by @lig in #5691
- Use pydantic_serializer for serializing Any fields by @dmontagu in #5578
- Add a test demonstrating how to integrate with a third-party type by @dmontagu in #5620
- Pydantic settings docs by @tpdorsey in #5682
- Add
UrlConstraints.__hash__
by @madkinsz in #5697 - Add custom init support by @dmontagu in #5703
- Bump version to 2.0a4 by @dmontagu in #5704
New Contributors
- @KanchiShimono made their first contribution in #5552
- @lig made their first contribution in #5599
- @caniko made their first contribution in #5625
- @madkinsz made their first contribution in #5697
Full Changelog: v2.0a3...v2.0a4