public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Maxwell G <maxwell@gtmx.me>
To: git-commits@fedoraproject.org
Subject: [rpms/python-pydantic-core] rawhide: Fix test assertion to account for change in rust-uuid
Date: Fri, 05 Jun 2026 06:01:19 GMT [thread overview]
Message-ID: <178063927922.1.10423694797428544210.rpms-python-pydantic-core-08564c88268d@fedoraproject.org> (raw)
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
reply other threads:[~2026-06-05 6:01 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=178063927922.1.10423694797428544210.rpms-python-pydantic-core-08564c88268d@fedoraproject.org \
--to=maxwell@gtmx.me \
--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