head 1.40; access; symbols pkgsrc-2026Q1:1.39.0.2 pkgsrc-2026Q1-base:1.39 pkgsrc-2025Q4:1.35.0.6 pkgsrc-2025Q4-base:1.35 pkgsrc-2025Q3:1.35.0.4 pkgsrc-2025Q3-base:1.35 pkgsrc-2025Q2:1.35.0.2 pkgsrc-2025Q2-base:1.35 pkgsrc-2025Q1:1.30.0.2 pkgsrc-2025Q1-base:1.30 pkgsrc-2024Q4:1.27.0.2 pkgsrc-2024Q4-base:1.27 pkgsrc-2024Q3:1.24.0.2 pkgsrc-2024Q3-base:1.24 pkgsrc-2024Q2:1.20.0.2 pkgsrc-2024Q2-base:1.20 pkgsrc-2024Q1:1.15.0.2 pkgsrc-2024Q1-base:1.15 pkgsrc-2023Q4:1.10.0.6 pkgsrc-2023Q4-base:1.10 pkgsrc-2023Q3:1.10.0.4 pkgsrc-2023Q3-base:1.10 pkgsrc-2023Q2:1.10.0.2 pkgsrc-2023Q2-base:1.10 pkgsrc-2023Q1:1.7.0.2 pkgsrc-2023Q1-base:1.7 pkgsrc-2022Q4:1.4.0.2 pkgsrc-2022Q4-base:1.4 pkgsrc-2022Q3:1.3.0.2 pkgsrc-2022Q3-base:1.3; locks; strict; comment @# @; 1.40 date 2026.04.28.13.06.42; author adam; state Exp; branches; next 1.39; commitid W8WnLm1vJncN7JDG; 1.39 date 2025.12.28.16.07.06; author gdt; state Exp; branches; next 1.38; commitid 1TwgXA0MkNrY0coG; 1.38 date 2025.12.28.15.52.39; author gdt; state Exp; branches; next 1.37; commitid ieOJYaAWFnn1WboG; 1.37 date 2025.12.28.15.39.43; author gdt; state Exp; branches; next 1.36; commitid g20wbnOfZqabQboG; 1.36 date 2025.12.26.10.49.13; author adam; state Exp; branches; next 1.35; commitid o9WUy6Q4eM5MjUnG; 1.35 date 2025.06.15.08.28.01; author adam; state Exp; branches; next 1.34; commitid rTx4eZDpHIfXLXYF; 1.34 date 2025.05.23.06.41.29; author adam; state Exp; branches; next 1.33; commitid EfvE6F1a4b0fVZVF; 1.33 date 2025.05.02.07.11.51; author adam; state Exp; branches; next 1.32; commitid EYPNpm0uxPbuLiTF; 1.32 date 2025.04.22.11.28.13; author adam; state Exp; branches; next 1.31; commitid TlS4OfTQU6Rwv2SF; 1.31 date 2025.04.18.12.29.19; author adam; state Exp; branches; next 1.30; commitid sjiph3f9RGtfYwRF; 1.30 date 2025.01.25.11.47.31; author adam; state Exp; branches; next 1.29; commitid LpoiPizU4GVkpRGF; 1.29 date 2025.01.09.14.23.14; author adam; state Exp; branches; next 1.28; commitid 4qJYAG9lKPoJMOEF; 1.28 date 2024.12.24.22.20.19; author adam; state Exp; branches; next 1.27; commitid DYwgmwy0kcJhWNCF; 1.27 date 2024.12.04.11.25.32; author adam; state Exp; branches; next 1.26; commitid cbQGyBqxKFNtXaAF; 1.26 date 2024.11.22.07.51.04; author adam; state Exp; branches; next 1.25; commitid HcN27eu2PswP9CyF; 1.25 date 2024.11.21.06.04.33; author adam; state Exp; branches; next 1.24; commitid JImTY60PIbR2BtyF; 1.24 date 2024.09.19.15.05.53; author adam; state Exp; branches; next 1.23; commitid GXMjCzLMUdDvCqqF; 1.23 date 2024.09.09.16.51.29; author adam; state Exp; branches; next 1.22; commitid chg5LYkq8KfJw9pF; 1.22 date 2024.09.07.05.34.24; author adam; state Exp; branches; next 1.21; commitid r6EBFBKEwCPcQPoF; 1.21 date 2024.07.04.11.24.20; author adam; state Exp; branches; next 1.20; commitid bJ4KrlwHUUEMRvgF; 1.20 date 2024.06.12.15.13.50; author adam; state Exp; branches; next 1.19; commitid bWAlIq01raGxQHdF; 1.19 date 2024.06.06.05.20.10; author adam; state Exp; branches; next 1.18; commitid 1Wb8rdmnZp3SKScF; 1.18 date 2024.05.29.07.30.39; author adam; state Exp; branches; next 1.17; commitid wRR0qz5S51SCJRbF; 1.17 date 2024.04.24.12.43.18; author adam; state Exp; branches; next 1.16; commitid inOQySKXhMYzAo7F; 1.16 date 2024.04.18.12.26.55; author adam; state Exp; branches; next 1.15; commitid lF3ByfXkt9AQGC6F; 1.15 date 2024.03.17.12.53.53; author adam; state Exp; branches; next 1.14; commitid XM6mTSjqEDAURv2F; 1.14 date 2024.02.28.08.15.30; author adam; state Exp; branches; next 1.13; commitid ewElFCGnrU5jUa0F; 1.13 date 2024.02.25.22.55.41; author adam; state Exp; branches; next 1.12; commitid Xyt3G7yw2MzhSRZE; 1.12 date 2024.02.05.21.20.27; author adam; state Exp; branches; next 1.11; commitid zwxiPuEwvHDmZhXE; 1.11 date 2024.01.31.00.03.49; author adam; state Exp; branches; next 1.10; commitid tRRcTbfJeLHk5xWE; 1.10 date 2023.06.09.09.39.32; author adam; state Exp; branches; next 1.9; commitid JLFXEiStOPleRfsE; 1.9 date 2023.05.29.18.00.36; author adam; state Exp; branches; next 1.8; commitid qkmajkffz5s1ZSqE; 1.8 date 2023.04.04.11.21.37; author adam; state Exp; branches; next 1.7; commitid wMcrU6Z0n6HIxMjE; 1.7 date 2023.03.09.05.33.49; author adam; state Exp; branches; next 1.6; commitid 3Y57S5OUkkvhspgE; 1.6 date 2023.02.18.21.02.40; author adam; state Exp; branches; next 1.5; commitid YzB7xuCMyTRNc3eE; 1.5 date 2023.01.02.13.15.56; author adam; state Exp; branches; next 1.4; commitid OhjLxssYw56n8Y7E; 1.4 date 2022.10.25.09.15.04; author adam; state Exp; branches; next 1.3; commitid hkeAWkJMUAw815ZD; 1.3 date 2022.08.23.11.20.40; author adam; state Exp; branches; next 1.2; commitid 5edsJWZQCBOVJZQD; 1.2 date 2022.08.01.18.47.40; author wiz; state Exp; branches; next 1.1; commitid NDi6qBQnqHOVUcOD; 1.1 date 2022.07.24.10.48.25; author gdt; state Exp; branches; next ; commitid Xl8quZSmBIXBw8ND; desc @@ 1.40 log @py-pydantic: updated to 2.13.3 2.13.3 Handle AttributeError subclasses with from_attributes 2.13.2 Fix ValidationInfo.field_name missing with model_validate_json() 2.13.1 Fix ValidationInfo.data missing with model_validate_json() @ text @# $NetBSD: Makefile,v 1.39 2025/12/28 16:07:06 gdt Exp $ # NB: pydantic expresses an exact dependency on pydantic-core. While # unfortunate, it is actually true, and pydantic with non-matching # versions of pydantic-core fail to build matrix-synapse. # https://github.com/pydantic/pydantic/issues/12189#issuecomment-3227083571 DISTNAME= pydantic-2.13.3 PKGNAME= ${PYPKGPREFIX}-${DISTNAME} CATEGORIES= devel python MASTER_SITES= ${MASTER_SITE_PYPI:=p/pydantic/} MAINTAINER= pkgsrc-users@@NetBSD.org HOMEPAGE= https://github.com/pydantic/pydantic COMMENT= Data validation and settings management using python type hints LICENSE= mit TOOL_DEPENDS+= ${PYPKGPREFIX}-hatch-fancy-pypi-readme>=22.5.0:../../devel/py-hatch-fancy-pypi-readme TOOL_DEPENDS+= ${PYPKGPREFIX}-hatchling-[0-9]*:../../devel/py-hatchling DEPENDS+= ${PYPKGPREFIX}-annotated-types>=0.6.0:../../lang/py-annotated-types # We must express the exact dependency from pyproject.toml with # respect to upstream's version, but allow for possible nbN versions. DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.46.3<2.46.4:../../devel/py-pydantic-core DEPENDS+= ${PYPKGPREFIX}-typing-extensions>=4.14.1:../../devel/py-typing-extensions DEPENDS+= ${PYPKGPREFIX}-typing-inspection>=0.4.2:../../devel/py-typing-inspection TEST_DEPENDS+= ${PYPKGPREFIX}-cloudpickle-[0-9]*:../../converters/py-cloudpickle TEST_DEPENDS+= ${PYPKGPREFIX}-dirty-equals-[0-9]*:../../devel/py-dirty-equals TEST_DEPENDS+= ${PYPKGPREFIX}-email_validator>=2.0.0:../../mail/py-email_validator TEST_DEPENDS+= ${PYPKGPREFIX}-faker>=18.13.0:../../devel/py-faker TEST_DEPENDS+= ${PYPKGPREFIX}-jsonschema>=4.23.0:../../textproc/py-jsonschema TEST_DEPENDS+= ${PYPKGPREFIX}-pytz-[0-9]*:../../time/py-pytz TEST_DEPENDS+= ${PYPKGPREFIX}-rich-[0-9]*:../../comms/py-rich TEST_DEPENDS+= ${PYPKGPREFIX}-test-benchmark>=4.0.0:../../devel/py-test-benchmark TEST_DEPENDS+= ${PYPKGPREFIX}-test-codspeed-[0-9]*:../../devel/py-test-codspeed TEST_DEPENDS+= ${PYPKGPREFIX}-test-examples-[0-9]*:../../devel/py-test-examples TEST_DEPENDS+= ${PYPKGPREFIX}-test-mock-[0-9]*:../../devel/py-test-mock TEST_DEPENDS+= ${PYPKGPREFIX}-test-run-parallel>=0.3.1:../../devel/py-test-run-parallel USE_LANGUAGES= # none # TODO: import cloudpickle and test-examples pre-test: ${RM} -f ${WRKSRC}/tests/test_docs.py ${WRKSRC}/tests/test_pickle.py .include "../../lang/python/wheel.mk" .include "../../mk/bsd.pkg.mk" @ 1.39 log @devel/py-pydantic: Allow possible nbN versions of py-pydantic-core Thanks to wiz@@ for pointing this out. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.38 2025/12/28 15:52:39 gdt Exp $ d7 1 a7 1 DISTNAME= pydantic-2.12.5 a18 1 d22 1 a22 1 DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.41.5<2.41.6:../../devel/py-pydantic-core a24 1 @ 1.38 log @devel/py-pydantic: Also DEPEND exactly on py-pydantic-core @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.37 2025/12/28 15:39:43 gdt Exp $ d19 1 d21 3 a23 1 DEPENDS+= ${PYPKGPREFIX}-pydantic-core-2.41.5:../../devel/py-pydantic-core d26 1 @ 1.37 log @devel/py-pydantic-*: Drop incorrect relaxation of exact dep and add caution As posted to tech-pkg on 5 December, pydantic really does have an exact dependency on pydantic-core (even though the version numbers do not match). The previous update was broken, and matrix-synapse failed to build. Drop the patch to pyproject.toml that relaxes the dependency, as 1) wrong and 2) not documented or reported upstream (who would say no, it's right). Add comments that these two packages need to be updated in sync with version numbers that meet upstream's dependency patterns. No PKGREVISION++, as the binary package doesn't change. It's just that a future bad update will cause a build failure, if someone does that without reading the comments. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.36 2025/12/26 10:49:13 adam Exp $ d20 1 a20 1 DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.41.5:../../devel/py-pydantic-core @ 1.36 log @py-pydantic: updated to 2.12.5 2.12.5 (2025-11-26) This is the fifth 2.12 patch release, addressing an issue with the `MISSING` sentinel and providing several documentation improvements. The next 2.13 minor release will be published in a couple weeks, and will include a new *polymorphic serialization* feature addressing the remaining unexpected changes to the *serialize as any* behavior. * Fix pickle error when using `model_construct()` on a model with `MISSING` as a default value * Several updates to the documentation @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.35 2025/06/15 08:28:01 adam Exp $ d3 4 @ 1.35 log @py-pydantic: updated to 2.11.7 v2.11.7 (2025-06-14) Fixes * Copy `FieldInfo` instance if necessary during `FieldInfo` build v2.11.6 (2025-06-13) Fixes * Rebuild dataclass fields before schema generation * Always store the original field assignment on `FieldInfo` @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.34 2025/05/23 06:41:29 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.11.7 d16 3 a18 2 DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.33.1:../../devel/py-pydantic-core DEPENDS+= ${PYPKGPREFIX}-typing-inspection>=0.4.0:../../devel/py-typing-inspection @ 1.34 log @py-pydantic: updated to 2.11.5 2.11.5 (2025-05-22) Fixes * Check if `FieldInfo` is complete after applying type variable map * Do not delete mock validator/serializer in `model_rebuild()` * Do not duplicate metadata on model rebuild @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.33 2025/05/02 07:11:51 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.11.5 @ 1.33 log @py-pydantic: updated to 2.11.4 v2.11.4 (2025-04-29) Packaging * Bump `mkdocs-llmstxt` to v0.2.0 Changes * Allow config and bases to be specified together in `create_model()` This change was backported as it was previously possible (although not meant to be supported) to provide `model_config` as a field, which would make it possible to provide both configuration and bases. Fixes * Remove generics cache workaround * Remove coercion of decimal constraints * Fix crash when expanding root type in the mypy plugin * Fix issue with recursive generic models * Traverse `function-before` schemas during schema gathering @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.32 2025/04/22 11:28:13 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.11.4 @ 1.32 log @py-pydantic: relax pydantic-core version requirement; add TEST_DEPENDS @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.31 2025/04/18 12:29:19 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.11.3 @ 1.31 log @py-pydantic: updated to 2.11.3 2.11.3 Packaging Update V1 copy to v1.10.21 Fixes Preserve field description when rebuilding model fields 2.11.2 Fixes Bump pydantic-core to v2.33.1 Make sure __pydantic_private__ exists before setting private attributes Do not override FieldInfo._complete when using field from parent class Provide the available definitions when applying discriminated unions Do not expand root type in the mypy plugin for variables Mention the attribute name in model fields deprecation message Properly validate parameterized mappings 2.11.1 Fixes Do not override 'definitions-ref' schemas containing serialization schemas or metadata @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.30 2025/01/25 11:47:31 adam Exp $ d26 1 d29 1 @ 1.30 log @py-pydantic: updated to 2.10.6 v2.10.6 (2025-01-23) * Fix JSON Schema reference collection with `'examples'` keys * Fix url python serialization @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.29 2025/01/09 14:23:14 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.10.6 d16 2 a17 2 DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.27.2:../../devel/py-pydantic-core DEPENDS+= ${PYPKGPREFIX}-typing-extensions>=4.12.2:../../devel/py-typing-extensions @ 1.29 log @py-pydantic: updated to 2.10.5 v2.10.5 (2025-01-08) What's Changed * Remove custom MRO implementation of Pydantic models * Fix URL serialization for unions @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.28 2024/12/24 22:20:19 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.10.5 @ 1.28 log @py-pydantic: updated to 2.10.4 v2.10.4 (2024-12-18) Packaging * Bump `pydantic-core` to v2.27.2 Fixes * Fix for comparison of `AnyUrl` objects * Properly fetch PEP 695 type params for functions, do not fetch annotations from signature * Include JSON Schema input core schema in function schemas * Add `len` to `_BaseUrl` to avoid TypeError * Make sure the type reference is removed from the seen references @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.27 2024/12/04 11:25:32 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.10.4 @ 1.27 log @py-pydantic: updated to 2.10.3 v2.10.3 (2024-12-03) Fixes * Set fields when `defer_build` is set on Pydantic dataclasses * Do not resolve the JSON Schema reference for `dict` core schema keys * Use the globals of the function when evaluating the return type for `PlainSerializer` and `WrapSerializer` functions * Fix host required enforcement for urls to be compatible with v2.9 behavior * Add a `default_factory_takes_validated_data` property to `FieldInfo` * Fix url json schema in `serialization` mode v2.10.2 (2024-11-25) Fixes * Only evaluate FieldInfo annotations if required during schema building * Do not evaluate annotations for private fields * Support serialization as any for `Secret` types and `Url` types * Fix type hint of `Field.default` to be compatible with Python 3.8 and 3.9 * Add hashing support for URL types * Hide `BaseModel.__replace__` definition from type checkers @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.26 2024/11/22 07:51:04 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.10.3 d16 1 a16 1 DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.27.1:../../devel/py-pydantic-core d18 1 a18 1 #TEST_DEPENDS+= ${PYPKGPREFIX}-cloudpickle-[0-9]* d23 1 d26 1 a26 1 #TEST_DEPENDS+= ${PYPKGPREFIX}-test-examples-[0-9]*:../../devel/py-test-examples @ 1.26 log @py-pydantic: updated to 2.10.1 v2.10.1 Packaging * Bump `pydantic-core` version to `v2.27.1` Fixes * Use the correct frame when instantiating a parametrized `TypeAdapter` * Relax check for validated data in `default_factory` utils * Fix type checking issue with `model_fields` and `model_computed_fields` * Use the parent configuration during schema generation for stdlib `dataclass`es * Use the `globals` of the function when evaluating the return type of serializers and `computed_field`s * Fix URL constraint application * Fix URL equality with different validation methods * Fix JSON schema title when specified as `''` * Fix `python` mode serialization for `complex` inference @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.25 2024/11/21 06:04:33 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.10.1 @ 1.25 log @py-pydantic: updted to 2.10.0 v2.10.0 Packaging * Bump `pydantic-core` to `v2.27.0` * Replaced pdm with uv New Features * Support `fractions.Fraction` * Support `Hashable` for json validation * Add a `SocketPath` type for `linux` systems * Allow arbitrary refs in JSON schema `examples` * Support `defer_build` for Pydantic dataclasses * Adding v1 / v2 incompatibility warning for nested v1 model * Add support for unpacked `TypedDict` to type hint variadic keyword arguments with `@@validate_call` * Support compiled patterns in `protected_namespaces` * Add support for `propertyNames` in JSON schema * Adding `__replace__` protocol for Python 3.13+ support * Expose public `sort` method for JSON schema generation * Add runtime validation of `@@validate_call` callable argument * Add `experimental_allow_partial` support * Support default factories taking validated data as an argument * Allow subclassing `ValidationError` and `PydanticCustomError` * Add `trailing-strings` support to `experimental_allow_partial` * Add `rebuild()` method for `TypeAdapter` and simplify `defer_build` patterns * Improve `TypeAdapter` instance repr Changes * Don't allow customization of `SchemaGenerator` until interface is more stable * Cleanly `defer_build` on `TypeAdapters`, removing experimental flag * Fix `mro` of generic subclass * Strip whitespaces on JSON Schema title generation * Use `b64decode` and `b64encode` for `Base64Bytes` type * Relax protected namespace config default * Revalidate parametrized generics if instance's origin is subclass of OG class * Warn if configuration is specified on the `@@dataclass` decorator and with the `__pydantic_config__` attribute * Recommend against using `Ellipsis` (...) with `Field` * Migrate to subclassing instead of annotated approach for pydantic url types * Change JSON schema generation of `Literal`s and `Enums` * Simplify unions involving `Any` or `Never` when replacing type variables * Do not require padding when decoding `base64` bytes * Support dates all the way to 1BC Performance * Schema cleaning: skip unnecessary copies during schema walking * Refactor namespace logic for annotations evaluation * Improve email regexp on edge cases * `CoreMetadata` refactor with an emphasis on documentation, schema build time performance, and reducing complexity Fixes * Remove guarding check on `computed_field` with `field_serializer` * Fix `Predicate` issue in `v2.9.0` * Fixing `annotated-types` bound * Turn `tzdata` install requirement into optional `timezone` dependency * Use correct types namespace when building `namedtuple` core schemas * Fix evaluation of stringified annotations during namespace inspection * Fix `IncEx` type alias definition * Do not error when trying to evaluate annotations of private attributes * Fix nested type statement * Improve typing of `ModelMetaclass.mro` * Fix class access of deprecated `computed_field`s * Make sure `inspect.iscoroutinefunction` works on coroutines decorated with `@@validate_call` * Fix `NameError` when using `validate_call` with PEP 695 on a class * Fix `ZoneInfo` with various invalid types * Fix `PydanticUserError` on empty `model_config` with annotations * Fix variance issue in `_IncEx` type alias, only allow `True` * Fix serialization schema generation when using `PlainValidator` * Fix schema generation error when serialization schema holds references * Inline references if possible when generating schema for `json_schema_input_type` * Fix recursive arguments in `Representation` * Fix representation for builtin function types * Add python validators for decimal constraints (`max_digits` and `decimal_places`) * Only fetch `__pydantic_core_schema__` from the current class during schema generation * Fix `stacklevel` on deprecation warnings for `BaseModel` * Fix warning `stacklevel` in `BaseModel.__init__` * Improve error handling for in-evaluable refs for discriminator application * Change the signature of `ConfigWrapper.core_config` to take the title directly * Do not use the previous config from the stack for dataclasses without config * Fix serialization for IP types with `mode='python'` * Support constraint application for `Base64Etc` types * Fix `validate_call` ignoring `Field` in `Annotated` * Raise an error when `Self` is invalid * Using `core_schema.InvalidSchema` instead of metadata injection + checks * Tweak type alias logic * Support usage of `type` with `typing.Self` and type aliases * Use overloads for `Field` and `PrivateAttr` functions * Clean up the `mypy` plugin implementation * Properly check for `typing_extensions` variant of `TypeAliasType` * Allow any mapping in `BaseModel.model_copy()` * Fix `isinstance` behavior for urls * Ensure `cached_property` can be set on Pydantic models * Fix equality checks for primitives in literals * Properly enforce `host_required` for URLs * Fix when `coerce_numbers_to_str` enabled and string has invalid Unicode character * Fix serializing `complex` values in `Enum`s * Refactor `_typing_extra` module * Support intuitive equality for urls * Add `bytearray` to `TypeAdapter.validate_json` signature * Ensure class access of method descriptors is performed when used as a default with `Field` * Fix circular import with `validate_call` * Fix error when using type aliases referencing other type aliases * Fix `IncEx` type alias to be compatible with mypy * Make `__signature__` a lazy property, do not deepcopy defaults * Make `__signature__` lazy for dataclasses, too * Subclass all single host url classes from `AnyUrl` to preserve behavior from v2.9 @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.24 2024/09/19 15:05:53 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.10.0 d16 1 a16 1 DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.27.0:../../devel/py-pydantic-core @ 1.24 log @py-pydantic: updated to 2.9.2 v2.9.2 (2024-09-17) Fixes * Do not error when trying to evaluate annotations of private attributes * Adding notes on designing sound `Callable` discriminators * Fix serialization schema generation when using `PlainValidator` * Fix `Union` serialization warnings * Fix variance issue in `_IncEx` type alias, only allow `True` * Fix `ZoneInfo` validation with various invalid types @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.23 2024/09/09 16:51:29 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.9.2 d16 1 a16 1 DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.23.3:../../devel/py-pydantic-core @ 1.23 log @py-pydantic: updated to 2.9.1 v2.9.1 Fix Predicate issue in v2.9.0 Fixing annotated-types bound to >=0.6.0 Turn tzdata install requirement into optional timezone dependency Fix IncExc type alias definition Use correct types namespace when building namedtuple core schemas Fix evaluation of stringified annotations during namespace inspection Fix tagged union serialization with alias generators @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.22 2024/09/07 05:34:24 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.9.1 @ 1.22 log @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 @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.21 2024/07/04 11:24:20 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.9.0 d15 2 a16 2 DEPENDS+= ${PYPKGPREFIX}-annotated-types>=0.4.0:../../lang/py-annotated-types DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.23.2:../../devel/py-pydantic-core a17 1 DEPENDS+= ${PYPKGPREFIX}-tzdata-[0-9]*:../../time/py-tzdata d22 1 @ 1.21 log @py-pydantic: updated to 2.8.2 v2.8.2 Fixes Fix issue with assertion caused by pluggable schema validator v2.8.1 Packaging Bump ruff to v0.5.0 and pyright to v1.1.369 Bump pydantic-core to v2.20.1, pydantic-extra-types to v2.9.0 Fixes Fix breaking change in to_snake from v2.7 -> v2.8 Fix list constraint json schema application Support time duration more than 23 Fix millisecond fraction being handled with the wrong scale Handle negative fractional durations correctly v2.8.0 Packaging Update citation version automatically with new releases Bump pyright to v1.1.367 and add type checking tests for pipeline API Update pydantic.v1 stub to v1.10.17 General package updates to prep for v2.8.0b1 Bump pydantic-core to v2.20.0 Add support for Python 3.13 Update pdm version used for pdm.lock to v2.16.1 Update to ruff v0.4.8 New Features Experimental: support defer_build for TypeAdapter Implement deprecated field in json schema Experimental: Add pipeline API Add support for programmatic title generation Implement fail_fast feature Add ser_json_inf_nan='strings' mode to produce valid JSON Changes Add warning when "alias" is set in ignored Annotated field Support serialization of some serializable defaults in JSON schema Relax type specification for __validators__ values in create_model Breaking Change: Improve smart union matching logic You can read more about our smart union matching logic here. In some cases, if the old behavior is desired, you can switch to left-to-right mode and change the order of your Union members. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.20 2024/06/12 15:13:50 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.8.2 d16 1 a16 1 DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.20.1:../../devel/py-pydantic-core d18 1 d23 1 a29 2 PYTHON_VERSIONS_INCOMPATIBLE= 27 @ 1.20 log @py-pydantic: updated to 2.7.4 v2.7.4 (2024-06-12) Packaging * Bump `pydantic.v1` to `v1.10.16` reference Fixes * Specify `recursive_guard` as kwarg in `FutureRef._evaluate` @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.19 2024/06/06 05:20:10 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.7.4 d16 2 a17 2 DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.18.4:../../devel/py-pydantic-core DEPENDS+= ${PYPKGPREFIX}-typing-extensions>=4.6.1:../../devel/py-typing-extensions @ 1.19 log @py-pydantic: updated to 2.7.3 v2.7.3 (2024-06-03) Packaging * Bump `pydantic-core` to `v2.18.4` Fixes * Fix u style unicode strings in python @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.18 2024/05/29 07:30:39 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.7.3 @ 1.18 log @py-pydantic: updated to 2.7.2 v2.7.2 Packaging Bump pydantic-core to v2.18.3 Fixes Replace __spec__.parent with __package__ Fix validation of ints with leading unary minus Fix str subclass validation for enums Support BigInts in Literals and Enums Fix: uuid - allow str subclass as input @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.17 2024/04/24 12:43:18 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.7.2 d16 1 a16 1 DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.18.3:../../devel/py-pydantic-core @ 1.17 log @py-pydantic: updated to 2.7.1 v2.7.1 Packaging Bump pydantic-core to v2.18.2 New Features Ftp and Websocket connection strings support Changes Use field description for RootModel schema description when there is … Fixes Fix validation_alias behavior with model_construct for AliasChoices and AliasPath Revert typing.Literal and import it outside the TYPE_CHECKING block Fix Secret serialization schema, applicable for unions Fix strict application to function-after with use_enum_values Address case where model_construct on a class which defines model_post_init fails with AttributeError Fix model_json_schema with config types Support multiple zeros as an int Fix validation of ints with leading unary plus Fix interaction between extra != 'ignore' and from_attributes=True Handle error from Enum's missing function as ValidationError Fix memory leak with Iterable validation @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.16 2024/04/18 12:26:55 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.7.1 d16 1 a16 1 DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.18.2:../../devel/py-pydantic-core @ 1.16 log @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` 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 @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.15 2024/03/17 12:53:53 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.7.0 d16 1 a16 1 DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.18.1:../../devel/py-pydantic-core @ 1.15 log @py-pydantic: updated to 2.6.4 v2.6.4 (2024-03-08) Fixes * Fix usage of `AliasGenerator` with `computed_field` decorator * Fix nested discriminated union schema gen, pt 2 * Fix bug with no_strict_optional=True caused by API deferral @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.14 2024/02/28 08:15:30 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.6.4 d16 1 a16 1 DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.16.3:../../devel/py-pydantic-core @ 1.14 log @py-pydantic: updated to 2.6.3 v2.6.3 (2024-02-27) Packaging * Update `pydantic-settings` version in the docs Fixes * Fix discriminated union schema gen bug @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.13 2024/02/25 22:55:41 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.6.3 @ 1.13 log @py-pydantic: updated to 2.6.2 v2.6.2 (2024-02-23) Packaging Upgrade to pydantic-core 2.16.3 Fixes 'YYYY-MM-DD' date string coerced to datetime shouldn't infer timezone @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.12 2024/02/05 21:20:27 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.6.2 @ 1.12 log @py-pydantic: updated to 2.6.1 v2.6.1 (2024-02-05) Packaging * Upgrade to `pydantic-core` 2.16.2 Fixes * Fix bug with `mypy` plugin and `no_strict_optional = True` * Fix `ByteSize` error `type` change * Fix inheriting `Field` annotations in dataclasses * Fix regression in core schema generation for indirect definition references * Fix unsupported types bug with `PlainValidator` * Reverting problematic fix from 2.6 release, fixing schema building bug * Fix warning for tuple of wrong size in `Union` * Fix `computed_field` JSON serializer `exclude_none` behavior @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.11 2024/01/31 00:03:49 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.6.1 d9 1 a9 1 HOMEPAGE= https://github.com/samuelcolvin/pydantic d16 1 a16 1 DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.16.2:../../devel/py-pydantic-core @ 1.11 log @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 @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.10 2023/06/09 09:39:32 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-2.6.0 d16 1 a16 1 DEPENDS+= ${PYPKGPREFIX}-pydantic-core>=2.16.1:../../devel/py-pydantic-core @ 1.10 log @py-pydantic: updated to 1.10.9 v1.10.9 (2023-06-07) * Fix trailing zeros not ignored in Decimal validation, * Fix mypy plugin for v1.4.0, * Add future and past date hypothesis strategies, * Discourage usage of Cython 3 with Pydantic 1.x @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.9 2023/05/29 18:00:36 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-1.10.9 d13 14 a26 1 DEPENDS+= ${PYPKGPREFIX}-typing-extensions>=4.2.0:../../devel/py-typing-extensions d30 3 a32 2 MAKE_ENV+= SKIP_CYTHON=1 USE_LANGUAGES= # none d34 1 a34 1 .include "../../lang/python/egg.mk" @ 1.9 log @py-pydantic: updated to 1.10.8 v1.10.8 (2023-05-23) * Fix a bug in `Literal` usage with `typing-extension==4.6.0` * Update email-validator dependency to >=2.0.0post2 * update `AnyClassMethod` for changes @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.8 2023/04/04 11:21:37 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-1.10.8 @ 1.8 log @py-pydantic: updated to 1.10.7 v1.10.7 (2023-03-22) * Fix creating schema from model using `ConstrainedStr` with `regex` as dict key * Address bug in mypy plugin caused by explicit_package_bases=True * Add implicit defaults in the mypy plugin for Field with no default argument * Fix schema generated for Enum values used as Literals in discriminated unions * Fix mypy failures caused by the pydantic mypy plugin when users define `from_orm` in their own classes * Fix `InitVar` usage with pydantic dataclasses, mypy version `1.1.1` and the custom mypy plugin @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.7 2023/03/09 05:33:49 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-1.10.7 @ 1.7 log @py-pydantic: updated to 1.10.6 v1.10.6 (2023-03-08) * Implement logic to support creating validators from non standard callables by using defaults to identify them and unwrapping `functools.partial` and `functools.partialmethod` when checking the signature * Fix mypy plugin for v1.1.1, and fix `dataclass_transform` decorator for pydantic dataclasses * Raise `ValidationError`, not `ConfigError`, when a discriminator value is unhashable @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.6 2023/02/18 21:02:40 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-1.10.6 d18 1 a18 1 USE_LANGUAGES= # empty @ 1.6 log @py-pydantic: updated to 1.10.5 v1.10.5 * Fix broken parametrized bases handling with `GenericModel`s with complex sets of models * Invalidate mypy cache if plugin config changes * Fix `RecursionError` when deep-copying dataclass types wrapped by pydantic * Fix `X | Y` union syntax breaking `GenericModel` * Switch coverage badge to show coverage for this branch/release @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.5 2023/01/02 13:15:56 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-1.10.5 @ 1.5 log @py-pydantic: updated to 1.10.4 v1.10.4 (2022-12-30) * Change dependency to `typing-extensions>=4.2.0`, v1.10.3 (2022-12-29) **NOTE: v1.10.3 was ["yanked"](https://pypi.org/help/#yanked) from PyPI due to * fix parsing of custom root models, * fix: use dataclass proxy for frozen or empty dataclasses, * Fix `schema` and `schema_json` on models where a model instance is a one of default values, * Add Jina AI to sponsors on docs index page, * fix: support assignment on `DataclassProxy`, * Add `postgresql+psycopg` as allowed scheme for `PostgreDsn` to make it usable with SQLAlchemy 2, * Allow dict schemas to have both `patternProperties` and `additionalProperties`, * Fixes error passing None for optional lists with `unique_items`, * Fix `GenericModel` with `Callable` param raising a `TypeError`, * Fix field regex with `StrictStr` type annotation, * Correct `dataclass_transform` keyword argument name from `field_descriptors` to `field_specifiers`, * fix: avoid multiple calls of `__post_init__` when dataclasses are inherited, * Reduce the size of binary wheels @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.4 2022/10/25 09:15:04 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-1.10.4 @ 1.4 log @py-pydantic: updated to 1.10.2 v1.10.2 (2022-09-05) * **Revert Change:** Revert percent encoding of URL parts which was originally added in * Prevent long (length > `4_300`) strings/bytes as input to int fields, see [CVE-2020-10735](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10735), * fix: dataclass wrapper was not always called, * Use `tomllib` on Python 3.11 when parsing `mypy` configuration, * Basic fix of `GenericModel` cache to detect order of arguments in `Union` models, * Fix mypy plugin when using bare types like `list` and `dict` as `default_factory`, v1.10.1 (2022-08-31) * Add `__hash__` method to `pydancic.color.Color` class, v1.10.0 (2022-08-30) * Refactor the whole _pydantic_ `dataclass` decorator to really act like its standard lib equivalent. It hence keeps `__eq__`, `__hash__`, ... and makes comparison with its non-validated version possible. It also fixes usage of `frozen` dataclasses in fields and usage of `default_factory` in nested dataclasses. The support of `Config.extra` has been added. Finally, config customization directly via a `dict` is now possible,

**BREAKING CHANGES:** - The `compiled` boolean (whether _pydantic_ is compiled with cython) has been moved from `main.py` to `version.py` - Now that `Config.extra` is supported, `dataclass` ignores by default extra arguments (like `BaseModel`) * Fix PEP487 `__set_name__` protocol in `BaseModel` for PrivateAttrs, * Allow for custom parsing of environment variables via `parse_env_var` in `Config`, * Rename `master` to `main`, * Fix `StrictStr` does not raise `ValidationError` when `max_length` is present in `Field`, * Make `SecretStr` and `SecretBytes` hashable, * Fix `StrictBytes` does not raise `ValidationError` when `max_length` is present in `Field`, * Add support for bare `type`, * Support Python 3.11, including binaries for 3.11 in PyPI, * Add support for `re.Pattern`, * Fix `__post_init_post_parse__` is incorrectly passed keyword arguments when no `__post_init__` is defined, * Fix implicitly importing `ForwardRef` and `Callable` from `pydantic.typing` instead of `typing` and also expose `MappingIntStrAny`, * remove `Any` types from the `dataclass` decorator so it can be used with the `disallow_any_expr` mypy option, * moved repo to `pydantic/pydantic`, * fix "extra fields not permitted" error when dataclass with `Extra.forbid` is validated multiple times, * Add Python 3.9 and 3.10 examples to docs, * Discriminated union models now use `oneOf` instead of `anyOf` when generating OpenAPI schema definitions, * Allow type checkers to infer inner type of `Json` type. `Json[list[str]]` will be now inferred as `list[str]`, `Json[Any]` should be used instead of plain `Json`. Runtime behaviour is not changed, * Allow empty string aliases by using a `alias is not None` check, rather than `bool(alias)`, * Update `ForwardRef`s in `Field.outer_type_`, * The use of `__dataclass_transform__` has been replaced by `typing_extensions.dataclass_transform`, which is the preferred way to mark pydantic models as a dataclass under [PEP 681](https://peps.python.org/pep-0681/), * Use parent model's `Config` when validating nested `NamedTuple` fields, * Update `BaseModel.construct` to work with aliased Fields, * Catch certain raised errors in `smart_deepcopy` and revert to `deepcopy` if so, * Add `Config.anystr_upper` and `to_upper` kwarg to constr and conbytes, * Fix JSON schema for `set` and `frozenset` when they include default values, * Teach the mypy plugin that methods decorated by `@@validator` are classmethods, * Improve mypy plugin's ability to detect required fields, * Support fields of type `Type[]` in schema, * Add `default` value in JSON Schema when `const=True`, * Adds reserved word check to signature generation logic, * Fix Json strategy failure for the complex nested field, * Add JSON-compatible float constraint `allow_inf_nan`, * Remove undefined behaviour when `env_prefix` had characters in common with `env_nested_delimiter`, * Support generics model with `create_model`, * allow submodels to overwrite extra field info, * Document and test structural pattern matching ([PEP 636](https://peps.python.org/pep-0636/)) on `BaseModel`, * Fix incorrect deserialization of python timedelta object to ISO 8601 for negative time deltas. Minus was serialized in incorrect place ("P-1DT23H59M59.888735S" instead of correct "-P1DT23H59M59.888735S"), * Fix validation of discriminated union fields with an alias when passing a model instance, * Add a CockroachDsn type to validate CockroachDB connection strings. The type supports the following schemes: `cockroachdb`, `cockroachdb+psycopg2` and `cockroachdb+asyncpg`, * Fix MyPy plugin to not override pre-existing `__init__` method in models, * Fix mypy version checking, * support overwriting dunder attributes of `BaseModel` instances, * Added `ConstrainedDate` and `condate`, * Support `kw_only` in dataclasses, * Add comparison method for `Color` class, * Drop support for python3.6, associated cleanup, * created new function `to_lower_camel()` for "non pascal case" camel case, * Add checks to `default` and `default_factory` arguments in Mypy plugin, * fix mangling of `inspect.signature` for `BaseModel`, * Adds the `SecretField` abstract class so that all the current and future secret fields like `SecretStr` and `SecretBytes` will derive from it, * Support multi hosts validation in `PostgresDsn`, * Fix parsing of very small numeric timedelta values, * Update `SecretsSettingsSource` to respect `config.case_sensitive`, * Add MongoDB network data source name (DSN) schema, * Add support for multiple dotenv files, * Raise an explicit `ConfigError` when multiple fields are incorrectly set for a single validator, * Allow ellipsis on `Field`s inside `Annotated` for `TypedDicts` required, * Catch overflow errors in `int_validator`, * Adds a `__rich_repr__` method to `Representation` class which enables pretty printing with [Rich](https://github.com/willmcgugan/rich), * Add percent encoding in `AnyUrl` and descendent types, * `validate_arguments` decorator now supports `alias`, * Avoid `__dict__` and `__weakref__` attributes in `AnyUrl` and IP address fields, * Add ability to use `Final` in a field type annotation, * Update requirement to `typing_extensions>=4.1.0` to guarantee `dataclass_transform` is available, * Add Explosion and AWS to main sponsors, * Update documentation for `copy_on_model_validation` to reflect recent changes, * Runtime warning if `__slots__` is passed to `create_model`, `__slots__` is then ignored, * Add type hints to `BaseSettings.Config` to avoid mypy errors, also correct mypy version compatibility notice in docs @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.3 2022/08/23 11:20:40 adam Exp $ d3 1 a3 1 DISTNAME= pydantic-1.10.2 d13 1 a13 1 DEPENDS+= ${PYPKGPREFIX}-typing-extensions>=4.1.0:../../devel/py-typing-extensions @ 1.3 log @py-pydantic: updated to 1.9.2 v1.9.2 (2022-08-11) **Revert Breaking Change**: _v1.9.1_ introduced a breaking change where model fields were deep copied by default, this release reverts the default behaviour to match _v1.9.0_ and before, while also allow deep-copy behaviour via `copy_on_model_validation = 'deep'`. * Allow for shallow copies of model fields, `Config.copy_on_model_validation` is now a str which must be `'none'`, `'deep'`, or `'shallow'` corresponding to not copying, deep copy & shallow copy; default `'shallow'` @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.2 2022/08/01 18:47:40 wiz Exp $ d3 1 a3 1 DISTNAME= pydantic-1.9.2 d13 1 a13 1 DEPENDS+= ${PYPKGPREFIX}-typing-extensions>=3.7.4.3:../../devel/py-typing-extensions d15 1 a15 1 PYTHON_VERSIONS_INCOMPATIBLE= 27 # and 36 @ 1.2 log @py-pydantic: fix This was packaged with py-cython installed, which caused various .so files to be generated. However, the dependency is not noted in the package, making it fail in bulk builds. Set SKIP_CYTHON to ignore cython even if installed and update PLIST. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.1 2022/07/24 10:48:25 gdt Exp $ d3 1 a3 1 DISTNAME= pydantic-1.9.1 @ 1.1 log @Add py-pydantic 1.9.1 Data validation and settings management using Python type hints. Fast and extensible, *pydantic* plays nicely with your linters/IDE/brain. Define how data should be in pure, canonical Python 3.6+; validate it with *pydantic*. @ text @d1 1 a1 1 # $NetBSD$ d13 2 d17 2 a18 3 DEPENDS+= ${PYPKGPREFIX}-typing-extensions>=3.7.4.3:../../devel/py-typing-extensions USE_LANGUAGES= c99 @