- 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
This commit is contained in:
2026-02-10 14:33:04 +00:00
committed by Git OBS Bridge
parent 0aa60648c3
commit 45c2a6cea8
5 changed files with 39 additions and 5 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a06ba7e2a2ef9131c79c49e63dad355d2d878413a0376c1727c8b9335ff731c7
size 34804865

3
matplotlib-3.10.8.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2299372c19d56bcd35cf05a2738308758d32b9eaed2371898d8f5bd33f084aa3
size 34806269

27
py314.patch Normal file
View File

@@ -0,0 +1,27 @@
From 2a94a7ff1338708e49dbc23ed48734b260faafd2 Mon Sep 17 00:00:00 2001
From: Thomas A Caswell <tcaswell@gmail.com>
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.

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Feb 10 14:16:59 UTC 2026 - Markéta Machová <mmachova@suse.com>
- Add py314.patch to fix tests with python 3.14
-------------------------------------------------------------------
Tue Nov 11 10:55:03 UTC 2025 - Markéta Machová <mmachova@suse.com>

View File

@@ -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