public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/pylint] rawhide: Fix test compatibility with pytest >= 9.1
Date: Wed, 24 Jun 2026 14:12:15 GMT	[thread overview]
Message-ID: <178231033571.1.5240623861076936486.rpms-pylint-48215f7a4f48@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-06-24 14:12 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=178231033571.1.5240623861076936486.rpms-pylint-48215f7a4f48@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