Subject: CVS commit: pkgsrc/devel/py-pydantic
From: Adam Ciarcinski
Date: 2024-01-31 01:03:49
Message id: 20240131000350.0A58AFA42@cvs.NetBSD.org

Log Message:
py-pydantic: updated to 2.6.0

v2.6.0 (2024-01-23)

The code released in v2.6.0 is practically identical to that of v2.6.0b1.

What's Changed

Packaging

* Check for `email-validator` version >= 2.0
* Upgrade `ruff`` target version to Python 3.8
* Update to `pydantic-extra-types==2.4.1`
* Update to `pyright==1.1.345`
* Update pydantic-core from 2.14.6 to 2.16.1, significant changes from these \ 
updates are described below, full changelog \ 
[here](https://github.com/pydantic/pydantic-core/compare/v2.14.6...v2.16.1)

New Features

* Add `NatsDsn`
* Add `ConfigDict.ser_json_inf_nan`
* Add `types.OnErrorOmit`
* Support `AliasGenerator` usage
* Add Pydantic People Page to docs
* Support `yyyy-MM-DD` datetime parsing
* Added bits conversions to the `ByteSize`
* Enable json schema creation with type `ByteSize`
* Add `eval_type_backport` to handle union operator and builtin generic \ 
subscripting in older Pythons
* Add support for `dataclass` fields `init`
* Implement pickling for `ValidationError`
* Add unified tuple validator that can handle "variadic" tuples via PEP-646

Changes

* Drop Python3.7 support
* Drop Python 3.7, and PyPy 3.7 and 3.8
* Use positional-only `self` in `BaseModel` constructor, so no field name can \ 
ever conflict with it
* Make `@validate_call` return a function instead of a custom descriptor - fixes \ 
binding issue with inheritance and adds `self/cls` argument to validation errors
* Exclude `BaseModel` docstring from JSON schema description
* Introducing `classproperty` decorator for `model_computed_fields`
* Explicitly raise an error if field names clashes with types
* Use stricter serializer for unions of simple types

Performance

* Add Codspeed profiling Actions workflow
* Improve `int` extraction
* Improve performance of recursion guard
* `dataclass` serialization speedups
* Avoid `HashMap` creation when looking up small JSON objects in `LazyIndexMaps`
* use hashbrown to speedup python string caching
* Replace `Peak` with more efficient `Peek`

Fixes

* Move `getattr` warning in deprecated `BaseConfig`
* Only hash `model_fields`, not whole `__dict__`
* Fix mishandling of unions while freezing types in the `mypy` plugin
* Fix `mypy` error on untyped `ClassVar`
* Only compare pydantic fields in `BaseModel.__eq__` instead of whole `__dict__`
* Update `strict` docstring in `model_validate` method.
* Fix overload position of `computed_field`
* Fix custom type type casting used in multiple attributes
* Fix issue not allowing `validate_call` decorator to be dynamically assigned to \ 
a class method
* Fix issue `unittest.mock` deprecation warnings
* Added tests for the case `JsonValue` contains subclassed primitive values
* Fix `mypy` error on free before validator (classmethod)
* Fix `to_snake` conversion
* Fix type annotation of `ModelMetaclass.__prepare__`
* Disallow `config` specification when initializing a `TypeAdapter` when the \ 
annotated type has config already
* Fix a naming issue with JSON schema for generics parametrized by recursive \ 
type aliases
* Fix type annotation in pydantic people script
* Add support for field `alias` in `dataclass` signature
* Fix bug with schema generation with `Field(...)` in a forward ref
* Fix ordering of keys in `__dict__` with `model_construct` call
* Fix module `path_type` creation when globals does not contain `__name__`
* Fix for namespace issue with dataclasses with `from __future__ import annotations`
* Fix: make function validator types positional-only
* Fix usage of `@deprecated`
* Add more support for private attributes in `model_construct` call
* Use a stack for the types namespace
* Fix schema-building bug with `TypeAliasType` for types with refs
* Support `pydantic.Field(repr=False)` in dataclasses
* Override `dataclass_transform` behavior for `RootModel`
* Refactor signature generation for simplicity
* Fix ordering bug of PlainValidator annotation
* Fix `exclude_none` for json serialization of `computed_field`s
* Support yyyy-MM-DD string for datetimes
* Tweak ordering of definitions in generated schemas

Files:
RevisionActionfile
1.11modifypkgsrc/devel/py-pydantic/Makefile
1.3modifypkgsrc/devel/py-pydantic/PLIST
1.10modifypkgsrc/devel/py-pydantic/distinfo