public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-click] rawhide: Backport upstream patch for compatibility with pytest 9.1
@ 2026-07-27 6:07
0 siblings, 0 replies; only message in thread
From: @ 2026-07-27 6:07 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-click
Branch : rawhide
Commit : 1e153c31c4b0dc919e9cd390793d4ef1e02da3f1
Author : Tomáš Hrnčiar <thrnciar@redhat.com>
Date : 2026-07-21T08:14:39+00:00
Stats : +39/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-click/c/1e153c31c4b0dc919e9cd390793d4ef1e02da3f1?branch=rawhide
Log:
Backport upstream patch for compatibility with pytest 9.1
---
diff --git a/3597.patch b/3597.patch
new file mode 100644
index 0000000..fa0ca4d
--- /dev/null
+++ b/3597.patch
@@ -0,0 +1,36 @@
+From 0d340091df4acc6e21333ab6ffa20508540cadf6 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Mon, 15 Jun 2026 11:44:25 +0100
+Subject: [PATCH] tests/test_basic: Fix to work with newer versions of pytest
+
+Fix an error with newer versions of pytest (9.1.0) by converting the
+generator into a tuple to resolve:
+
+E pytest.PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated.
+E Test: tests/test_basic.py::test_boolean_conversion, argvalues type: chain
+E Please convert to a list or tuple.
+E See https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators
+ERROR: tests/test_basic.py:tests/test_basic.py
+---
+ tests/test_basic.py | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/tests/test_basic.py b/tests/test_basic.py
+index 3f7352879f..ebbe162e68 100644
+--- a/tests/test_basic.py
++++ b/tests/test_basic.py
+@@ -258,9 +258,11 @@ def cli(f):
+
+ @pytest.mark.parametrize(
+ ("value", "expect"),
+- chain(
+- ((x, "True") for x in ("1", "true", "t", "yes", "y", "on")),
+- ((x, "False") for x in ("0", "false", "f", "no", "n", "off")),
++ tuple(
++ chain(
++ ((x, "True") for x in ("1", "true", "t", "yes", "y", "on")),
++ ((x, "False") for x in ("0", "false", "f", "no", "n", "off")),
++ )
+ ),
+ )
+ def test_boolean_conversion(runner, value, expect):
diff --git a/python-click.spec b/python-click.spec
index e2634bd..6ad68dd 100644
--- a/python-click.spec
+++ b/python-click.spec
@@ -10,6 +10,9 @@ License: BSD-3-Clause
URL: https://github.com/pallets/click
Source0: %{url}/archive/%{version}/click-%{version}.tar.gz
+# Fix test compatibility with pytest >= 9.1
+Patch: https://github.com/pallets/click/pull/3597.patch
+
BuildArch: noarch
BuildRequires: python%{python3_pkgversion}-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-27 6:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-27 6:07 [rpms/python-click] rawhide: Backport upstream patch 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