Update to latest version (#2304229)

This commit is contained in:
Elliott Sales de Andrade
2025-01-11 00:53:44 -05:00
parent ed37137f1e
commit f02849f05b
10 changed files with 106 additions and 128 deletions
+2
View File
@@ -115,3 +115,5 @@ matplotlib-1.0.0-without-gpc.tar.gz
/matplotlib-3.9.3.tar.gz
/matplotlib-3.9.3-with-freetype-2.13.1.tar.gz
/matplotlib-3.9.4.tar.gz
/matplotlib-3.10.0.tar.gz
/matplotlib-3.10.0-with-freetype-2.13.1.tar.gz
+6 -6
View File
@@ -1,7 +1,7 @@
From fde31cca645d54c6f019d4882b6fe4e71a6dc946 Mon Sep 17 00:00:00 2001
From e47d30f3ab1eddcf9e7966f73262e80cc8bc7487 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
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 <quantum.analyst@gmail.com>
---
@@ -9,10 +9,10 @@ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
index ad4676b11a..b925a4a703 100644
index 5f964e0b34..f82d92466a 100644
--- a/lib/matplotlib/__init__.py
+++ b/lib/matplotlib/__init__.py
@@ -589,7 +589,8 @@ def get_cachedir():
@@ -590,7 +590,8 @@ def get_cachedir():
@_logged_cached('matplotlib data path: %s')
def get_data_path():
"""Return the path to Matplotlib data."""
@@ -22,7 +22,7 @@ index ad4676b11a..b925a4a703 100644
def matplotlib_fname():
@@ -609,6 +610,7 @@ def matplotlib_fname():
@@ -610,6 +611,7 @@ def matplotlib_fname():
is not defined)
- On other platforms,
- ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined
@@ -30,7 +30,7 @@ index ad4676b11a..b925a4a703 100644
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
exist.
"""
@@ -627,6 +629,7 @@ def matplotlib_fname():
@@ -628,6 +630,7 @@ def matplotlib_fname():
yield matplotlibrc
yield os.path.join(matplotlibrc, 'matplotlibrc')
yield os.path.join(get_configdir(), 'matplotlibrc')
@@ -1,7 +1,7 @@
From 283c5005dbbbea1147e539075032d6ec43c88166 Mon Sep 17 00:00:00 2001
From a351cfcbc8b9a7c9e7854b461647b291e28c1988 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Fri, 14 Feb 2020 06:05:42 -0500
Subject: [PATCH 3/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 <quantum.analyst@gmail.com>
---
@@ -9,17 +9,18 @@ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
lib/matplotlib/__init__.py | 2 +-
lib/matplotlib/tests/test_axes.py | 4 ++--
lib/matplotlib/tests/test_backend_pgf.py | 2 +-
lib/matplotlib/tests/test_constrainedlayout.py | 10 +++++-----
lib/matplotlib/tests/test_constrainedlayout.py | 12 ++++++------
lib/matplotlib/tests/test_ft2font.py | 6 +++---
lib/matplotlib/tests/test_legend.py | 4 ++--
lib/matplotlib/tests/test_polar.py | 2 +-
lib/matplotlib/tests/test_tightlayout.py | 10 +++++-----
8 files changed, 18 insertions(+), 18 deletions(-)
9 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/extern/meson.build b/extern/meson.build
index 662feb7872..df42b908af 100644
index 5463183a90..c7233815af 100644
--- a/extern/meson.build
+++ b/extern/meson.build
@@ -14,7 +14,7 @@ else
@@ -13,7 +13,7 @@ else
# must match the value in `lib/matplotlib.__init__.py`. Also update the docs
# in `docs/devel/dependencies.rst`. Bump the cache key in
# `.circleci/config.yml` when changing requirements.
@@ -29,10 +30,10 @@ index 662feb7872..df42b908af 100644
freetype_proj = subproject(
f'freetype-@LOCAL_FREETYPE_VERSION@',
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
index b925a4a703..ec68e4932b 100644
index f82d92466a..c0551b5b5f 100644
--- a/lib/matplotlib/__init__.py
+++ b/lib/matplotlib/__init__.py
@@ -1316,7 +1316,7 @@ def _val_or_rc(val, rc_name):
@@ -1361,7 +1361,7 @@ def _val_or_rc(val, rc_name):
def _init_tests():
# The version of FreeType to install locally for running the tests. This must match
# the value in `meson.build`.
@@ -42,10 +43,10 @@ index b925a4a703..ec68e4932b 100644
from matplotlib import ft2font
if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
index e99ef129eb..2355c82f62 100644
index e9218bc825..522bfd1e07 100644
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
@@ -7765,7 +7765,7 @@ def test_normal_axes():
@@ -7971,7 +7971,7 @@ def test_normal_axes():
]
for nn, b in enumerate(bbaxis):
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
@@ -54,7 +55,7 @@ index e99ef129eb..2355c82f62 100644
target = [
[150.0, 119.999, 930.0, 11.111],
@@ -7783,7 +7783,7 @@ def test_normal_axes():
@@ -7989,7 +7989,7 @@ def test_normal_axes():
target = [85.5138, 75.88888, 1021.11, 1017.11]
targetbb = mtransforms.Bbox.from_bounds(*target)
@@ -64,7 +65,7 @@ index e99ef129eb..2355c82f62 100644
# test that get_position roundtrips to get_window_extent
axbb = ax.get_position().transformed(fig.transFigure).bounds
diff --git a/lib/matplotlib/tests/test_backend_pgf.py b/lib/matplotlib/tests/test_backend_pgf.py
index 8a83515f16..26bc9d6c48 100644
index e218a81cdc..839ad724e1 100644
--- a/lib/matplotlib/tests/test_backend_pgf.py
+++ b/lib/matplotlib/tests/test_backend_pgf.py
@@ -165,7 +165,7 @@ def test_pathclip():
@@ -77,7 +78,7 @@ index 8a83515f16..26bc9d6c48 100644
mpl.rcParams.update({'font.family': 'serif', 'pgf.rcfonts': False})
Y, X = np.ogrid[-1:1:40j, -1:1:40j]
diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py
index 4dc4d9501e..47a4e80bb5 100644
index e42e2ee9bf..d8b59a25d4 100644
--- a/lib/matplotlib/tests/test_constrainedlayout.py
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
@@ -435,7 +435,7 @@ def test_hidden_axes():
@@ -113,12 +114,39 @@ index 4dc4d9501e..47a4e80bb5 100644
+ np.testing.assert_allclose(pos.y0, 0.1934, atol=1e-2)
@pytest.mark.parametrize('arg, state', [
def test_compressed_suptitle():
@@ -675,7 +675,7 @@ def test_compressed_suptitle():
title = fig.suptitle("Title")
fig.draw_without_rendering()
- assert title.get_position()[1] == pytest.approx(0.7457, abs=1e-3)
+ assert title.get_position()[1] == pytest.approx(0.7457, abs=1e-2)
title = fig.suptitle("Title", y=0.98)
fig.draw_without_rendering()
diff --git a/lib/matplotlib/tests/test_ft2font.py b/lib/matplotlib/tests/test_ft2font.py
index 7dc851b2c9..cf72a31568 100644
--- a/lib/matplotlib/tests/test_ft2font.py
+++ b/lib/matplotlib/tests/test_ft2font.py
@@ -703,10 +703,10 @@ def test_ft2font_get_sfnt_table(font_name, header):
@pytest.mark.parametrize('left, right, unscaled, unfitted, default', [
# These are all the same class.
- ('A', 'A', 57, 248, 256), ('A', 'À', 57, 248, 256), ('A', 'Á', 57, 248, 256),
- ('A', 'Â', 57, 248, 256), ('A', 'Ã', 57, 248, 256), ('A', 'Ä', 57, 248, 256),
+ ('A', 'A', 57, 247, 256), ('A', 'À', 57, 247, 256), ('A', 'Á', 57, 247, 256),
+ ('A', 'Â', 57, 247, 256), ('A', 'Ã', 57, 247, 256), ('A', 'Ä', 57, 247, 256),
# And a few other random ones.
- ('D', 'A', -36, -156, -128), ('T', '.', -243, -1056, -1024),
+ ('D', 'A', -36, -156, -128), ('T', '.', -243, -1055, -1024),
('X', 'C', -149, -647, -640), ('-', 'J', 114, 495, 512),
])
def test_ft2font_get_kerning(left, right, unscaled, unfitted, default):
diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py
index 3c2af27564..2b8709f934 100644
index 61892378bd..e4a2f63995 100644
--- a/lib/matplotlib/tests/test_legend.py
+++ b/lib/matplotlib/tests/test_legend.py
@@ -520,9 +520,9 @@ def test_figure_legend_outside():
@@ -507,9 +507,9 @@ def test_figure_legend_outside():
fig.draw_without_rendering()
assert_allclose(axs.get_window_extent().extents,
@@ -131,7 +159,7 @@ index 3c2af27564..2b8709f934 100644
@image_comparison(['legend_stackplot.png'],
diff --git a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py
index 6b3c08d2eb..5160112e37 100644
index ee38c88a12..f1945b3d2e 100644
--- a/lib/matplotlib/tests/test_polar.py
+++ b/lib/matplotlib/tests/test_polar.py
@@ -321,7 +321,7 @@ def test_get_tightbbox_polar():
-41
View File
@@ -1,41 +0,0 @@
From 9421754530479435e21a98d2f549330899ed8d85 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Fri, 11 Aug 2023 02:36:06 -0400
Subject: [PATCH 2/6] Unpin NumPy build requirement
This is so high simply to take advantage of the new
backwards-compatibility guarantee in NumPy 1.25, but Fedora will never
run against a version different from the one it was built against.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
pyproject.toml | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index aa6aa23506..1894bbf3cd 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -76,18 +76,7 @@ requires = [
"meson-python>=0.13.1,<0.17.0",
"pybind11>=2.6,!=2.13.3",
"setuptools_scm>=7",
-
- # Comments on numpy build requirement range:
- #
- # 1. >=2.0.x is the numpy requirement for wheel builds for distribution
- # on PyPI - building against 2.x yields wheels that are also
- # ABI-compatible with numpy 1.x at runtime.
- # 2. Note that building against numpy 1.x works fine too - users and
- # redistributors can do this by installing the numpy version they like
- # and disabling build isolation.
- # 3. The <2.3 upper bound is for matching the numpy deprecation policy,
- # it should not be loosened.
- "numpy>=2.0.0rc1,<2.3",
+ "numpy",
]
[tool.meson-python.args]
--
2.47.0
@@ -1,7 +1,7 @@
From b671c4141dc9692ce8745a4ddb9f6b0b14e5e70f Mon Sep 17 00:00:00 2001
From 60e5eb975843f9b590aa35df80178d28eecd1d82 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Fri, 13 Dec 2024 02:03:33 -0500
Subject: [PATCH 4/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,27 +12,27 @@ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 1894bbf3cd..bdf2119f1b 100644
index 832d76308e..5451e972de 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -48,7 +48,7 @@ requires-python = ">=3.9"
@@ -46,7 +46,7 @@ requires-python = ">=3.10"
[project.optional-dependencies]
# Should be a copy of the build dependencies below.
dev = [
- "meson-python>=0.13.1,<0.17.0",
+ "meson-python>=0.13.1",
"numpy>=1.25",
"pybind11>=2.6,!=2.13.3",
"pybind11>=2.13.2,!=2.13.3",
"setuptools_scm>=7",
@@ -73,7 +73,7 @@ dev = [
# Not required by us but setuptools_scm without a version, cso _if_
@@ -70,7 +70,7 @@ dev = [
build-backend = "mesonpy"
# Also keep in sync with optional dependencies above.
requires = [
- "meson-python>=0.13.1,<0.17.0",
+ "meson-python>=0.13.1",
"pybind11>=2.6,!=2.13.3",
"pybind11>=2.13.2,!=2.13.3",
"setuptools_scm>=7",
"numpy",
]
--
2.47.0
@@ -1,7 +1,7 @@
From f6ecac5a3c02b32d66acd0fff41e1732d0939f60 Mon Sep 17 00:00:00 2001
From ae023d1e792b356b0105d23ebecec4f2747457d7 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Mon, 22 Aug 2022 18:43:28 -0400
Subject: [PATCH 5/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 <quantum.analyst@gmail.com>
---
@@ -9,7 +9,7 @@ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 file changed, 35 insertions(+), 4 deletions(-)
diff --git a/lib/matplotlib/mlab.py b/lib/matplotlib/mlab.py
index e1f08c0da5..5c0d56c74d 100644
index 8326ac186e..bdaa34b734 100644
--- a/lib/matplotlib/mlab.py
+++ b/lib/matplotlib/mlab.py
@@ -49,6 +49,7 @@ Spectral functions
@@ -0,0 +1,32 @@
From 8111678582e4495e4d011c8a7cca4cd5cc636635 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Tue, 12 Nov 2024 01:05:25 -0500
Subject: [PATCH 5/5] Partially revert "TST: Fix minor issues in interactive
backend test (#28838)"
This reverts commit 7c7f94c5f71e99f148255e3bb570fec25c8fe754.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
lib/matplotlib/tests/test_backends_interactive.py | 5 ++++-
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 063c72e2cd..5dd53440f7 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():
result_after = io.BytesIO()
fig.savefig(result_after, format='png')
- assert result.getvalue() == result_after.getvalue()
+ if 'qt' not in backend and 'wx' not in backend:
+ # FIXME: This should be enabled everywhere once Qt5 is fixed on macOS
+ # to not resize incorrectly.
+ assert result.getvalue() == result_after.getvalue()
@pytest.mark.parametrize("env", _get_testable_interactive_backends())
--
2.47.0
@@ -1,41 +0,0 @@
From 270a3129688827bb53a29a00e6f745e725f24ff4 Mon Sep 17 00:00:00 2001
From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
Date: Wed, 4 Dec 2024 08:54:18 +0100
Subject: [PATCH 6/6] Merge pull request #29206 from QuLogic/wayland-tests
Skip more tests on pure-Wayland systems
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
lib/matplotlib/tests/test_backends_interactive.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/matplotlib/tests/test_backends_interactive.py b/lib/matplotlib/tests/test_backends_interactive.py
index ca702bc1d9..129c9596cb 100644
--- a/lib/matplotlib/tests/test_backends_interactive.py
+++ b/lib/matplotlib/tests/test_backends_interactive.py
@@ -78,7 +78,10 @@ def _get_available_interactive_backends():
missing = [dep for dep in deps if not importlib.util.find_spec(dep)]
if missing:
reason = "{} cannot be imported".format(", ".join(missing))
- elif env["MPLBACKEND"] == "tkagg" and _is_linux_and_xdisplay_invalid:
+ elif _is_linux_and_xdisplay_invalid and (
+ env["MPLBACKEND"] == "tkagg"
+ # Remove when https://github.com/wxWidgets/Phoenix/pull/2638 is out.
+ or env["MPLBACKEND"].startswith("wx")):
reason = "$DISPLAY is unset"
elif _is_linux_and_display_invalid:
reason = "$DISPLAY and $WAYLAND_DISPLAY are unset"
@@ -452,6 +455,9 @@ def qt5_and_qt6_pairs():
yield pair
+@pytest.mark.skipif(
+ sys.platform == "linux" and not _c_internal_utils.display_is_valid(),
+ reason="$DISPLAY and $WAYLAND_DISPLAY are unset")
@pytest.mark.parametrize('host, mpl', [*qt5_and_qt6_pairs()])
def test_cross_Qt_imports(host, mpl):
try:
--
2.47.0
+7 -9
View File
@@ -32,13 +32,13 @@
%global _docdir_fmt %{name}
# Updated test images for new FreeType.
%global mpl_images_version 3.9.3
%global mpl_images_version 3.10.0
# The version of FreeType in this Fedora branch.
%global ftver 2.13.1
Name: python-matplotlib
Version: 3.9.4
Version: 3.10.0
%global Version %{version_no_tilde %{quote:%nil}}
Release: %autorelease
Summary: Python 2D plotting library
@@ -54,18 +54,16 @@ Source0: %pypi_source matplotlib %{Version}
Source1000: https://github.com/QuLogic/mpl-images/archive/v%{mpl_images_version}-with-freetype-%{ftver}/matplotlib-%{mpl_images_version}-with-freetype-%{ftver}.tar.gz
# Search in /etc/matplotlibrc:
Patch1001: 0001-matplotlibrc-path-search-fix.patch
# We don't need to use NumPy 1.25.
Patch1002: 0002-Unpin-NumPy-build-requirement.patch
# Increase tolerances for new FreeType everywhere:
Patch1003: 0003-Set-FreeType-version-to-%{ftver}-and-update-tolerances.patch
Patch1002: 0002-Set-FreeType-version-to-%{ftver}-and-update-tolerances.patch
# We don't need to use older meson-python.
Patch1004: 0004-Unpin-meson-python-build-requirement.patch
Patch1003: 0003-Unpin-meson-python-build-requirement.patch
# https://github.com/matplotlib/matplotlib/pull/21190#issuecomment-1223271888
Patch0001: 0005-Use-old-stride_windows-implementation-on-32-bit-x86.patch
Patch0001: 0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch
# https://github.com/matplotlib/matplotlib/pull/29206
Patch0002: 0006-Merge-pull-request-29206-from-QuLogic-wayland-tests.patch
# Temporary fix for some tests.
Patch0002: 0005-Partially-revert-TST-Fix-minor-issues-in-interactive.patch
BuildRequires: gcc
BuildRequires: gcc-c++
+2 -2
View File
@@ -1,2 +1,2 @@
SHA512 (matplotlib-3.9.4.tar.gz) = adfa875cba0b030ee0efaf11ed1be881858dc13391c966a2d9485ae2358fccf0b5356e16966a0c9da9f682e4a9d2f3960551756aca30ddc048632346548b1447
SHA512 (matplotlib-3.9.3-with-freetype-2.13.1.tar.gz) = 53cb50ae711ba5ba38d42b7723bbfbd74d022cad6ab91de6c05fb0e971c0b8212ad33359b2ea7ce5a0365cdb1708cd58773bae2e0bf0d4a37696b28206083eed
SHA512 (matplotlib-3.10.0.tar.gz) = 31a71640ef9cbc8cae928156c70119a0bdc1a8c44c8dc5af5333f5484525dd6a375e6f263d739ad3422b0e35d474f7742e08c71c40df0f1f71b526e21adc17e1
SHA512 (matplotlib-3.10.0-with-freetype-2.13.1.tar.gz) = c32e7b1bfc6712cc7496aabf559892f938c7724ec64f806683eb6db6493832506fe77202c2e07355e233d254b9784d9d5bfb50a97c3db5a618f5592d646e4041