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: Fix test_exceptions_and_markers_report_python_references
Date: Mon, 23 Nov 2026 10:22:37 GMT [thread overview]
Message-ID: <179542935788.1.15633126276655365779.rpms-python-pydantic-core-5c8c127c5282@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-pydantic-core
Branch : rawhide
Commit : 5c8c127c5282699633b8f1259b268081c6f7a5e2
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-11-23T10:19:30+00:00
Stats : +52/-4 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-pydantic-core/c/5c8c127c5282699633b8f1259b268081c6f7a5e2?branch=rawhide
Log:
Fix test_exceptions_and_markers_report_python_references
---
diff --git a/pydantic-core-2.50.5-pr-14383.patch b/pydantic-core-2.50.5-pr-14383.patch
new file mode 100644
index 0000000..bb948a5
--- /dev/null
+++ b/pydantic-core-2.50.5-pr-14383.patch
@@ -0,0 +1,43 @@
+From 4daf8820cf999b6df217f0797bdcf9bef734898b Mon Sep 17 00:00:00 2001
+From: Victorien <65306057+Viicos@users.noreply.github.com>
+Date: Mon, 23 Nov 2026 11:12:41 +0100
+Subject: [PATCH] Fix flaky
+ `test_exceptions_and_markers_report_python_references()` test (#14383)
+
+---
+ tests/test_garbage_collection.py | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/tests/test_garbage_collection.py b/tests/test_garbage_collection.py
+index 2e8b490ef3..a69cc17e3d 100644
+--- a/tests/test_garbage_collection.py
++++ b/tests/test_garbage_collection.py
+@@ -315,10 +315,7 @@ def _gc_reaches(obj: Any, target: Any, depth: int = 3) -> bool:
+ return any(r is target for r in referents) or any(_gc_reaches(r, target, depth - 1) for r in referents)
+
+
+-@pytest.mark.xfail(
+- reason="'ArgsKwargs' uses a freelist, and GC is broken on reused objects from the freelist (https://github.com/PyO3/pyo3/pull/6442)"
+-)
+-def test_exceptions_and_markers_report_python_references() -> None:
++def test_exceptions_report_python_references() -> None:
+ """https://github.com/pydantic/pydantic/issues/14237"""
+ marker = object()
+
+@@ -330,6 +327,16 @@ def test_exceptions_and_markers_report_python_references() -> None:
+ assert gc.is_tracked(known_error)
+ assert _gc_reaches(known_error, marker)
+
++
++@pytest.mark.xfail(
++ reason="'ArgsKwargs' uses a freelist, and GC is broken on reused objects from the freelist (https://github.com/PyO3/pyo3/pull/6442)"
++)
++def test_args_kwargs_reports_python_references():
++ marker = object()
++
++ # Create an initial instance so that next ones will be taken from the freelist:
++ ArgsKwargs(())
++
+ args_kwargs = ArgsKwargs((marker,), {'kw': marker})
+ assert gc.is_tracked(args_kwargs)
+ assert _gc_reaches(args_kwargs, marker)
diff --git a/python-pydantic-core.spec b/python-pydantic-core.spec
index 2e41ea3..29f0f57 100644
--- a/python-pydantic-core.spec
+++ b/python-pydantic-core.spec
@@ -39,6 +39,15 @@ License: %{upstream_license}
URL: https://github.com/pydantic/pydantic
Source: %{pypi_source pydantic_core}
+# Fix flaky `test_exceptions_and_markers_report_python_references()` test
+# https://github.com/pydantic/pydantic/commit/4daf8820cf999b6df217f0797bdcf9bef734898b
+#
+# Fixes:
+#
+# Test test_exceptions_and_markers_report_python_references may pass unexpectedly
+# https://github.com/pydantic/pydantic/issues/14345
+Patch: pydantic-core-2.50.5-pr-14383.patch
+
BuildRequires: cargo-rpm-macros
BuildRequires: tomcli
@@ -149,10 +158,6 @@ ignore="${ignore-} --ignore=tests/test_docstrings.py"
# Due to patching out the pytest-timeout dependency:
warningsfilter="${warningsfilter-} -W ignore::pytest.PytestUnknownMarkWarning"
-# Test test_exceptions_and_markers_report_python_references may pass unexpectedly
-# https://github.com/pydantic/pydantic/issues/14345
-k="${k-}${k+ and }not test_exceptions_and_markers_report_python_references"
-
%pytest ${warningsfilter-} ${ignore-} -k "${k-}" -rs
%endif
reply other threads:[~2026-11-23 10: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=179542935788.1.15633126276655365779.rpms-python-pydantic-core-5c8c127c5282@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