public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-dateutil] rawhide: Backport upstream patch needed for compatibility with pytest 9.1
@ 2026-06-24 14:13
0 siblings, 0 replies; only message in thread
From: @ 2026-06-24 14:13 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-dateutil
Branch : rawhide
Commit : c774abbaa8a661864743b2b4c10412bafe35e5c8
Author : Tomáš Hrnčiar <thrnciar@redhat.com>
Date : 2026-06-24T13:32:04+02:00
Stats : +25/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-dateutil/c/c774abbaa8a661864743b2b4c10412bafe35e5c8?branch=rawhide
Log:
Backport upstream patch needed for compatibility with pytest 9.1
---
diff --git a/fix-pytest-9.1-parametrize.patch b/fix-pytest-9.1-parametrize.patch
new file mode 100644
index 0000000..64f7d42
--- /dev/null
+++ b/fix-pytest-9.1-parametrize.patch
@@ -0,0 +1,21 @@
+Subject: Fix test compatibility with pytest >= 9.1
+
+Pytest 9.1 no longer accepts non-Collection iterables in parametrize.
+Convert the generator expression to a list comprehension.
+
+Backported from https://github.com/dateutil/dateutil/pull/1523
+
+diff --git a/tests/test_isoparser.py b/tests/test_isoparser.py
+--- a/tests/test_isoparser.py
++++ b/tests/test_isoparser.py
+@@ -120,8 +120,8 @@
+ DATETIMES = [datetime(2017, 11, 27, 6, 14, 30, 123456)]
+ @pytest.mark.parametrize('dt', tuple(DATETIMES))
+ @pytest.mark.parametrize('date_fmt', YMD_FMTS)
+-@pytest.mark.parametrize('time_fmt', (x + sep + '%f' for x in HMS_FMTS
+- for sep in '.,'))
++@pytest.mark.parametrize('time_fmt', [x + sep + '%f' for x in HMS_FMTS
++ for sep in '.,'])
+ @pytest.mark.parametrize('tzoffset', TZOFFSETS)
+ @pytest.mark.parametrize('precision', list(range(3, 7)))
+ def test_ymd_hms_micro(dt, date_fmt, time_fmt, tzoffset, precision):
diff --git a/python-dateutil.spec b/python-dateutil.spec
index 8a258d1..31592b2 100644
--- a/python-dateutil.spec
+++ b/python-dateutil.spec
@@ -29,6 +29,10 @@ Patch: fix-sphinx-import.patch
# https://github.com/dateutil/dateutil/issues/1472
Patch: remove-ctypes-mock.patch
+# Fix test compatibility with pytest >= 9.1 (non-Collection parametrize)
+# https://github.com/dateutil/dateutil/pull/1523
+Patch: fix-pytest-9.1-parametrize.patch
+
# when bootstrapping dateutil-freezegun, we cannot run tests
# on RHEL, we do not have or want all test dependencies
%bcond tests %{undefined rhel}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-24 14:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-24 14:13 [rpms/python-dateutil] rawhide: Backport upstream patch needed for compatibility with pytest 9.1
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox