public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/pylint] rawhide: Fix test compatibility with pytest >= 9.1
@ 2026-06-24 14:12
0 siblings, 0 replies; only message in thread
From: @ 2026-06-24 14:12 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/pylint
Branch : rawhide
Commit : 48215f7a4f4807da5bf8e2c01d181e4b8022842b
Author : Tomáš Hrnčiar <thrnciar@redhat.com>
Date : 2026-06-24T12:23:52+02:00
Stats : +24/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/pylint/c/48215f7a4f4807da5bf8e2c01d181e4b8022842b?branch=rawhide
Log:
Fix test compatibility with pytest >= 9.1
Backport upstream fix (merge commit 50cd472) to convert a generator
expression to a list comprehension in parametrize, as pytest 9.1 no
longer accepts non-Collection iterables.
Assisted-by: Claude Opus 4.6
---
diff --git a/fix-pytest-9.1-parametrize.patch b/fix-pytest-9.1-parametrize.patch
new file mode 100644
index 0000000..ba58976
--- /dev/null
+++ b/fix-pytest-9.1-parametrize.patch
@@ -0,0 +1,21 @@
+From: Pierre-Sassoulas <pierre.sassoulas@gmail.com>
+Subject: Fix test compatibility with pytest >= 9.1
+
+Pytest 9.1 deprecated non-Collection iterables in parametrize
+(pytest-dev/pytest#13409). Convert the generator expression to a list
+comprehension so the argvalues are a proper Collection.
+
+Extracted from upstream merge commit 50cd472.
+
+diff --git a/tests/checkers/unittest_unicode/unittest_invalid_encoding.py b/tests/checkers/unittest_unicode/unittest_invalid_encoding.py
+--- a/tests/checkers/unittest_unicode/unittest_invalid_encoding.py
++++ b/tests/checkers/unittest_unicode/unittest_invalid_encoding.py
+@@ -139,7 +139,7 @@
+
+ @pytest.mark.parametrize(
+ "codec, msg",
+- (pytest.param(codec, msg, id=codec) for codec, msg in CODEC_AND_MSG),
++ [pytest.param(codec, msg, id=codec) for codec, msg in CODEC_AND_MSG],
+ )
+ def test___check_codec(
+ self, codec: str, msg: tuple[pylint.testutils.MessageTest]
diff --git a/pylint.spec b/pylint.spec
index 46577ac..a4efc54 100644
--- a/pylint.spec
+++ b/pylint.spec
@@ -26,6 +26,9 @@ Patch: 0003-Bump-astroid-from-4.1.1-to-4.1.2.patch
# Fix test failures with Python 3.15
# https://github.com/pylint-dev/pylint/issues/10982
Patch: python315.patch
+# Fix test compatibility with pytest >= 9.1 (non-Collection parametrize)
+# Extracted from upstream merge commit 50cd472
+Patch: fix-pytest-9.1-parametrize.patch
BuildArch: noarch
BuildRequires: pyproject-rpm-macros
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-24 14:12 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:12 [rpms/pylint] rawhide: Fix test 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