From nobody Thu Nov 21 13:42:32 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvKDB0NDvz5d41R; Thu, 21 Nov 2024 13:42:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvKD90KCmz4PJs; Thu, 21 Nov 2024 13:42:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732196553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WKSURMQr5+kVO1cBqg8CSVI7TDoq2RqpEGEoDOpzht8=; b=c99kp3hSd20i7vb0Z8kS9Io2CeMaRXcTVxnU1a1u2749AMebPPrjIXl1Wuj9/ygcsRnqFR fyLOxMNM1T31GlvKLKMZjCxWGqc7CTBfTyO9WK2UaC8nTwvPi95qtEPMGjKbeTMS7PyFRQ +nnR3ZvNSpILfBVe4s7t4J3W+/3Msh+Q0I9mZjpNlJiFzTupqNqlCcRVQI6a4LUeIxjBnY +Cr9cpMDwEAuhChvFEowdDFyv6iGEPX28WXHEX4k2UKV1Kt192VnsYS9AtAEoBE4aoFQLs r+wrF6kDZ7b+MMpNRrdpDYQPbv5V+iNBE0XaBD1oJtQiAzzjGgpsSYfFOxH4+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732196553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WKSURMQr5+kVO1cBqg8CSVI7TDoq2RqpEGEoDOpzht8=; b=q/Rg4Ix/DYlWnEv01N/8hfmHITCvtEkoX03Vl0QJ/wAtsMcOYBHnkKH+twEPYYd3xk69he cw46mbxId+P8lM1Y8XYFl53IxslFJ0eS1rFefCRIVYY+wtOeWobHiZfsk1g74jo7VnuZ/z ADy2Dl+KWp/kXuNneT1XJ2RFxVkI4lfsZkLgxTyG1FB1D7/m6YWbQ+v2o6ai/Dga5u0Ivo 9a4ZBg7zUxREHjevsMaiZLNCGEqM8pKS33ZaIoFL0hrqMd5cVwLjnRs7kuBm9pv7k77aCL HxM2/cpFNAkTzRwVk8IURNbC4r/ibx5pY2B390jeBNztB80BQqn0sYEFEUSWlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732196553; a=rsa-sha256; cv=none; b=w0+qFnMHRrG3+C63kbOIJ21soO3kWSIcMK4ZubHuAIUhSmcYHhAiGpl3i4eUDFMenfsmsd 49nenfe3BokmEnx1NHsU9OKan/Fcksy2P+Bttr+beae9yssBcx3af/jarQ33jlnfmiMJNO F2KaaL8qb2Br7/hEpa+B6eEHi7IVQUcZq0M7SfmairsnmE0JTf2vt+HCxbK5grwB9Uimzk 4s2ewfjEyByjVGm/AsHeXMsAqhZqcxYALnE3hBA1xFF6fkbs+Asqgf7aXDwqKmpVGhRpjx r0guetsriwmQEhBDPSG6sjKukzwl9+grJ1ksDKmPu7l0eT3aX6AtfhbceMWD5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvKD86d1yzhyD; Thu, 21 Nov 2024 13:42:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALDgWdH019039; Thu, 21 Nov 2024 13:42:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALDgWQF019036; Thu, 21 Nov 2024 13:42:32 GMT (envelope-from git) Date: Thu, 21 Nov 2024 13:42:32 GMT Message-Id: <202411211342.4ALDgWQF019036@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 7a4d833a5a70 - main - devel/py-pydantic2: Allow build with py-pydantic-core 2.27.0 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a4d833a5a70e84f63df2b4cdcaaf1234a52c5b1 Auto-Submitted: auto-generated The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=7a4d833a5a70e84f63df2b4cdcaaf1234a52c5b1 commit 7a4d833a5a70e84f63df2b4cdcaaf1234a52c5b1 Author: Po-Chuan Hsieh AuthorDate: 2024-11-21 13:22:08 +0000 Commit: Po-Chuan Hsieh CommitDate: 2024-11-21 13:38:16 +0000 devel/py-pydantic2: Allow build with py-pydantic-core 2.27.0 - Bump PORTREVISION for package change Obtained from: https://github.com/pydantic/pydantic/commit/678ec30686af0b99a0632dde01dcf592aed0e306 https://github.com/pydantic/pydantic/commit/4eecee7baf2b85fffae669574f9e26e34cc2f8f0 --- devel/py-pydantic2/Makefile | 4 +- devel/py-pydantic2/files/patch-pydantic-core | 101 +++++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 2 deletions(-) diff --git a/devel/py-pydantic2/Makefile b/devel/py-pydantic2/Makefile index dd5ad8564641..3493d529f8da 100644 --- a/devel/py-pydantic2/Makefile +++ b/devel/py-pydantic2/Makefile @@ -1,6 +1,6 @@ PORTNAME= pydantic PORTVERSION= 2.9.2 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -17,7 +17,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatch-fancy-pypi-readme>=22.5.0:devel/py-hatch-fancy-pypi-readme@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}annotated-types>=0.6.0:devel/py-annotated-types@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pydantic-core>=2.25.1<2.25.1_99:devel/py-pydantic-core@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pydantic-core>=2.27.0<2.27.0_99:devel/py-pydantic-core@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.12.2:devel/py-typing-extensions@${PY_FLAVOR} USES= python diff --git a/devel/py-pydantic2/files/patch-pydantic-core b/devel/py-pydantic2/files/patch-pydantic-core index 2d3ebf0cfa10..4766fbca4a1f 100644 --- a/devel/py-pydantic2/files/patch-pydantic-core +++ b/devel/py-pydantic2/files/patch-pydantic-core @@ -2,6 +2,8 @@ Obtained from: https://github.com/pydantic/pydantic/commit/9b69920888054df4ef544 https://github.com/pydantic/pydantic/commit/51cf3cbfa767abfba1048cae41ea766d6add4f4a https://github.com/pydantic/pydantic/commit/27afdfc9120c7a5b1071d907a25c37b46b103292 https://github.com/pydantic/pydantic/commit/6b92e9dab9eb3e649af148d5d8a9a8d2d2cd31d2 + https://github.com/pydantic/pydantic/commit/678ec30686af0b99a0632dde01dcf592aed0e306 + https://github.com/pydantic/pydantic/commit/4eecee7baf2b85fffae669574f9e26e34cc2f8f0 --- pydantic/_internal/_config.py.orig 2020-02-02 00:00:00 UTC +++ pydantic/_internal/_config.py @@ -826,6 +828,105 @@ Obtained from: https://github.com/pydantic/pydantic/commit/9b69920888054df4ef544 def import_email_validator() -> None: +--- pydantic/type_adapter.py.orig 2020-02-02 00:00:00 UTC ++++ pydantic/type_adapter.py +@@ -347,6 +347,7 @@ class TypeAdapter(Generic[T]): + strict: bool | None = None, + from_attributes: bool | None = None, + context: dict[str, Any] | None = None, ++ experimental_allow_partial: bool | Literal['off', 'on', 'trailing-strings'] = False, + ) -> T: + """Validate a Python object against the model. + +@@ -355,6 +356,11 @@ class TypeAdapter(Generic[T]): + strict: Whether to strictly check types. + from_attributes: Whether to extract data from object attributes. + context: Additional context to pass to the validator. ++ experimental_allow_partial: **Experimental** whether to enable ++ [partial validation](../concepts/experimental.md#partial-validation), e.g. to process streams. ++ * False / 'off': Default behavior, no partial validation. ++ * True / 'on': Enable partial validation. ++ * 'trailing-strings': Enable partial validation and allow trailing strings in the input. + + !!! note + When using `TypeAdapter` with a Pydantic `dataclass`, the use of the `from_attributes` +@@ -363,11 +369,23 @@ class TypeAdapter(Generic[T]): + Returns: + The validated object. + """ +- return self.validator.validate_python(object, strict=strict, from_attributes=from_attributes, context=context) ++ return self.validator.validate_python( ++ object, ++ strict=strict, ++ from_attributes=from_attributes, ++ context=context, ++ allow_partial=experimental_allow_partial, ++ ) + + @_frame_depth(1) + def validate_json( +- self, data: str | bytes, /, *, strict: bool | None = None, context: dict[str, Any] | None = None ++ self, ++ data: str | bytes, ++ /, ++ *, ++ strict: bool | None = None, ++ context: dict[str, Any] | None = None, ++ experimental_allow_partial: bool | Literal['off', 'on', 'trailing-strings'] = False, + ) -> T: + """Usage docs: https://docs.pydantic.dev/2.9/concepts/json/#json-parsing + +@@ -377,25 +395,47 @@ class TypeAdapter(Generic[T]): + data: The JSON data to validate against the model. + strict: Whether to strictly check types. + context: Additional context to use during validation. ++ experimental_allow_partial: **Experimental** whether to enable ++ [partial validation](../concepts/experimental.md#partial-validation), e.g. to process streams. ++ * False / 'off': Default behavior, no partial validation. ++ * True / 'on': Enable partial validation. ++ * 'trailing-strings': Enable partial validation and allow trailing strings in the input. + + Returns: + The validated object. + """ +- return self.validator.validate_json(data, strict=strict, context=context) ++ return self.validator.validate_json( ++ data, strict=strict, context=context, allow_partial=experimental_allow_partial ++ ) + + @_frame_depth(1) +- def validate_strings(self, obj: Any, /, *, strict: bool | None = None, context: dict[str, Any] | None = None) -> T: ++ def validate_strings( ++ self, ++ obj: Any, ++ /, ++ *, ++ strict: bool | None = None, ++ context: dict[str, Any] | None = None, ++ experimental_allow_partial: bool | Literal['off', 'on', 'trailing-strings'] = False, ++ ) -> T: + """Validate object contains string data against the model. + + Args: + obj: The object contains string data to validate. + strict: Whether to strictly check types. + context: Additional context to use during validation. ++ experimental_allow_partial: **Experimental** whether to enable ++ [partial validation](../concepts/experimental.md#partial-validation), e.g. to process streams. ++ * False / 'off': Default behavior, no partial validation. ++ * True / 'on': Enable partial validation. ++ * 'trailing-strings': Enable partial validation and allow trailing strings in the input. + + Returns: + The validated object. + """ +- return self.validator.validate_strings(obj, strict=strict, context=context) ++ return self.validator.validate_strings( ++ obj, strict=strict, context=context, allow_partial=experimental_allow_partial ++ ) + + @_frame_depth(1) + def get_default_value(self, *, strict: bool | None = None, context: dict[str, Any] | None = None) -> Some[T] | None: --- pydantic/warnings.py.orig 2020-02-02 00:00:00 UTC +++ pydantic/warnings.py @@ -67,6 +67,13 @@ class PydanticDeprecatedSince29(PydanticDeprecationWar