public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/python-watchfiles] rawhide: Fix test compatibility with pytest >= 9.1
Date: Thu, 25 Jun 2026 08:53:10 GMT [thread overview]
Message-ID: <178237759051.1.5372754651698770684.rpms-python-watchfiles-82a343396b26@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-watchfiles
Branch : rawhide
Commit : 82a343396b262c2d97b56178b63ed64b0cd3df03
Author : Tomáš Hrnčiar <thrnciar@redhat.com>
Date : 2026-06-24T16:00:28+02:00
Stats : +29/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-watchfiles/c/82a343396b262c2d97b56178b63ed64b0cd3df03?branch=rawhide
Log:
Fix test compatibility with pytest >= 9.1
Backport upstream PR #384.
Assisted-by: Claude Opus 4.6
---
diff --git a/384.patch b/384.patch
new file mode 100644
index 0000000..b175889
--- /dev/null
+++ b/384.patch
@@ -0,0 +1,26 @@
+From f2643aae706884650de14096eddd53365e23ad0e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <tomas.hrnciar@me.com>
+Date: Wed, 24 Jun 2026 15:57:56 +0200
+Subject: [PATCH] Fix test compatibility with pytest >= 9.1
+
+pytest 9.1 no longer accepts non-Collection iterables in parametrize.
+Wrap the generator function call with list() in test_docs.py.
+
+Assisted-by: Claude Opus 4.6
+---
+ tests/test_docs.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test_docs.py b/tests/test_docs.py
+index 1c0b1419..10314b03 100644
+--- a/tests/test_docs.py
++++ b/tests/test_docs.py
+@@ -79,7 +79,7 @@ def generate_code_chunks(*directories: str):
+ # with pypy we sometimes (???) get a "The loop argument is deprecated since Python 3.8" warning, see
+ # https://github.com/samuelcolvin/watchfiles/runs/7764187741
+ @pytest.mark.filterwarnings('ignore:The loop argument is deprecated:DeprecationWarning')
+-@pytest.mark.parametrize('module_name,source_code', generate_code_chunks('watchfiles', 'docs'))
++@pytest.mark.parametrize('module_name,source_code', list(generate_code_chunks('watchfiles', 'docs')))
+ def test_docs_examples(module_name, source_code, import_execute, mocker, mock_rust_notify: 'MockRustType'):
+ mock_rust_notify([{(1, 'foo.txt'), (2, 'bar.py')}])
+ mocker.patch('watchfiles.run.spawn_context.Process')
diff --git a/python-watchfiles.spec b/python-watchfiles.spec
index 3d8b280..f20ffca 100644
--- a/python-watchfiles.spec
+++ b/python-watchfiles.spec
@@ -12,6 +12,9 @@ Source: %{pypi_source watchfiles}
# Downstream-only: allow a slightly older pytest to support EPEL10
Patch: 0001-Downstream-only-allow-a-slightly-older-pytest-to-sup.patch
+# Fix test compatibility with pytest >= 9.1 (non-Collection parametrize)
+Patch: https://github.com/samuelcolvin/watchfiles/pull/384.patch
+
BuildRequires: python3-devel
BuildRequires: cargo-rpm-macros >= 24
BuildRequires: tomcli
reply other threads:[~2026-06-25 8:53 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=178237759051.1.5372754651698770684.rpms-python-watchfiles-82a343396b26@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