Path to this page:
Subject: CVS commit: pkgsrc/devel/py-pydantic
From: Adam Ciarcinski
Date: 2024-09-07 07:34:25
Message id: 20240907053425.214E4FC74@cvs.NetBSD.org
Log Message:
py-pydantic: updated to 2.9.0
v2.9.0 (2024-09-05)
Packaging
* Bump `ruff` to `v0.5.0` and `pyright` to `v1.1.369`
* Bump `pydantic-extra-types` to `v2.9.0`
* Support compatibility with `pdm v2.18.1`
* Bump `v1` version stub to `v1.10.18`
* Bump `pydantic-core` to `v2.23.2`
New Features
* Add support for `ZoneInfo`
* Add `Config.val_json_bytes`
* Add DSN for Snowflake
* Support `complex` number
* Add support for `annotated_types.Not`
* Allow `WithJsonSchema` to inject `$ref`s w/ `http` or `https` links
* Allow validators to customize validation JSON schema
* Support parametrized `PathLike` types
* Add tagged union serializer that attempts to use `str` or `callable` \
discriminators to select the correct serializer
Changes
* Breaking Change: Merge `dict` type `json_schema_extra`
* For more info (how to replicate old behavior) on this change, see \
[here](https://docs.pydantic.dev/dev/concepts/json_schema/#merging-json_schema_extra)
* Refactor annotation injection for known (often generic) types
* Move annotation compatibility errors to validation phase
* Improve runtime errors for string constraints like `pattern` for incompatible types
* Remove `'allOf'` JSON schema workarounds
* Remove `typed_dict_cls` data from `CoreMetadata`
* Deprecate passing a dict to the `Examples` class
* Remove `initial_metadata` from internal metadata construct
* Use `re.Pattern.search` instead of `re.Pattern.match` for consistency with \
`rust` behavior
* Show value of wrongly typed data in `pydantic-core` serialization warning
* Breaking Change: in `pydantic-core`, change `metadata` type hint in core \
schemas from `Any` -> `Dict[str, Any] | None`
* Raise helpful warning when `self` isn't returned from model validator
Performance
* Initial start at improving import times for modules, using caching primarily
* Using cached internal import for `BaseModel`
* Simplify internal generics logic - remove generator overhead
* Remove default module globals from types namespace
* Performance boost: skip caching parent namespaces in most cases
* Update ns stack with already copied ns
Files: