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] f44: Patch a test for typing-extensions 4.16 compatibility
Date: Tue, 25 Aug 2026 06:51:59 GMT	[thread overview]
Message-ID: <178764071981.1.11331868480178347709.rpms-python-pydantic-ec82f89e5607@fedoraproject.org> (raw)

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

                 reply	other threads:[~2026-08-25  6:51 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=178764071981.1.11331868480178347709.rpms-python-pydantic-ec82f89e5607@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