public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pydantic] f44: Patch a test for typing-extensions 4.16 compatibility
@ 2026-08-25 6:51 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-08-25 6:51 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-pydantic
Branch : f44
Commit : ec82f89e560758511b477958576669b8c6d9d70d
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-08-25T07:32:15+01:00
Stats : +46/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-pydantic/c/ec82f89e560758511b477958576669b8c6d9d70d?branch=f44
Log:
Patch a test for typing-extensions 4.16 compatibility
---
diff --git a/0001-Adapt-MISSING-sentinel-test-to-work-with-unreleased-.patch b/0001-Adapt-MISSING-sentinel-test-to-work-with-unreleased-.patch
new file mode 100644
index 0000000..aa4fca6
--- /dev/null
+++ b/0001-Adapt-MISSING-sentinel-test-to-work-with-unreleased-.patch
@@ -0,0 +1,39 @@
+From 579a395f5416a8ee4fc4d8bdb3ec317c9db0c8e0 Mon Sep 17 00:00:00 2001
+From: Victorien <65306057+Viicos@users.noreply.github.com>
+Date: Sat, 2 May 2026 11:15:02 +0200
+Subject: [PATCH] Adapt `MISSING` sentinel test to work with unreleased
+ `typing_extensions` version
+
+Backport of: #13135
+---
+ tests/test_missing_sentinel.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test_missing_sentinel.py b/tests/test_missing_sentinel.py
+index afc682af5..6ceb8ba8a 100644
+--- a/tests/test_missing_sentinel.py
++++ b/tests/test_missing_sentinel.py
+@@ -2,6 +2,7 @@ import pickle
+ from typing import Union
+
+ import pytest
++import typing_extensions
+ from pydantic_core import MISSING, PydanticSerializationUnexpectedValue
+
+ from pydantic import BaseModel, TypeAdapter, ValidationError
+@@ -52,7 +53,11 @@ class ModelPickle(BaseModel):
+ f: Union[int, MISSING] = MISSING
+
+
+-@pytest.mark.xfail(reason="PEP 661 sentinels aren't picklable yet in the experimental typing-extensions implementation")
++@pytest.mark.xfail(
++ # Unreleased typing-extensions has the final sentinel implementation with pickle support:
++ condition=not hasattr(typing_extensions, 'sentinel'),
++ reason="PEP 661 sentinels aren't picklable yet in the experimental typing-extensions implementation",
++)
+ def test_missing_sentinel_pickle() -> None:
+ m = ModelPickle()
+ m_reconstructed = pickle.loads(pickle.dumps(m))
+--
+2.55.0
+
diff --git a/python-pydantic.spec b/python-pydantic.spec
index 4703fe0..cc36c7f 100644
--- a/python-pydantic.spec
+++ b/python-pydantic.spec
@@ -11,6 +11,13 @@ License: MIT
URL: https://github.com/pydantic/pydantic
Source: %{url}/archive/v%{version}/pydantic-%{version}.tar.gz
+# Adapt MISSING sentinel test to work with unreleased typing_extensions version
+# https://github.com/pydantic/pydantic/commit/597fa692eaaa90132f683e88ca994f28e185463b
+# Cherry-picked from v2.13.4
+# Backport of: https://github.com/pydantic/pydantic/pull/13135
+# Fixes test failure with typing-extensions 4.16
+Patch: 0001-Adapt-MISSING-sentinel-test-to-work-with-unreleased-.patch
+
BuildArch: noarch
BuildRequires: python3-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-25 6:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-25 6:51 [rpms/python-pydantic] f44: Patch a test for typing-extensions 4.16 compatibility Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox