public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/python-pydantic-core] rawhide: Update to 2.50.1
Date: Thu, 22 Oct 2026 06:22:21 GMT	[thread overview]
Message-ID: <179265014175.1.5736533285253109416.rpms-python-pydantic-core-e53650501939@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/python-pydantic-core
Branch : rawhide
Commit : e5365050193921faad303445a9768450815ffd3e
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2026-10-14T11:17:38+01:00
Stats  : +21/-353 in 6 file(s)
URL    : https://src.fedoraproject.org/rpms/python-pydantic-core/c/e5365050193921faad303445a9768450815ffd3e?branch=rawhide

Log:
Update to 2.50.1

---
diff --git a/0001-Fix-test-assertion-to-account-for-change-in-rust-uuid.patch b/0001-Fix-test-assertion-to-account-for-change-in-rust-uuid.patch
deleted file mode 100644
index f99cab9..0000000
--- a/0001-Fix-test-assertion-to-account-for-change-in-rust-uuid.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 78dabebff357b256d3f8d7c992f542794e1a8bde Mon Sep 17 00:00:00 2001
-From: Maxwell G <maxwell@gtmx.me>
-Date: Thu, 4 Jun 2026 15:13:45 -0500
-Subject: [PATCH] Fix test assertion to account for change in rust-uuid
-
-The error format for invalid uuids emitted by rust-uuid changed in
-https://github.com/uuid-rs/uuid/pull/882. pydantic-core code apparently
-passes along this error message, and then the tests fail since they
-expect the old format.
-
-The issue here is that uuid strings are now zero-indexed in the error
-message. Since this test apparatus doesn't allow a regex like `(0|1)`, I
-just removed the index and left a trailing space. I didn't want to break
-compatibility with older uuid versions with this patch.
----
- tests/validators/test_uuid.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/validators/test_uuid.py b/tests/validators/test_uuid.py
-index 49ccf0b..04a48e2 100644
---- a/tests/validators/test_uuid.py
-+++ b/tests/validators/test_uuid.py
-@@ -38,7 +38,7 @@ class MyStr(str): ...
-         (UUID('12345678-1234-5678-1234-567812345678'), UUID('12345678-1234-5678-1234-567812345678')),
-         (UUID('550e8400-e29b-41d4-a716-446655440000'), UUID('550e8400-e29b-41d4-a716-446655440000')),
-         # Invalid UUIDs
--        ('not-a-valid-uuid', Err('Input should be a valid UUID, invalid character: found `n` at 1')),
-+        ('not-a-valid-uuid', Err('Input should be a valid UUID, invalid character: found `n` at ')),
-         (
-             '12345678-1234-5678-1234-5678123456789',
-             Err('Input should be a valid UUID, invalid group length in group 4: expected 12, found 13'),
--- 
-2.54.0
-

diff --git a/fix-pytest-9.1.patch b/fix-pytest-9.1.patch
deleted file mode 100644
index 7e4988c..0000000
--- a/fix-pytest-9.1.patch
+++ /dev/null
@@ -1,248 +0,0 @@
-diff --git a/tests/benchmarks/test_micro_benchmarks.py b/tests/benchmarks/test_micro_benchmarks.py
-index 65efdce7cfc..b7123445c6d 100644
---- a/tests/benchmarks/test_micro_benchmarks.py
-+++ b/tests/benchmarks/test_micro_benchmarks.py
-@@ -39,7 +39,8 @@
- 
- class TestBenchmarkSimpleModel:
-     @pytest.fixture(scope='class')
--    def core_validator_fs(self):
-+    @classmethod
-+    def core_validator_fs(cls):
-         class CoreModel:
-             __slots__ = '__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__'
- 
-@@ -81,7 +82,8 @@ def test_core_json_fs(self, core_validator_fs, benchmark):
- 
- class TestModelLarge:
-     @pytest.fixture(scope='class')
--    def core_model_validator(self):
-+    @classmethod
-+    def core_model_validator(cls):
-         class CoreModel:
-             __slots__ = '__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__'
- 
-@@ -567,7 +569,8 @@ def test_bytes_core(benchmark):
- 
- class TestBenchmarkDateTime:
-     @pytest.fixture(scope='class')
--    def core_validator(self):
-+    @classmethod
-+    def core_validator(cls):
-         class CoreModel:
-             __slots__ = '__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__'
- 
-@@ -581,19 +584,23 @@ class CoreModel:
-         )
- 
-     @pytest.fixture(scope='class')
--    def datetime_raw(self):
-+    @classmethod
-+    def datetime_raw(cls):
-         return datetime.now(timezone.utc) + timedelta(days=1)
- 
-     @pytest.fixture(scope='class')
--    def datetime_str(self, datetime_raw):
-+    @classmethod
-+    def datetime_str(cls, datetime_raw):
-         return str(datetime_raw)
- 
-     @pytest.fixture(scope='class')
--    def python_data_dict(self, datetime_raw):
-+    @classmethod
-+    def python_data_dict(cls, datetime_raw):
-         return {'dt': datetime_raw}
- 
-     @pytest.fixture(scope='class')
--    def json_dict_data(self, datetime_str):
-+    @classmethod
-+    def json_dict_data(cls, datetime_str):
-         return json.dumps({'dt': datetime_str})
- 
-     @pytest.mark.benchmark(group='datetime model - python')
-@@ -631,7 +638,8 @@ def test_core_future_str(self, benchmark, datetime_str):
- 
- class TestBenchmarkDateX:
-     @pytest.fixture(scope='class')
--    def validator(self):
-+    @classmethod
-+    def validator(cls):
-         return SchemaValidator(core_schema.date_schema())
- 
-     @pytest.mark.benchmark(group='date from date')
-@@ -712,7 +720,8 @@ def validate_with_expected_error():
- 
- class TestBenchmarkUUID:
-     @pytest.fixture(scope='class')
--    def core_validator(self):
-+    @classmethod
-+    def core_validator(cls):
-         class CoreModel:
-             __slots__ = '__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__'
- 
-@@ -726,11 +735,13 @@ class CoreModel:
-         )
- 
-     @pytest.fixture(scope='class')
--    def validator(self):
-+    @classmethod
-+    def validator(cls):
-         return SchemaValidator(core_schema.uuid_schema())
- 
-     @pytest.fixture(scope='class')
--    def pydantic_validator(self):
-+    @classmethod
-+    def pydantic_validator(cls):
-         def to_UUID(v: Any) -> UUID:
-             if isinstance(v, UUID):
-                 return v
-@@ -780,19 +791,23 @@ def test_uuid_from_uuid_pyd(self, benchmark, pydantic_validator):
-         benchmark(pydantic_validator.validate_python, UUID('12345678-1234-5678-1234-567812345678'))
- 
-     @pytest.fixture(scope='class')
--    def uuid_raw(self):
-+    @classmethod
-+    def uuid_raw(cls):
-         return UUID('12345678-1234-5678-1234-567812345678')
- 
-     @pytest.fixture(scope='class')
--    def uuid_str(self, uuid_raw):
-+    @classmethod
-+    def uuid_str(cls, uuid_raw):
-         return str(uuid_raw)
- 
-     @pytest.fixture(scope='class')
--    def python_data_dict(self, uuid_raw):
-+    @classmethod
-+    def python_data_dict(cls, uuid_raw):
-         return {'u': uuid_raw}
- 
-     @pytest.fixture(scope='class')
--    def json_dict_data(self, uuid_str):
-+    @classmethod
-+    def json_dict_data(cls, uuid_str):
-         return json.dumps({'u': uuid_str})
- 
-     @pytest.mark.benchmark(group='uuid model - python')
-@@ -1361,11 +1376,13 @@ def f(v: int, info: core_schema.ValidationInfo) -> int:
- 
- class TestBenchmarkDecimal:
-     @pytest.fixture(scope='class')
--    def validator(self):
-+    @classmethod
-+    def validator(cls):
-         return SchemaValidator(core_schema.decimal_schema())
- 
-     @pytest.fixture(scope='class')
--    def pydantic_validator(self):
-+    @classmethod
-+    def pydantic_validator(cls):
-         Decimal = decimal.Decimal
- 
-         def to_decimal(v: str) -> decimal.Decimal:
-diff --git a/tests/benchmarks/test_serialization_micro.py b/tests/benchmarks/test_serialization_micro.py
-index a7c7a54ef5f..6712d0a5e7e 100644
---- a/tests/benchmarks/test_serialization_micro.py
-+++ b/tests/benchmarks/test_serialization_micro.py
-@@ -10,7 +10,8 @@
- 
- class TestBenchmarkSimpleModel:
-     @pytest.fixture(scope='class')
--    def core_schema(self):
-+    @classmethod
-+    def core_schema(cls):
-         class CoreModel:
-             __slots__ = '__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__'
- 
-@@ -32,11 +33,13 @@ class CoreModel:
-         }
- 
-     @pytest.fixture(scope='class')
--    def core_validator(self, core_schema):
-+    @classmethod
-+    def core_validator(cls, core_schema):
-         return SchemaValidator(core_schema)
- 
-     @pytest.fixture(scope='class')
--    def core_serializer(self, core_schema):
-+    @classmethod
-+    def core_serializer(cls, core_schema):
-         return SchemaSerializer(core_schema)
- 
-     data = {'name': 'John', 'age': 42, 'friends': list(range(200)), 'settings': {f'v_{i}': i / 2.0 for i in range(50)}}
-diff --git a/tests/test_docstrings.py b/tests/test_docstrings.py
-index bfde27c3d0a..d8057432d1f 100644
---- a/tests/test_docstrings.py
-+++ b/tests/test_docstrings.py
-@@ -18,7 +18,7 @@ def find_examples(*args, **kwargs):
- 
- @pytest.mark.skipif(CodeExample is None or sys.platform not in {'linux', 'darwin'}, reason='Only on linux and macos')
- @pytest.mark.parametrize(
--    'example', find_examples(str(PYDANTIC_CORE_DIR / 'python/pydantic_core/core_schema.py')), ids=str
-+    'example', list(find_examples(str(PYDANTIC_CORE_DIR / 'python/pydantic_core/core_schema.py'))), ids=str
- )
- @pytest.mark.thread_unsafe  # TODO investigate why pytest_examples seems to be thread unsafe here
- def test_docstrings(example: CodeExample, eval_example: EvalExample):
-@@ -33,7 +33,7 @@ def test_docstrings(example: CodeExample, eval_example: EvalExample):
- 
- 
- @pytest.mark.skipif(CodeExample is None or sys.platform not in {'linux', 'darwin'}, reason='Only on linux and macos')
--@pytest.mark.parametrize('example', find_examples(str(PYDANTIC_CORE_DIR / 'README.md')), ids=str)
-+@pytest.mark.parametrize('example', list(find_examples(str(PYDANTIC_CORE_DIR / 'README.md'))), ids=str)
- @pytest.mark.thread_unsafe  # TODO investigate why pytest_examples seems to be thread unsafe here
- def test_readme(example: CodeExample, eval_example: EvalExample):
-     eval_example.set_config(line_length=100, quotes='single')
-diff --git a/tests/validators/test_union.py b/tests/validators/test_union.py
-index 8169c91535c..268e5a40b56 100644
---- a/tests/validators/test_union.py
-+++ b/tests/validators/test_union.py
-@@ -61,12 +61,13 @@ class ModelB:
-         pass
- 
-     @pytest.fixture(scope='class')
--    def schema_validator(self) -> SchemaValidator:
-+    @classmethod
-+    def schema_validator(cls) -> SchemaValidator:
-         return SchemaValidator(
-             schema=core_schema.union_schema(
-                 choices=[
-                     core_schema.model_schema(
--                        cls=self.ModelA,
-+                        cls=cls.ModelA,
-                         schema=core_schema.model_fields_schema(
-                             fields={
-                                 'a': core_schema.model_field(schema=core_schema.int_schema()),
-@@ -75,7 +76,7 @@ def schema_validator(self) -> SchemaValidator:
-                         ),
-                     ),
-                     core_schema.model_schema(
--                        cls=self.ModelB,
-+                        cls=cls.ModelB,
-                         schema=core_schema.model_fields_schema(
-                             fields={
-                                 'c': core_schema.model_field(schema=core_schema.int_schema()),
-@@ -124,12 +125,13 @@ class ModelB:
-         pass
- 
-     @pytest.fixture(scope='class')
--    def schema_validator(self) -> SchemaValidator:
-+    @classmethod
-+    def schema_validator(cls) -> SchemaValidator:
-         return SchemaValidator(
-             schema=core_schema.union_schema(
-                 choices=[
-                     core_schema.model_schema(
--                        cls=self.ModelA,
-+                        cls=cls.ModelA,
-                         schema=core_schema.model_fields_schema(
-                             fields={
-                                 'a': core_schema.model_field(schema=core_schema.int_schema()),
-@@ -138,7 +140,7 @@ def schema_validator(self) -> SchemaValidator:
-                         ),
-                     ),
-                     core_schema.model_schema(
--                        cls=self.ModelB,
-+                        cls=cls.ModelB,
-                         schema=core_schema.model_fields_schema(
-                             fields={
-                                 'a': core_schema.model_field(schema=core_schema.int_schema()),

diff --git a/pydantic-core-fix-metadata.diff b/pydantic-core-fix-metadata.diff
index af8021c..4505f04 100644
--- a/pydantic-core-fix-metadata.diff
+++ b/pydantic-core-fix-metadata.diff
@@ -1,12 +1,12 @@
-diff -Naur ./pydantic_core-2.46.4-original/Cargo.toml pydantic_core-2.46.4/Cargo.toml
---- ./pydantic_core-2.46.4-original/Cargo.toml	2006-07-24 02:21:28.000000000 +0100
-+++ pydantic_core-2.46.4/Cargo.toml	2026-05-19 14:00:21.288887358 +0100
+diff -Naur a/Cargo.toml b/Cargo.toml
+--- a/Cargo.toml	2006-07-24 02:21:28.000000000 +0100
++++ b/Cargo.toml	2026-10-14 11:02:07.840539367 +0100
 @@ -45,7 +45,7 @@
  num-bigint = "0.4.6"
  num-traits = "0.2.19"
- uuid = "1.23.0"
--jiter = { version = "0.14.0", features = ["python"] }
-+jiter = { version = ">=0.14.0, <0.18.0", features = ["python"] }
+ uuid = "1.23.2"
+-jiter = { version = "0.16.0", features = ["python"] }
++jiter = { version = "0.17.0", features = ["python"] }
  hex = "0.4.3"
  percent-encoding = "2.3.2"
- hashbrown = { version = "0.16", default-features = false, features = ["inline-more"] }
+ hashbrown = { version = "0.17", default-features = false, features = ["inline-more"] }

diff --git a/pydantic_core-2.46.4-pyo3-0.29.patch b/pydantic_core-2.46.4-pyo3-0.29.patch
deleted file mode 100644
index 751e737..0000000
--- a/pydantic_core-2.46.4-pyo3-0.29.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff -Naur pydantic_core-2.46.4-original/Cargo.toml pydantic_core-2.46.4/Cargo.toml
---- pydantic_core-2.46.4-original/Cargo.toml	2006-07-24 02:21:28.000000000 +0100
-+++ pydantic_core-2.46.4/Cargo.toml	2026-06-20 09:58:15.258108604 +0100
-@@ -27,7 +27,7 @@
- [dependencies]
- # TODO it would be very nice to remove the "py-clone" feature as it can panic,
- # but needs a bit of work to make sure it's not used in the codebase
--pyo3 = { version = "0.28", features = ["generate-import-lib", "num-bigint", "py-clone", "smallvec"] }
-+pyo3 = { version = "0.29", features = ["generate-import-lib", "num-bigint", "py-clone", "smallvec"] }
- regex = "1.12.3"
- lru = "0.16.3"
- strum = { version = "0.27", features = ["derive"] }
-@@ -71,12 +71,12 @@
- strip = false
- 
- [dev-dependencies]
--pyo3 = { version = "0.28", features = ["auto-initialize"] }
-+pyo3 = { version = "0.29", features = ["auto-initialize"] }
- 
- [build-dependencies]
- version_check = "0.9.5"
- # used where logic has to be version/distribution specific, e.g. pypy
--pyo3-build-config = { version = "0.28" }
-+pyo3-build-config = { version = "0.29" }
- 
- [lints.clippy]
- dbg_macro = "warn"
-diff -Naur pydantic_core-2.46.4-original/tests/test_errors.py pydantic_core-2.46.4/tests/test_errors.py
---- pydantic_core-2.46.4-original/tests/test_errors.py	2006-07-24 02:21:28.000000000 +0100
-+++ pydantic_core-2.46.4/tests/test_errors.py	2026-06-20 09:59:21.679427429 +0100
-@@ -107,7 +107,7 @@
- 
-     v = SchemaValidator(core_schema.with_info_plain_validator_function(f))
- 
--    with pytest.raises(TypeError, match="argument 'context': 'list' object is not an instance of 'dict'"):
-+    with pytest.raises(TypeError, match="'list' object is not an instance of 'dict'"):
-         v.validate_python(42)
- 
- 

diff --git a/python-pydantic-core.spec b/python-pydantic-core.spec
index 10098bc..4140049 100644
--- a/python-pydantic-core.spec
+++ b/python-pydantic-core.spec
@@ -10,39 +10,23 @@
 %bcond inline_snapshot_tests 1
 
 Name:           python-pydantic-core
-Version:        2.46.5
+Version:        2.50.1
 Release:        %autorelease
-Summary:        Core validation logic for pydantic written in rust
+Summary:        Core functionality for Pydantic validation and serialization
 
 License:        MIT
 URL:            https://github.com/pydantic/pydantic-core
 Source:         %{pypi_source pydantic_core}
 
 # Manually created patch for downstream crate metadata changes
-# * Allow jiter 0.15 through 0.17. API changes from 0.14 to 0.17 are purely
-#   additive, plus switching to PyO3 0.29, which we are also doing here, so
-#   this is compatible. Downstream-only because jiter is developed by the
-#   Pydantic people, and we can reasonably assume that they will update in due
-#   course without prompting from us.
+# * Bump jiter to v0.17.0, https://github.com/pydantic/pydantic/pull/13806
 Patch:          pydantic-core-fix-metadata.diff
-# Upstream thinks it's a good idea to rely on exact formatting of error messages in other projects. Meh.
-# See the commit message in the patch for more info.
-Patch:          0001-Fix-test-assertion-to-account-for-change-in-rust-uuid.patch
-# update to PyO3 0.29
-# https://github.com/pydantic/pydantic/pull/13301
-Patch:          pydantic_core-2.46.4-pyo3-0.29.patch
-
-# Compatibility with pytest 9.1
-# The patch is manually adjusted from the upstream
-# https://github.com/pydantic/pydantic/commit/f257d01
-Patch:          fix-pytest-9.1.patch
 
 BuildRequires:  cargo-rpm-macros
 BuildRequires:  tomcli
 
 %global _description %{expand:
-The pydantic-core project provides the core validation logic for pydantic
-written in Rust.}
+%{summary}.}
 
 %description %_description
 
@@ -122,9 +106,6 @@ tomcli-set pyproject.toml del 'tool.pytest.ini_options.timeout'
 tomcli-set pyproject.toml list 'tool.pytest.ini_options.markers' \
     'thread_unsafe: mark as incompatible with patched-out pytest-run-parallel'
 
-# Remove Windows-only dependencies
-tomcli-set Cargo.toml lists delitem 'dependencies.pyo3.features' 'generate-import-lib'
-
 # Include LICENSE.dependencies in the .dist-info metadata and mark it %%license
 tomcli set pyproject.toml append project.license-files LICENSE.dependencies
 
@@ -132,7 +113,7 @@ tomcli set pyproject.toml append project.license-files LICENSE.dependencies
 
 
 %generate_buildrequires
-%pyproject_buildrequires %{?with_tests:-g testing-extra}
+%pyproject_buildrequires %{?with_tests:--dependency-groups testing-extra}
 %cargo_generate_buildrequires
 
 
@@ -150,11 +131,19 @@ tomcli set pyproject.toml append project.license-files LICENSE.dependencies
 
 %check
 %pyproject_check_import
+
+# Verify that LICENSE.dependencies was included with the .dist-info
+[ -n "$(find '%{buildroot}%{python3_sitearch}' -name LICENSE.dependencies)" ]
+
 %if %{with tests}
 ignore="${ignore-} --ignore=tests/benchmarks"
 %if %{without inline_snapshot_tests}
 ignore="${ignore-} --ignore=tests/validators/test_allow_partial.py"
 %endif
+# Avoid a circular dependency on python-pydantic.
+ignore="${ignore-} --ignore=tests/test_tzinfo.py"
+# This would require python-pytest-examples, not packaged.
+ignore="${ignore-} --ignore=tests/test_docstrings.py"
 
 # Due to patching out the pytest-timeout dependency:
 warningsfilter="${warningsfilter-} -W ignore::pytest.PytestUnknownMarkWarning"

diff --git a/sources b/sources
index 5c8b854..e1d5f37 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (pydantic_core-2.46.5.tar.gz) = 7af13f280d74ab0ded8e9299820930b0257502017f6a688d7d598e72351e127e178db11aeab987decaf95ca8619e151f244392ad9638ea184625728dcbb7cfff
+SHA512 (pydantic_core-2.50.1.tar.gz) = 1287904873f36825beff3e7a76f8f897c95849ed55b4a95409964420265ba30dd85006e0b727da0dc3a877521fa79e700e20c4f8046da6649dd634d7615feda6

                 reply	other threads:[~2026-10-22  6:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179265014175.1.5736533285253109416.rpms-python-pydantic-core-e53650501939@fedoraproject.org \
    --to=code@musicinmybrain.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox