Subject: CVS commit: pkgsrc/devel/py-pydantic
From: Adam Ciarcinski
Date: 2024-04-18 14:26:55
Message id: 20240418122655.5F8A4FA2C@cvs.NetBSD.org

Log Message:
py-pydantic: updated to 2.7.0

v2.7.0 (2024-04-11)

Packaging

* Reorganize `pyproject.toml` sections
* Bump `pydantic-core` to `v2.18.1`
* Adopt `jiter` `v0.2.0`

New Features

* Extract attribute docstrings from `FieldInfo.description`
* Add a `with_config` decorator to comply with typing spec
* Allow an optional separator splitting the value and unit of the result of \ 
`ByteSize.human_readable`
* Add generic `Secret` base type
* Make use of `Sphinx` inventories for cross references in docs
* Add environment variable to disable plugins
* Add support for `deprecated` fields
* Allow `field_serializer('*')`
* Handle a case when `model_config` is defined as a model property
* Update `create_model()` to support `typing.Annotated` as input
* Add `ClickhouseDsn` support
* Add support for `re.Pattern[str]` to `pattern` field
* Support for `serialize_as_any` runtime setting
* Add support for `typing.Self`
* Ability to pass `context` to serialization
* Add feedback widget to docs with flarelytics integration
* Support for parsing partial JSON strings in Python

**Finalized in v2.7.0, rather than v2.7.0b1:**
* Add support for field level number to str coercion option
* Update `warnings` parameter for serialization utilities to allow raising a warning

Changes

* Correct docs, logic for `model_construct` behavior with `extra`
* Improve error message for improper `RootModel` subclasses
* Use `PEP570` syntax
* Add `enum` and `type` to the JSON schema for single item literals
* Deprecate `update_json_schema` internal function
* Serialize duration to hour minute second, instead of just seconds
* Trimming str before parsing to int and float

Performance

* `enum` validator improvements
* Move `enum` validation and serialization to Rust
* Improve schema generation for nested dataclasses
* Fast path for ASCII python string creation in JSON
* SIMD integer and string JSON parsing on `aarch64`(**Note:** SIMD on x86 will \ 
be implemented in a future release)
* Support JSON `Cow<str>` from `jiter`
* MAJOR performance improvement: update to PyO3 0.21 final
* cache Python strings

Fixes

* Fix strict parsing for some `Sequence`s
* Add a check on the existence of `__qualname__`
* Handle `__pydantic_extra__` annotation being a string or inherited
* Fix json validation for `NameEmail`
* Fix type-safety of attribute access in `BaseModel`
* Fix bug with `mypy` plugin and `no_strict_optional = True`
* Fix `ByteSize` error `type` change
* Fix inheriting annotations in dataclasses
* Fix regression in core schema generation for indirect definition references
* Fix unsupported types bug with plain validator
* Reverting problematic fix from 2.6 release, fixing schema building bug
* fixes `__pydantic_config__` ignored for TypeDict
* Fix test failures with `pytest v8.0.0` due to `pytest.warns()` starting to \ 
work inside `pytest.raises()`
* Use `is_valid_field` from 1.x for `mypy` plugin
* Better-support `mypy` strict equality flag
* model_json_schema export with Annotated types misses 'required' parameters
* Fix default inclusion in `FieldInfo.__repr_args__`
* Fix resolution of forward refs in dataclass base classes that are not present \ 
in the subclass module namespace
* Fix `BaseModel` type annotations to be resolvable by `typing.get_type_hints`
* Fix: allow empty string aliases with `AliasGenerator`
* Fix test along with `date` -> `datetime` timezone assumption fix
* Fix deprecation warning with usage of `ast.Str`
* Add missing `deprecated` decorators
* Fix serialization of `NameEmail` if name includes an email address
* Add information about class in error message of schema generation
* Make `TypeAdapter`'s typing compatible with special forms
* Fix issue with config behavior being baked into the ref schema for `enum`s
* More helpful error re wrong `model_json_schema` usage
* Fix nested discriminated union schema gen, pt 2
* Fix schema build for nested dataclasses / TypedDicts with discriminators
* Remove unnecessary logic for definitions schema gen with discriminated unions
* Fix handling of optionals in `mypy` plugin
* Fix `PlainSerializer` usage with std type constructor
* Remove unnecessary warning for config in plugin
* Fix default value serializing
* Fix extra fields check in `Model.__getattr__()`
* Fix `ClassVar` forward ref inherited from parent class
* fix sequence like validator with strict `True`
* Improve warning message when a field name shadows a field in a parent model
* Do not warn about shadowed fields if they are not redefined in a child class
* Fix discriminated union bug with unsubstituted type var
* Support serialization of `deque` when passed to `Sequence[blah blah blah]`
* Init private attributes from super-types in `model_post_init`
* fix `model_construct` with `validation_alias`
* Ensure json-schema generator handles `Literal` `null` types
* **Fixed in v2.7.0**: Fix allow extra generic

Files:
RevisionActionfile
1.16modifypkgsrc/devel/py-pydantic/Makefile
1.4modifypkgsrc/devel/py-pydantic/PLIST
1.15modifypkgsrc/devel/py-pydantic/distinfo