From nobody Tue Oct 22 22:02:35 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 4XY5l01nWwz5ZR3G; Tue, 22 Oct 2024 22:02:36 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XY5kz6TkCz4GPw; Tue, 22 Oct 2024 22:02:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729634555; 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=pJcvqVENAUXPgpydOHqt8tsHp+9LpufXrf5PAO2T+to=; b=FerTs747KZ0ByUpO3bochJx1ctgA/vFFEVzq++s9X7K6+2VlXwLx7BNIA+P3By6hqqOMzv Ux7xWSX4gyhrgpg7L57n2+lZHyhJnRzdezdphs/gOgS8Bf+ybF4uicIyOPKZ7cWn6d0eiH Ia8vYvjjzbmJn5baU+6QzS7RmKBaAQEGtKuFZkfUXs5xXlraOUZg/7Gkjzr08r32REzr1q rLd2syTOcAdoy4FvpgeXFyZ24/0sFCIavlDJOO8eOM+JL1Fzf+Tcwkmww+1hj9cZba4mzL OKsnHqaEHINNMUQzMGZtngyr5TQs7nnsuBWoVMIGUbPwZTmm7OLfz4rOpr0IWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729634555; 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=pJcvqVENAUXPgpydOHqt8tsHp+9LpufXrf5PAO2T+to=; b=GkwE7C1ViK2+ObjmZtU8yh/cW2WryRvOos1H/SGm6TEDrXH50S1h4riYtUWBYDCoeDs4oU T8CeKjD2hnH2MsQp/3BBXvzNONOz8kXrywGg1BciRJx0hrx6zDd8cWHKlhAKtd2nNiMHYb Q7Wn44OVbDyRhC/hc5BrAnJ7c2IDZzpeJSsg84w1It+F1wb9YtdUuSWA+ju/TC99uRiots 2aGDUDRwT8/j/r1qi6AxItrV7EvRzIrCXsWq3J7TYbg0ddu5bYYbsOOLuclng1Jcf9uAiz 0C4As8Y1O+Q9MMbUW2yNbR7doBde1o6o8upCI5BEN3/7TMrXBHmm8UNAHNgp7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729634555; a=rsa-sha256; cv=none; b=Eair4SRvr4q/JwA9cpGIgsXskA/tznyLXYG+MAkpBkgJEMqOy/hJmsyTGTF3/ZxjZ9VEoT xxZu3662E5g0Rg86RTrO8NMJoULh3Hs2jwGew3AQG56f7eh6upR2XtBswebV9BEOt+tLlG h1GcXymiYmGXar/kRJub6o/z6Iux0Vzc7pgOa05SqNxej9Zlx1XbOz6fk7XUBNsOPK7YaG ycD9nrHlaLFeo9yDqy1o6aixRNF3Sx/R5TWHRgmGM65vfZWFvVDykT9qOT39M7cgPY2t81 NbNlt/BbKwCxorBt33NLj716rugRyKK13norpYT5Ws9dRxHrj7iVoEcmjNhcsQ== 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 4XY5kz63sszXbn; Tue, 22 Oct 2024 22:02:35 +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 49MM2Zce096826; Tue, 22 Oct 2024 22:02:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49MM2Za8096823; Tue, 22 Oct 2024 22:02:35 GMT (envelope-from git) Date: Tue, 22 Oct 2024 22:02:35 GMT Message-Id: <202410222202.49MM2Za8096823@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: e9164e75e64b - main - devel/py-pydantic2: Allow build with py-pydantic-core 2.24.2 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: e9164e75e64bc2d2c6c160265abb06b4da6d1205 Auto-Submitted: auto-generated The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=e9164e75e64bc2d2c6c160265abb06b4da6d1205 commit e9164e75e64bc2d2c6c160265abb06b4da6d1205 Author: Po-Chuan Hsieh AuthorDate: 2024-10-22 21:53:58 +0000 Commit: Po-Chuan Hsieh CommitDate: 2024-10-22 21:58:20 +0000 devel/py-pydantic2: Allow build with py-pydantic-core 2.24.2 - Bump PORTREVISION for package change Obtained from: https://github.com/pydantic/pydantic/commit/51cf3cbfa767abfba1048cae41ea766d6add4f4a --- devel/py-pydantic2/Makefile | 4 +- devel/py-pydantic2/files/patch-pydantic-core | 62 ++++++++++++++++++++++++++-- 2 files changed, 61 insertions(+), 5 deletions(-) diff --git a/devel/py-pydantic2/Makefile b/devel/py-pydantic2/Makefile index 06d39f3b26aa..213ebb1c44ad 100644 --- a/devel/py-pydantic2/Makefile +++ b/devel/py-pydantic2/Makefile @@ -1,6 +1,6 @@ PORTNAME= pydantic PORTVERSION= 2.9.2 -PORTREVISION= 2 +PORTREVISION= 3 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.24.1<2.24.1_99:devel/py-pydantic-core@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pydantic-core>=2.24.2<2.24.2_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 88b2c73f5e5a..6d55d0804033 100644 --- a/devel/py-pydantic2/files/patch-pydantic-core +++ b/devel/py-pydantic2/files/patch-pydantic-core @@ -1,4 +1,5 @@ -Obtained: https://github.com/pydantic/pydantic/commit/9b69920888054df4ef544ecbdc03e09b90646ac2 +Obtained from: https://github.com/pydantic/pydantic/commit/9b69920888054df4ef544ecbdc03e09b90646ac2 + https://github.com/pydantic/pydantic/commit/51cf3cbfa767abfba1048cae41ea766d6add4f4a --- pydantic/_internal/_config.py.orig 2020-02-02 00:00:00 UTC +++ pydantic/_internal/_config.py @@ -35,6 +36,48 @@ Obtained: https://github.com/pydantic/pydantic/commit/9b69920888054df4ef544ecbdc core_config_values = { 'title': config.get('title') or (obj and obj.__name__), +--- pydantic/_internal/_core_utils.py.orig 2020-02-02 00:00:00 UTC ++++ pydantic/_internal/_core_utils.py +@@ -44,10 +44,6 @@ Used in a `Tag` schema to specify the tag used for a d + """ + Used in a `Tag` schema to specify the tag used for a discriminated union. + """ +-HAS_INVALID_SCHEMAS_METADATA_KEY = 'pydantic.internal.invalid' +-"""Used to mark a schema that is invalid because it refers to a definition that was not yet defined when the +-schema was first encountered. +-""" + + + def is_core_schema( +@@ -146,10 +142,7 @@ def define_expected_missing_refs( + expected_missing_refs = allowed_missing_refs.difference(refs) + if expected_missing_refs: + definitions: list[core_schema.CoreSchema] = [ +- # TODO: Replace this with a (new) CoreSchema that, if present at any level, makes validation fail +- # Issue: https://github.com/pydantic/pydantic-core/issues/619 +- core_schema.none_schema(ref=ref, metadata={HAS_INVALID_SCHEMAS_METADATA_KEY: True}) +- for ref in expected_missing_refs ++ core_schema.invalid_schema(ref=ref) for ref in expected_missing_refs + ] + return core_schema.definitions_schema(schema, definitions) + return None +@@ -160,11 +153,11 @@ def collect_invalid_schemas(schema: core_schema.CoreSc + + def _is_schema_valid(s: core_schema.CoreSchema, recurse: Recurse) -> core_schema.CoreSchema: + nonlocal invalid +- if 'metadata' in s: +- metadata = s['metadata'] +- if HAS_INVALID_SCHEMAS_METADATA_KEY in metadata: +- invalid = metadata[HAS_INVALID_SCHEMAS_METADATA_KEY] +- return s ++ ++ if s['type'] == 'invalid': ++ invalid = True ++ return s ++ + return recurse(s, _is_schema_valid) + + walk_core_schema(schema, _is_schema_valid) --- pydantic/config.py.orig 2020-02-02 00:00:00 UTC +++ pydantic/config.py @@ -563,13 +563,15 @@ class ConfigDict(TypedDict, total=False): @@ -59,7 +102,20 @@ Obtained: https://github.com/pydantic/pydantic/commit/9b69920888054df4ef544ecbdc ser_json_bytes: Literal['utf8', 'base64', 'hex'] --- pydantic/json_schema.py.orig 2020-02-02 00:00:00 UTC +++ pydantic/json_schema.py -@@ -720,7 +720,7 @@ class GenerateJsonSchema: +@@ -555,6 +555,12 @@ class GenerateJsonSchema: + return json_schema + + # ### Schema generation methods ++ ++ def invalid_schema(self, schema: core_schema.InvalidSchema) -> JsonSchemaValue: ++ """Placeholder - should never be called.""" ++ ++ raise RuntimeError('Cannot generate schema for invalid_schema. This is a bug! Please report it.') ++ + def any_schema(self, schema: core_schema.AnySchema) -> JsonSchemaValue: + """Generates a JSON schema that matches any value. + +@@ -720,7 +726,7 @@ class GenerateJsonSchema: Returns: The generated JSON schema. """ @@ -91,7 +147,7 @@ Obtained: https://github.com/pydantic/pydantic/commit/9b69920888054df4ef544ecbdc 'typing-extensions>=4.12.2; python_version >= "3.13"', 'annotated-types>=0.6.0', - "pydantic-core==2.23.4", -+ "pydantic-core==2.24.1", ++ "pydantic-core==2.24.2", ] dynamic = ['version', 'readme']