public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/python-versioningit] rawhide: Fix test compatibility with pytest >= 9.1
Date: Wed, 24 Jun 2026 14:36:01 GMT	[thread overview]
Message-ID: <178231176116.1.3165354535621573658.rpms-python-versioningit-7182f42b01fa@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/python-versioningit
            Branch : rawhide
            Commit : 7182f42b01fa643e24415ca64e5ad0cb376a89b8
            Author : Tomáš Hrnčiar <thrnciar@redhat.com>
            Date   : 2026-06-24T16:03:09+02:00
            Stats  : +54/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-versioningit/c/7182f42b01fa643e24415ca64e5ad0cb376a89b8?branch=rawhide

            Log:
            Fix test compatibility with pytest >= 9.1

Backport upstream commit dbc68a42.

Assisted-by: Claude Opus 4.6

---
diff --git a/dbc68a42.patch b/dbc68a42.patch
new file mode 100644
index 0000000..9816908
--- /dev/null
+++ b/dbc68a42.patch
@@ -0,0 +1,50 @@
+From dbc68a425a2d371514a51bffd804fddab8ffb5ba Mon Sep 17 00:00:00 2001
+From: "John T. Wodder II" <git@varonathe.org>
+Date: Sun, 14 Jun 2026 08:49:37 -0400
+Subject: [PATCH] Address pytest deprecation warning
+
+---
+ test/test_end2end.py | 17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/test/test_end2end.py b/test/test_end2end.py
+index bb76dba..dfd9bf9 100644
+--- a/test/test_end2end.py
++++ b/test/test_end2end.py
+@@ -1,5 +1,4 @@
+ from __future__ import annotations
+-from collections.abc import Iterator
+ import logging
+ import os
+ from pathlib import Path
+@@ -83,7 +82,8 @@ def mkcases(
+     subdir: str,
+     marks: list[pytest.MarkDecorator],
+     details_cls: Type[BaseModel] = CaseDetails,
+-) -> Iterator[ParameterSet]:
++) -> list[ParameterSet]:
++    cases = []
+     for repozip in sorted((DATA_DIR / "repos" / subdir).glob("*.zip")):
+         details = details_cls.model_validate_json(
+             repozip.with_suffix(".json").read_text(encoding="utf-8")
+@@ -94,12 +94,15 @@ def mkcases(
+             )
+         except FileNotFoundError:
+             marknames = []
+-        yield pytest.param(
+-            repozip,
+-            details,
+-            marks=marks + [getattr(pytest.mark, m) for m in marknames],
+-            id=f"{subdir}/{repozip.stem}",
++        cases.append(
++            pytest.param(
++                repozip,
++                details,
++                marks=marks + [getattr(pytest.mark, m) for m in marknames],
++                id=f"{subdir}/{repozip.stem}",
++            )
+         )
++    return cases
+ 
+ 
+ @pytest.mark.parametrize(

diff --git a/python-versioningit.spec b/python-versioningit.spec
index 17fec2d..d6a50bc 100644
--- a/python-versioningit.spec
+++ b/python-versioningit.spec
@@ -46,6 +46,9 @@ Source0:        %{pypi_source versioningit}
 # Man page written for Fedora in groff_man(7) format based on --help output
 Source1:        versioningit.1
 
+# Fix test compatibility with pytest >= 9.1 (non-Collection parametrize)
+Patch:          https://github.com/jwodder/versioningit/commit/dbc68a42.patch
+
 BuildArch:      noarch
 
 %description %_description
@@ -68,7 +71,7 @@ BuildRequires:  mercurial
 
 
 %prep
-%autosetup -n versioningit-%{version}
+%autosetup -p1 -n versioningit-%{version}
 
 # Tweak build requirements to use what we have in Fedora. For test
 # dependencies, we change all semver pins to minimum versions.

                 reply	other threads:[~2026-06-24 14:36 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=178231176116.1.3165354535621573658.rpms-python-versioningit-7182f42b01fa@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