From 9ec656f7113dcd2d29f90c9bc9c7baf6ae9d7d5a Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 6 Jan 2026 20:18:56 -0500 Subject: [PATCH] Update to latest version (#2402615) --- .gitignore | 1 + 0001-matplotlibrc-path-search-fix.patch | 8 +-- ...sion-to-2.13.1-and-update-tolerances.patch | 6 +- ...Unpin-meson-python-build-requirement.patch | 12 ++-- ...windows-implementation-on-32-bit-x86.patch | 6 +- ...-TST-Fix-minor-issues-in-interactive.patch | 8 +-- ...ary-directory-for-test_save_figure_r.patch | 39 ------------ 30675.patch | 59 ------------------- python-matplotlib.spec | 8 +-- sources | 2 +- 10 files changed, 23 insertions(+), 126 deletions(-) delete mode 100644 0006-TST-Use-a-temporary-directory-for-test_save_figure_r.patch delete mode 100644 30675.patch diff --git a/.gitignore b/.gitignore index 94a56a3..2ad58f4 100644 --- a/.gitignore +++ b/.gitignore @@ -121,3 +121,4 @@ matplotlib-1.0.0-without-gpc.tar.gz /matplotlib-3.10.3-with-freetype-2.13.1.tar.gz /matplotlib-3.10.5.tar.gz /matplotlib-3.10.6.tar.gz +/matplotlib-3.10.8.tar.gz diff --git a/0001-matplotlibrc-path-search-fix.patch b/0001-matplotlibrc-path-search-fix.patch index d657c06..914eb92 100644 --- a/0001-matplotlibrc-path-search-fix.patch +++ b/0001-matplotlibrc-path-search-fix.patch @@ -1,7 +1,7 @@ -From ed6c1cf2cf5ca2cb2f509b9a8368e44bac9f6d65 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade +From 3c225cf3905d734a27df25e3a53a904a55f2904e Mon Sep 17 00:00:00 2001 +From: Sandro Tosi Date: Wed, 27 Sep 2017 19:35:59 -0400 -Subject: [PATCH 1/6] matplotlibrc path search fix +Subject: [PATCH 1/5] matplotlibrc path search fix Signed-off-by: Elliott Sales de Andrade --- @@ -115,5 +115,5 @@ index 87ed794022..9d80539114 100644 @staticmethod def format_shortcut(key_sequence): -- -2.50.0 +2.52.0 diff --git a/0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch b/0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch index 5a3a395..249eeb6 100644 --- a/0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch +++ b/0002-Set-FreeType-version-to-2.13.1-and-update-tolerances.patch @@ -1,7 +1,7 @@ -From d0b60f84a490052a1a35fdc0ea850ccb3db1e140 Mon Sep 17 00:00:00 2001 +From 7b4e2945933049429d00d6f3900d2cdf992c80df Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 14 Feb 2020 06:05:42 -0500 -Subject: [PATCH 2/6] Set FreeType version to 2.13.1 and update tolerances +Subject: [PATCH 2/5] Set FreeType version to 2.13.1 and update tolerances Signed-off-by: Elliott Sales de Andrade --- @@ -123,5 +123,5 @@ index 844ab8cf3a..826a8a0c3a 100644 @check_figures_equal(extensions=["png"]) -- -2.50.0 +2.52.0 diff --git a/0003-Unpin-meson-python-build-requirement.patch b/0003-Unpin-meson-python-build-requirement.patch index 1897b55..dd9012f 100644 --- a/0003-Unpin-meson-python-build-requirement.patch +++ b/0003-Unpin-meson-python-build-requirement.patch @@ -1,7 +1,7 @@ -From 416cea131ba808a8f92362e472df2861a284f527 Mon Sep 17 00:00:00 2001 +From a05766154a8aa81691f3318b706d286bb87fb1c6 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 13 Dec 2024 02:03:33 -0500 -Subject: [PATCH 3/6] Unpin meson-python build requirement +Subject: [PATCH 3/5] Unpin meson-python build requirement This is pinned to fix sdists, but we already have one and are building a wheel, which should be fine. @@ -12,10 +12,10 @@ Signed-off-by: Elliott Sales de Andrade 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml -index e6d1abaf53..76755eec25 100644 +index 23c441b52c..f762c85d98 100644 --- a/pyproject.toml +++ b/pyproject.toml -@@ -47,7 +47,7 @@ requires-python = ">=3.10" +@@ -48,7 +48,7 @@ requires-python = ">=3.10" [project.optional-dependencies] # Should be a copy of the build dependencies below. dev = [ @@ -24,7 +24,7 @@ index e6d1abaf53..76755eec25 100644 "pybind11>=2.13.2,!=2.13.3", "setuptools_scm>=7", # Not required by us but setuptools_scm without a version, cso _if_ -@@ -71,7 +71,7 @@ dev = [ +@@ -72,7 +72,7 @@ dev = [ build-backend = "mesonpy" # Also keep in sync with optional dependencies above. requires = [ @@ -34,5 +34,5 @@ index e6d1abaf53..76755eec25 100644 "setuptools_scm>=7", ] -- -2.50.0 +2.52.0 diff --git a/0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch b/0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch index e573340..1702650 100644 --- a/0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch +++ b/0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch @@ -1,7 +1,7 @@ -From 376aa273a2df3b3937cc2f5124d9db1d0aef3945 Mon Sep 17 00:00:00 2001 +From 9522bbb8e713e167581e705dc4f8c4364b05da2d Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 22 Aug 2022 18:43:28 -0400 -Subject: [PATCH 4/6] Use old stride_windows implementation on 32-bit x86 +Subject: [PATCH 4/5] Use old stride_windows implementation on 32-bit x86 Signed-off-by: Elliott Sales de Andrade --- @@ -80,5 +80,5 @@ index 8326ac186e..bdaa34b734 100644 resultY = resultY * window.reshape((-1, 1)) resultY = np.fft.fft(resultY, n=pad_to, axis=0)[:numFreqs, :] -- -2.50.0 +2.52.0 diff --git a/0005-Partially-revert-TST-Fix-minor-issues-in-interactive.patch b/0005-Partially-revert-TST-Fix-minor-issues-in-interactive.patch index d05adfe..9aeff30 100644 --- a/0005-Partially-revert-TST-Fix-minor-issues-in-interactive.patch +++ b/0005-Partially-revert-TST-Fix-minor-issues-in-interactive.patch @@ -1,7 +1,7 @@ -From fc49cee6c821e5ff1cdbbc3d10e0e5f115685f54 Mon Sep 17 00:00:00 2001 +From 5944097c27a6b65168a0287daeb9f7f9b8f9f7f3 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 12 Nov 2024 01:05:25 -0500 -Subject: [PATCH 5/6] Partially revert "TST: Fix minor issues in interactive +Subject: [PATCH 5/5] Partially revert "TST: Fix minor issues in interactive backend test (#28838)" This reverts commit 7c7f94c5f71e99f148255e3bb570fec25c8fe754. @@ -12,7 +12,7 @@ Signed-off-by: Elliott Sales de Andrade 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/tests/test_backends_interactive.py b/lib/matplotlib/tests/test_backends_interactive.py -index 4e3c1bbc2b..903ae87cbb 100644 +index 4e3c1bbc2b..cb8c458d0d 100644 --- a/lib/matplotlib/tests/test_backends_interactive.py +++ b/lib/matplotlib/tests/test_backends_interactive.py @@ -232,7 +232,10 @@ def _test_interactive_impl(): @@ -28,5 +28,5 @@ index 4e3c1bbc2b..903ae87cbb 100644 @pytest.mark.parametrize("env", _get_testable_interactive_backends()) -- -2.50.0 +2.52.0 diff --git a/0006-TST-Use-a-temporary-directory-for-test_save_figure_r.patch b/0006-TST-Use-a-temporary-directory-for-test_save_figure_r.patch deleted file mode 100644 index aaec61c..0000000 --- a/0006-TST-Use-a-temporary-directory-for-test_save_figure_r.patch +++ /dev/null @@ -1,39 +0,0 @@ -From ee0bc9da534fb143c3bb1690dd45ced01df7def4 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Fri, 29 Aug 2025 23:58:54 -0400 -Subject: [PATCH 6/6] TST: Use a temporary directory for - test_save_figure_return - -This avoids having to manually clean up the resulting file, which seems -flaky. - -Signed-off-by: Elliott Sales de Andrade ---- - lib/matplotlib/tests/test_backend_qt.py | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/lib/matplotlib/tests/test_backend_qt.py b/lib/matplotlib/tests/test_backend_qt.py -index 962f5ce942..e191dd73eb 100644 ---- a/lib/matplotlib/tests/test_backend_qt.py -+++ b/lib/matplotlib/tests/test_backend_qt.py -@@ -219,14 +219,15 @@ def test_figureoptions(): - - - @pytest.mark.backend('QtAgg', skip_on_importerror=True) --def test_save_figure_return(): -+def test_save_figure_return(tmp_path): -+ os.chdir(tmp_path) - fig, ax = plt.subplots() - ax.imshow([[1]]) - prop = "matplotlib.backends.qt_compat.QtWidgets.QFileDialog.getSaveFileName" - with mock.patch(prop, return_value=("foobar.png", None)): - fname = fig.canvas.manager.toolbar.save_figure() -- os.remove("foobar.png") - assert fname == "foobar.png" -+ assert (tmp_path / "foobar.png").exists() - with mock.patch(prop, return_value=(None, None)): - fname = fig.canvas.manager.toolbar.save_figure() - assert fname is None --- -2.50.0 - diff --git a/30675.patch b/30675.patch deleted file mode 100644 index d738c67..0000000 --- a/30675.patch +++ /dev/null @@ -1,59 +0,0 @@ -From b843483d308ce1f8bb94e1449bdb2b77da9a327c Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Tue, 21 Oct 2025 03:55:51 -0400 -Subject: [PATCH] Backport PR #30657: Fix `AttributeError: module 'gi' has no - attribute 'require_version'` - ---- - lib/matplotlib/backends/backend_gtk3.py | 4 ++-- - lib/matplotlib/backends/backend_gtk4.py | 5 +++-- - 2 files changed, 5 insertions(+), 4 deletions(-) - -diff --git a/lib/matplotlib/backends/backend_gtk3.py b/lib/matplotlib/backends/backend_gtk3.py -index 888f5a770f5d..c27b57e36a0a 100644 ---- a/lib/matplotlib/backends/backend_gtk3.py -+++ b/lib/matplotlib/backends/backend_gtk3.py -@@ -10,14 +10,14 @@ - CloseEvent, KeyEvent, LocationEvent, MouseEvent, ResizeEvent) - - try: -- import gi -+ from gi import require_version as gi_require_version - except ImportError as err: - raise ImportError("The GTK3 backends require PyGObject") from err - - try: - # :raises ValueError: If module/version is already loaded, already - # required, or unavailable. -- gi.require_version("Gtk", "3.0") -+ gi_require_version("Gtk", "3.0") - except ValueError as e: - # in this case we want to re-raise as ImportError so the - # auto-backend selection logic correctly skips. -diff --git a/lib/matplotlib/backends/backend_gtk4.py b/lib/matplotlib/backends/backend_gtk4.py -index cd38968779ed..e3d3548c1cd1 100644 ---- a/lib/matplotlib/backends/backend_gtk4.py -+++ b/lib/matplotlib/backends/backend_gtk4.py -@@ -9,19 +9,20 @@ - KeyEvent, LocationEvent, MouseEvent, ResizeEvent, CloseEvent) - - try: -- import gi -+ from gi import require_version as gi_require_version - except ImportError as err: - raise ImportError("The GTK4 backends require PyGObject") from err - - try: - # :raises ValueError: If module/version is already loaded, already - # required, or unavailable. -- gi.require_version("Gtk", "4.0") -+ gi_require_version("Gtk", "4.0") - except ValueError as e: - # in this case we want to re-raise as ImportError so the - # auto-backend selection logic correctly skips. - raise ImportError(e) from e - -+import gi - from gi.repository import Gio, GLib, Gtk, Gdk, GdkPixbuf - from . import _backend_gtk - from ._backend_gtk import ( # noqa: F401 # pylint: disable=W0611 diff --git a/python-matplotlib.spec b/python-matplotlib.spec index 1ca1904..19896e1 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -38,7 +38,7 @@ %global ftver 2.13.1 Name: python-matplotlib -Version: 3.10.6 +Version: 3.10.8 %global Version %{version_no_tilde %{quote:%nil}} Release: %autorelease Summary: Python 2D plotting library @@ -65,12 +65,6 @@ Patch0001: 0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch # Temporary fix for some tests. Patch0002: 0005-Partially-revert-TST-Fix-minor-issues-in-interactive.patch -# https://github.com/matplotlib/matplotlib/pull/30497 -Patch0003: 0006-TST-Use-a-temporary-directory-for-test_save_figure_r.patch - -# Fix AttributeError: module 'gi' has no attribute 'require_version' -Patch0004: https://github.com/matplotlib/matplotlib/pull/30675.patch - BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: glibc-langpack-en diff --git a/sources b/sources index 13fb1f3..b4ed6be 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (matplotlib-3.10.6.tar.gz) = c12686d52229bbbd3c16fa5b1d633a7a6eec8e9bae58221554dc3d9595ceae05f985ebb3207425ad2e134e4dae671f590225b1d692b66c2099dd78da13cc6332 +SHA512 (matplotlib-3.10.8.tar.gz) = 66d07fb0b13821e88f6e6fe9f9882542340c074198dce7d5f8bf5d65d1c64326ae7517ad38d6357491c54aedd8cd1b03f555ad6d9337754db5dbd43c6305ab3f SHA512 (matplotlib-3.10.3-with-freetype-2.13.1.tar.gz) = bb32e57bbd341c652d03361e3785145a9e89f59709eb588882f81cba4061c8aa7250c0d46ed07a588d75a055d72bbc6126c59e8777634385a458287f6ef8812f