public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pytest-mpl] rawhide: Fix pytest 9.1 compatibility
@ 2026-08-03 9:13
0 siblings, 0 replies; only message in thread
From: @ 2026-08-03 9:13 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-pytest-mpl
Branch : rawhide
Commit : dacc867df919887ec32bb24ca6db912907dc98d9
Author : Tomáš Hrnčiar <thrnciar@redhat.com>
Date : 2026-08-03T11:09:59+02:00
Stats : +26/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-pytest-mpl/c/dacc867df919887ec32bb24ca6db912907dc98d9?branch=rawhide
Log:
Fix pytest 9.1 compatibility
Adapted from upstream commit e57d11e to remove unused startdir parameter
from pytest_report_header hook. Pytest 9.1 removed this deprecated
parameter from the hook spec, causing PluginValidationError at load time.
Assisted-by: Claude Opus 4.6
---
diff --git a/0002-fix-pytest-9.1-remove-startdir.patch b/0002-fix-pytest-9.1-remove-startdir.patch
new file mode 100644
index 0000000..9c2080f
--- /dev/null
+++ b/0002-fix-pytest-9.1-remove-startdir.patch
@@ -0,0 +1,20 @@
+From: P. L. Lim <2090236+pllim@users.noreply.github.com>
+Date: Tue, 9 Jan 2024 11:48:23 -0500
+Subject: [PATCH] Remove unused args from pytest_report_header
+
+Adapted from upstream commit e57d11e. Pytest 9.1 removed the deprecated
+startdir parameter from the pytest_report_header hook spec, causing a
+PluginValidationError at plugin load time.
+
+diff --git a/pytest_mpl/plugin.py b/pytest_mpl/plugin.py
+--- a/pytest_mpl/plugin.py
++++ b/pytest_mpl/plugin.py
+@@ -120,7 +120,7 @@
+ return Path(path + ext)
+
+
+-def pytest_report_header(config, startdir):
++def pytest_report_header():
+ import matplotlib
+ import matplotlib.ft2font
+ return ["Matplotlib: {0}".format(matplotlib.__version__),
diff --git a/python-pytest-mpl.spec b/python-pytest-mpl.spec
index f357849..645054d 100644
--- a/python-pytest-mpl.spec
+++ b/python-pytest-mpl.spec
@@ -2,7 +2,7 @@
Name: python-%{srcname}
Version: 0.13
-Release: 22%{?dist}
+Release: 23%{?dist}
Summary: Pytest plugin for testing figure output from Matplotlib
# Automatically converted from old format: BSD - review is highly recommended.
@@ -11,6 +11,8 @@ URL: https://github.com/matplotlib/pytest-mpl
Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz
# Probably not going upstream.
Patch0001: 0001-Increase-tolerance-for-new-FreeType.patch
+# Fix pytest 9.1 compatibility (removed startdir from hook spec)
+Patch0002: 0002-fix-pytest-9.1-remove-startdir.patch
BuildArch: noarch
@@ -65,6 +67,9 @@ MPLBACKEND=Agg %{pytest} tests -k 'not test_succeeds_remote and not test_succeed
%changelog
+* Mon Aug 03 2026 Tomáš Hrnčiar <thrnciar@redhat.com> - 0.13-23
+- Fix pytest 9.1 compatibility (remove deprecated startdir hook parameter)
+
* Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.13-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-03 9:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-03 9:13 [rpms/python-pytest-mpl] rawhide: Fix pytest 9.1 compatibility
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox