public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pydantic-core] rawhide: Fix test assertion to account for change in rust-uuid
@ 2026-06-05 6:01 Maxwell G
0 siblings, 0 replies; only message in thread
From: Maxwell G @ 2026-06-05 6:01 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-pydantic-core
Branch : rawhide
Commit : 08564c88268d42fe3477c60b3015f8ba9e178319
Author : Maxwell G <maxwell@gtmx.me>
Date : 2026-06-05T05:44:08+00:00
Stats : +37/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-pydantic-core/c/08564c88268d42fe3477c60b3015f8ba9e178319?branch=rawhide
Log:
Fix test assertion to account for change in rust-uuid
---
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
new file mode 100644
index 0000000..f99cab9
--- /dev/null
+++ b/0001-Fix-test-assertion-to-account-for-change-in-rust-uuid.patch
@@ -0,0 +1,34 @@
+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/python-pydantic-core.spec b/python-pydantic-core.spec
index 2a4ff2b..6cd9517 100644
--- a/python-pydantic-core.spec
+++ b/python-pydantic-core.spec
@@ -24,6 +24,9 @@ Source: %{pypi_source pydantic_core}
# Pydantic people, and we can reasonably assume that they will update in due
# course without prompting from us.
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
BuildRequires: python3-devel
BuildRequires: cargo-rpm-macros >= 24
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-05 6:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-05 6:01 [rpms/python-pydantic-core] rawhide: Fix test assertion to account for change in rust-uuid Maxwell G
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox