From 45c2a6cea812c47e98014b2e2824bad8d7c1f238b7b370e17df814e06ebb15ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 10 Feb 2026 14:33:04 +0000 Subject: [PATCH] - Add py314.patch to fix tests with python 3.14 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-matplotlib?expand=0&rev=136 --- matplotlib-3.10.7.tar.gz | 3 --- matplotlib-3.10.8.tar.gz | 3 +++ py314.patch | 27 +++++++++++++++++++++++++++ python-matplotlib.changes | 5 +++++ python-matplotlib.spec | 6 ++++-- 5 files changed, 39 insertions(+), 5 deletions(-) delete mode 100644 matplotlib-3.10.7.tar.gz create mode 100644 matplotlib-3.10.8.tar.gz create mode 100644 py314.patch diff --git a/matplotlib-3.10.7.tar.gz b/matplotlib-3.10.7.tar.gz deleted file mode 100644 index dd136f7..0000000 --- a/matplotlib-3.10.7.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a06ba7e2a2ef9131c79c49e63dad355d2d878413a0376c1727c8b9335ff731c7 -size 34804865 diff --git a/matplotlib-3.10.8.tar.gz b/matplotlib-3.10.8.tar.gz new file mode 100644 index 0000000..4cbab6f --- /dev/null +++ b/matplotlib-3.10.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2299372c19d56bcd35cf05a2738308758d32b9eaed2371898d8f5bd33f084aa3 +size 34806269 diff --git a/py314.patch b/py314.patch new file mode 100644 index 0000000..b8cad91 --- /dev/null +++ b/py314.patch @@ -0,0 +1,27 @@ +From 2a94a7ff1338708e49dbc23ed48734b260faafd2 Mon Sep 17 00:00:00 2001 +From: Thomas A Caswell +Date: Wed, 31 Dec 2025 09:55:20 -0500 +Subject: [PATCH] TST: account for asyncio changes in py314 + +An EventLoop will no longer be implicitly created by `get_event_loop()` + +Closes #30917 +--- + lib/matplotlib/tests/test_backends_interactive.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/lib/matplotlib/tests/test_backends_interactive.py b/lib/matplotlib/tests/test_backends_interactive.py +index 6bc7de433825..101c1cb81cad 100644 +--- a/lib/matplotlib/tests/test_backends_interactive.py ++++ b/lib/matplotlib/tests/test_backends_interactive.py +@@ -208,6 +208,10 @@ def check_alt_backend(alt_backend): + if fig.canvas.toolbar: # i.e toolbar2. + fig.canvas.toolbar.draw_rubberband(None, 1., 1, 2., 2) + ++ if backend == 'webagg' and sys.version_info >= (3, 14): ++ import asyncio ++ asyncio.set_event_loop(asyncio.new_event_loop()) ++ + timer = fig.canvas.new_timer(1.) # Test that floats are cast to int. + timer.add_callback(KeyEvent("key_press_event", fig.canvas, "q")._process) + # Trigger quitting upon draw. diff --git a/python-matplotlib.changes b/python-matplotlib.changes index ce333ea..f2a4407 100644 --- a/python-matplotlib.changes +++ b/python-matplotlib.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 10 14:16:59 UTC 2026 - Markéta Machová + +- Add py314.patch to fix tests with python 3.14 + ------------------------------------------------------------------- Tue Nov 11 10:55:03 UTC 2025 - Markéta Machová diff --git a/python-matplotlib.spec b/python-matplotlib.spec index a742bcb..dbb83e4 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -1,7 +1,7 @@ # # spec file for package python-matplotlib # -# Copyright (c) 2025 SUSE LLC and contributors +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -46,7 +46,7 @@ ExclusiveArch: x86_64 aarch64 %{?sle15_python_module_pythons} Name: python-matplotlib%{psuffix} -Version: 3.10.7 +Version: 3.10.8 Release: 0 Summary: Plotting Library for Python License: SUSE-Matplotlib @@ -59,6 +59,8 @@ Source99: https://downloads.sourceforge.net/project/freetype/freetype2/2.6 Source100: python-matplotlib.rpmlintrc # PATCH-FEATURE-OPENSUSE matplotlib-meson-options-opensuse.patch code@bnavigator.de -- Custom build options for meson-python Patch1: matplotlib-meson-options-opensuse.patch +# PATCH-FIX-UPSTREAM https://github.com/matplotlib/matplotlib/pull/30918 TST: account for asyncio changes in py314 +Patch2: py314.patch Recommends: ghostscript Recommends: libxml2-tools Recommends: poppler-tools