public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/python-dateutil] rawhide: Backport upstream patch needed for compatibility with pytest 9.1
Date: Wed, 24 Jun 2026 14:13:02 GMT	[thread overview]
Message-ID: <178231038291.1.11259807406772121735.rpms-python-dateutil-c774abbaa8a6@fedoraproject.org> (raw)

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}

                 reply	other threads:[~2026-06-24 14:13 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=178231038291.1.11259807406772121735.rpms-python-dateutil-c774abbaa8a6@fedoraproject.org \
    --to=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