public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-versioningit] rawhide: Fix test compatibility with pytest >= 9.1
@ 2026-06-24 14:36 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-06-24 14:36 UTC (permalink / raw)
  To: git-commits

            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.

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-24 14:36 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:36 [rpms/python-versioningit] 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