Update to 3.7.0
This commit is contained in:
parent
0b92076142
commit
6053ff6f06
4
.gitignore
vendored
4
.gitignore
vendored
@ -92,3 +92,7 @@ matplotlib-1.0.0-without-gpc.tar.gz
|
||||
/matplotlib-3.6.3.tar.gz
|
||||
/pgf_pdflatex.pdf
|
||||
/pgf_rcupdate2.pdf
|
||||
/matplotlib-3.7.0rc1.tar.gz
|
||||
/matplotlib-3.7.0rc1-with-freetype-2.12.1.tar.gz
|
||||
/matplotlib-3.7.0.tar.gz
|
||||
/matplotlib-3.7.0-with-freetype-2.12.1.tar.gz
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 3e43f06eaad8cdb48d30b4cbe23a881c6fa5c1ff Mon Sep 17 00:00:00 2001
|
||||
From ddfa1c59d9304eed3a70abcc98c6e1786ce3d751 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/4] matplotlibrc path search fix
|
||||
Subject: [PATCH 1/7] 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 77d25bbe33..9786447e23 100644
|
||||
index b279c46516..27de76f0c4 100644
|
||||
--- a/lib/matplotlib/__init__.py
|
||||
+++ b/lib/matplotlib/__init__.py
|
||||
@@ -540,7 +540,8 @@ def get_cachedir():
|
||||
@@ -566,7 +566,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 77d25bbe33..9786447e23 100644
|
||||
|
||||
|
||||
def matplotlib_fname():
|
||||
@@ -560,6 +561,7 @@ def matplotlib_fname():
|
||||
@@ -586,6 +587,7 @@ def matplotlib_fname():
|
||||
is not defined)
|
||||
- On other platforms,
|
||||
- ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined
|
||||
@ -30,7 +30,7 @@ index 77d25bbe33..9786447e23 100644
|
||||
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
|
||||
exist.
|
||||
"""
|
||||
@@ -578,6 +580,7 @@ def matplotlib_fname():
|
||||
@@ -604,6 +606,7 @@ def matplotlib_fname():
|
||||
yield matplotlibrc
|
||||
yield os.path.join(matplotlibrc, 'matplotlibrc')
|
||||
yield os.path.join(get_configdir(), 'matplotlibrc')
|
||||
@ -39,5 +39,5 @@ index 77d25bbe33..9786447e23 100644
|
||||
|
||||
for fname in gen_candidates():
|
||||
--
|
||||
2.36.1
|
||||
2.39.2
|
||||
|
||||
|
26
0002-Don-t-require-oldest-supported-numpy.patch
Normal file
26
0002-Don-t-require-oldest-supported-numpy.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From a183eed4c8d341af938a49bb646a14f64df0c180 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Thu, 26 Jan 2023 06:40:06 -0500
|
||||
Subject: [PATCH 2/7] Don't require oldest-supported-numpy
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
pyproject.toml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index 907b05a39b..81e3d80035 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -2,7 +2,7 @@
|
||||
build-backend = "setuptools.build_meta"
|
||||
requires = [
|
||||
"certifi>=2020.06.20",
|
||||
- "oldest-supported-numpy",
|
||||
+ "numpy",
|
||||
"pybind11>=2.6",
|
||||
"setuptools_scm>=7",
|
||||
]
|
||||
--
|
||||
2.39.2
|
||||
|
@ -1,145 +0,0 @@
|
||||
From 0939c27b1d47cabd19c09fc09f15ef4fb18331b4 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Tue, 24 Aug 2021 04:47:50 -0400
|
||||
Subject: [PATCH 3/4] Increase a few test tolerances on some arches.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
lib/matplotlib/tests/test_axes.py | 6 ++++--
|
||||
lib/matplotlib/tests/test_backend_pgf.py | 2 +-
|
||||
lib/matplotlib/tests/test_colorbar.py | 5 ++++-
|
||||
lib/matplotlib/tests/test_contour.py | 3 ++-
|
||||
lib/matplotlib/tests/test_image.py | 4 ++--
|
||||
lib/matplotlib/tests/test_lines.py | 4 +++-
|
||||
lib/matplotlib/tests/test_mathtext.py | 7 +++++--
|
||||
7 files changed, 21 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
|
||||
index c8604b8657..da72bb9415 100644
|
||||
--- a/lib/matplotlib/tests/test_axes.py
|
||||
+++ b/lib/matplotlib/tests/test_axes.py
|
||||
@@ -1031,7 +1031,8 @@ def test_imshow():
|
||||
ax.imshow("r", data=data)
|
||||
|
||||
|
||||
-@image_comparison(['imshow_clip'], style='mpl20')
|
||||
+@image_comparison(['imshow_clip'], style='mpl20',
|
||||
+ tol=0 if platform.machine() == 'x86_64' else 1.24)
|
||||
def test_imshow_clip():
|
||||
# As originally reported by Gellule Xg <gellule.xg@free.fr>
|
||||
# use former defaults to match existing baseline image
|
||||
@@ -2340,7 +2341,8 @@ def test_contour_hatching():
|
||||
extend='both', alpha=0.5)
|
||||
|
||||
|
||||
-@image_comparison(['contour_colorbar'], style='mpl20')
|
||||
+@image_comparison(['contour_colorbar'], style='mpl20',
|
||||
+ tol=0 if platform.machine() == 'x86_64' else 0.02)
|
||||
def test_contour_colorbar():
|
||||
x, y, z = contour_dat()
|
||||
|
||||
diff --git a/lib/matplotlib/tests/test_colorbar.py b/lib/matplotlib/tests/test_colorbar.py
|
||||
index 4336b761f6..7d3927408b 100644
|
||||
--- a/lib/matplotlib/tests/test_colorbar.py
|
||||
+++ b/lib/matplotlib/tests/test_colorbar.py
|
||||
@@ -1,3 +1,5 @@
|
||||
+import platform
|
||||
+
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
@@ -233,7 +235,8 @@ def test_colorbar_single_ax_panchor_east(constrained):
|
||||
assert ax.get_anchor() == 'E'
|
||||
|
||||
|
||||
-@image_comparison(['contour_colorbar.png'], remove_text=True)
|
||||
+@image_comparison(['contour_colorbar.png'], remove_text=True,
|
||||
+ tol=0 if platform.machine() == 'x86_64' else 0.01)
|
||||
def test_contour_colorbar():
|
||||
fig, ax = plt.subplots(figsize=(4, 2))
|
||||
data = np.arange(1200).reshape(30, 40) - 500
|
||||
diff --git a/lib/matplotlib/tests/test_contour.py b/lib/matplotlib/tests/test_contour.py
|
||||
index 8bf77f0d54..82c0b09ac3 100644
|
||||
--- a/lib/matplotlib/tests/test_contour.py
|
||||
+++ b/lib/matplotlib/tests/test_contour.py
|
||||
@@ -319,7 +319,8 @@ def test_contourf_log_extension():
|
||||
|
||||
|
||||
@image_comparison(['contour_addlines.png'],
|
||||
- remove_text=True, style='mpl20', tol=0.03)
|
||||
+ remove_text=True, style='mpl20',
|
||||
+ tol=0.03 if platform.machine() == 'x86_64' else 0.15)
|
||||
# tolerance is because image changed minutely when tick finding on
|
||||
# colorbars was cleaned up...
|
||||
def test_contour_addlines():
|
||||
diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py
|
||||
index 46dbe4cfe8..268473c6c0 100644
|
||||
--- a/lib/matplotlib/tests/test_image.py
|
||||
+++ b/lib/matplotlib/tests/test_image.py
|
||||
@@ -1322,8 +1322,8 @@ def test_nonuniform_and_pcolor():
|
||||
ax.set(xlim=(0, 10))
|
||||
|
||||
|
||||
-@image_comparison(["rgba_antialias.png"], style="mpl20",
|
||||
- remove_text=True)
|
||||
+@image_comparison(["rgba_antialias.png"], style="mpl20", remove_text=True,
|
||||
+ tol=0 if platform.machine() == 'x86_64' else 0.007)
|
||||
def test_rgba_antialias():
|
||||
fig, axs = plt.subplots(2, 2, figsize=(3.5, 3.5), sharex=False,
|
||||
sharey=False, constrained_layout=True)
|
||||
diff --git a/lib/matplotlib/tests/test_lines.py b/lib/matplotlib/tests/test_lines.py
|
||||
index e7002df8a5..8738fd94a0 100644
|
||||
--- a/lib/matplotlib/tests/test_lines.py
|
||||
+++ b/lib/matplotlib/tests/test_lines.py
|
||||
@@ -3,6 +3,7 @@ Tests specific to the lines module.
|
||||
"""
|
||||
|
||||
import itertools
|
||||
+import platform
|
||||
import timeit
|
||||
from types import SimpleNamespace
|
||||
|
||||
@@ -165,7 +166,8 @@ def test_set_drawstyle():
|
||||
assert len(line.get_path().vertices) == len(x)
|
||||
|
||||
|
||||
-@image_comparison(['line_collection_dashes'], remove_text=True, style='mpl20')
|
||||
+@image_comparison(['line_collection_dashes'], remove_text=True, style='mpl20',
|
||||
+ tol=0 if platform.machine() == 'x86_64' else 0.62)
|
||||
def test_set_line_coll_dash_image():
|
||||
fig, ax = plt.subplots()
|
||||
np.random.seed(0)
|
||||
diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py
|
||||
index 7f8b06fa0e..d7d5e687fe 100644
|
||||
--- a/lib/matplotlib/tests/test_mathtext.py
|
||||
+++ b/lib/matplotlib/tests/test_mathtext.py
|
||||
@@ -1,5 +1,6 @@
|
||||
import io
|
||||
from pathlib import Path
|
||||
+import platform
|
||||
import re
|
||||
import shlex
|
||||
from xml.etree import ElementTree as ET
|
||||
@@ -198,7 +199,8 @@ def baseline_images(request, fontset, index, text):
|
||||
@pytest.mark.parametrize(
|
||||
'fontset', ['cm', 'stix', 'stixsans', 'dejavusans', 'dejavuserif'])
|
||||
@pytest.mark.parametrize('baseline_images', ['mathtext'], indirect=True)
|
||||
-@image_comparison(baseline_images=None)
|
||||
+@image_comparison(baseline_images=None,
|
||||
+ tol=0.011 if platform.machine() in ('ppc64le', 's390x') else 0)
|
||||
def test_mathtext_rendering(baseline_images, fontset, index, text):
|
||||
mpl.rcParams['mathtext.fontset'] = fontset
|
||||
fig = plt.figure(figsize=(5.25, 0.75))
|
||||
@@ -239,7 +241,8 @@ def test_mathtext_rendering_lightweight(baseline_images, fontset, index, text):
|
||||
@pytest.mark.parametrize(
|
||||
'fontset', ['cm', 'stix', 'stixsans', 'dejavusans', 'dejavuserif'])
|
||||
@pytest.mark.parametrize('baseline_images', ['mathfont'], indirect=True)
|
||||
-@image_comparison(baseline_images=None, extensions=['png'])
|
||||
+@image_comparison(baseline_images=None, extensions=['png'],
|
||||
+ tol=0.011 if platform.machine() in ('ppc64le', 's390x') else 0)
|
||||
def test_mathfont_rendering(baseline_images, fontset, index, text):
|
||||
mpl.rcParams['mathtext.fontset'] = fontset
|
||||
fig = plt.figure(figsize=(5.25, 0.75))
|
||||
--
|
||||
2.36.1
|
||||
|
@ -1,23 +1,24 @@
|
||||
From c7f6a197992cfd989fddb858afcde5abcdecf70e Mon Sep 17 00:00:00 2001
|
||||
From 13103ca6deedcc82a8c22cee56688c10e18ee30e 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 2/4] Set FreeType version to 2.12.1 and update tolerances.
|
||||
Subject: [PATCH 3/7] Set FreeType version to 2.12.1 and update tolerances
|
||||
|
||||
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_constrainedlayout.py | 6 +++---
|
||||
lib/matplotlib/tests/test_constrainedlayout.py | 8 ++++----
|
||||
lib/matplotlib/tests/test_legend.py | 4 ++--
|
||||
lib/matplotlib/tests/test_polar.py | 2 +-
|
||||
lib/matplotlib/tests/test_tightlayout.py | 10 +++++-----
|
||||
setupext.py | 15 +++++++++++++--
|
||||
6 files changed, 25 insertions(+), 14 deletions(-)
|
||||
7 files changed, 28 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
|
||||
index 9786447e23..56266f0688 100644
|
||||
index 27de76f0c4..179d7ed1ff 100644
|
||||
--- a/lib/matplotlib/__init__.py
|
||||
+++ b/lib/matplotlib/__init__.py
|
||||
@@ -1213,7 +1213,7 @@ default_test_modules = [
|
||||
@@ -1284,7 +1284,7 @@ def is_interactive():
|
||||
def _init_tests():
|
||||
# The version of FreeType to install locally for running the
|
||||
# tests. This must match the value in `setupext.py`
|
||||
@ -27,10 +28,10 @@ index 9786447e23..56266f0688 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 8d6466c749..c8604b8657 100644
|
||||
index 8bf6051b3e..2072056d9e 100644
|
||||
--- a/lib/matplotlib/tests/test_axes.py
|
||||
+++ b/lib/matplotlib/tests/test_axes.py
|
||||
@@ -7210,7 +7210,7 @@ def test_normal_axes():
|
||||
@@ -7388,7 +7388,7 @@ def test_normal_axes():
|
||||
]
|
||||
for nn, b in enumerate(bbaxis):
|
||||
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
|
||||
@ -39,7 +40,7 @@ index 8d6466c749..c8604b8657 100644
|
||||
|
||||
target = [
|
||||
[150.0, 119.999, 930.0, 11.111],
|
||||
@@ -7228,7 +7228,7 @@ def test_normal_axes():
|
||||
@@ -7406,7 +7406,7 @@ def test_normal_axes():
|
||||
|
||||
target = [85.5138, 75.88888, 1021.11, 1017.11]
|
||||
targetbb = mtransforms.Bbox.from_bounds(*target)
|
||||
@ -49,7 +50,7 @@ index 8d6466c749..c8604b8657 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_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py
|
||||
index 64906b74c3..bfa53cd430 100644
|
||||
index b0833052ad..c087baa0d5 100644
|
||||
--- a/lib/matplotlib/tests/test_constrainedlayout.py
|
||||
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
|
||||
@@ -431,7 +431,7 @@ def test_hidden_axes():
|
||||
@ -70,7 +71,7 @@ index 64906b74c3..bfa53cd430 100644
|
||||
pos = axs[0, 1].get_position()
|
||||
np.testing.assert_allclose(pos.x1, 0.7024, atol=1e-3)
|
||||
|
||||
@@ -652,7 +652,7 @@ def test_compressed1():
|
||||
@@ -652,10 +652,10 @@ def test_compressed1():
|
||||
|
||||
pos = axs[0, 0].get_position()
|
||||
np.testing.assert_allclose(pos.x0, 0.06195, atol=1e-3)
|
||||
@ -78,12 +79,32 @@ index 64906b74c3..bfa53cd430 100644
|
||||
+ np.testing.assert_allclose(pos.y1, 0.8537, atol=1e-2)
|
||||
pos = axs[1, 2].get_position()
|
||||
np.testing.assert_allclose(pos.x1, 0.8618, atol=1e-3)
|
||||
np.testing.assert_allclose(pos.y0, 0.1934, atol=1e-3)
|
||||
- np.testing.assert_allclose(pos.y0, 0.1934, atol=1e-3)
|
||||
+ np.testing.assert_allclose(pos.y0, 0.1934, atol=1e-2)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('arg, state', [
|
||||
diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py
|
||||
index a8d7fd107d..cbca9e93e9 100644
|
||||
--- a/lib/matplotlib/tests/test_legend.py
|
||||
+++ b/lib/matplotlib/tests/test_legend.py
|
||||
@@ -522,9 +522,9 @@ def test_figure_legend_outside():
|
||||
fig.draw_without_rendering()
|
||||
|
||||
assert_allclose(axs.get_window_extent().extents,
|
||||
- axbb[nn])
|
||||
+ axbb[nn], rtol=1)
|
||||
assert_allclose(leg.get_window_extent().extents,
|
||||
- legbb[nn])
|
||||
+ legbb[nn], rtol=1)
|
||||
|
||||
|
||||
@image_comparison(['legend_stackplot.png'])
|
||||
diff --git a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py
|
||||
index c51508ae22..942ffcb521 100644
|
||||
index 1f8e6a75ba..ace40f5526 100644
|
||||
--- a/lib/matplotlib/tests/test_polar.py
|
||||
+++ b/lib/matplotlib/tests/test_polar.py
|
||||
@@ -314,7 +314,7 @@ def test_get_tightbbox_polar():
|
||||
@@ -321,7 +321,7 @@ def test_get_tightbbox_polar():
|
||||
fig.canvas.draw()
|
||||
bb = ax.get_tightbbox(fig.canvas.get_renderer())
|
||||
assert_allclose(
|
||||
@ -93,7 +114,7 @@ index c51508ae22..942ffcb521 100644
|
||||
|
||||
@check_figures_equal(extensions=["png"])
|
||||
diff --git a/lib/matplotlib/tests/test_tightlayout.py b/lib/matplotlib/tests/test_tightlayout.py
|
||||
index 1eb7b4b453..697eba3211 100644
|
||||
index 968f0da7b5..89caa81b98 100644
|
||||
--- a/lib/matplotlib/tests/test_tightlayout.py
|
||||
+++ b/lib/matplotlib/tests/test_tightlayout.py
|
||||
@@ -173,12 +173,12 @@ def test_outward_ticks():
|
||||
@ -115,10 +136,10 @@ index 1eb7b4b453..697eba3211 100644
|
||||
|
||||
|
||||
diff --git a/setupext.py b/setupext.py
|
||||
index 0387223b94..13096a812c 100644
|
||||
index a898d642d6..26cd6fe277 100644
|
||||
--- a/setupext.py
|
||||
+++ b/setupext.py
|
||||
@@ -168,13 +168,23 @@ _freetype_hashes = {
|
||||
@@ -176,13 +176,23 @@ _freetype_hashes = {
|
||||
'955e17244e9b38adb0c98df66abb50467312e6bb70eac07e49ce6bd1a20e809a',
|
||||
'2.10.1':
|
||||
'3a60d391fd579440561bf0e7f31af2222bc610ad6ce4d9d7bd2165bca8669110',
|
||||
@ -144,7 +165,7 @@ index 0387223b94..13096a812c 100644
|
||||
if sys.platform.startswith('win') and platform.machine() == 'ARM64':
|
||||
# older versions of freetype are not supported for win/arm64
|
||||
# Matplotlib tests will not pass
|
||||
@@ -584,6 +594,7 @@ class FreeType(SetupPackage):
|
||||
@@ -597,6 +607,7 @@ class FreeType(SetupPackage):
|
||||
ext.extra_objects.insert(
|
||||
0, str(src_path / 'objs' / '.libs' / libfreetype))
|
||||
ext.define_macros.append(('FREETYPE_BUILD_TYPE', 'local'))
|
||||
@ -153,5 +174,5 @@ index 0387223b94..13096a812c 100644
|
||||
def do_custom_build(self, env):
|
||||
# We're using a system freetype
|
||||
--
|
||||
2.36.1
|
||||
2.39.2
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 77d0ef4bac7e14da704556a6f1f99962b0864a6a Mon Sep 17 00:00:00 2001
|
||||
From b019c8ef0d18c67ddb0350b8821fcbe93ad2ee84 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 4/4] Use old stride_windows implementation on 32-bit x86
|
||||
Subject: [PATCH 4/7] 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, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/matplotlib/mlab.py b/lib/matplotlib/mlab.py
|
||||
index 5e85a9c119..d75acf6d26 100644
|
||||
index 059cf0f162..943eb18e6f 100644
|
||||
--- a/lib/matplotlib/mlab.py
|
||||
+++ b/lib/matplotlib/mlab.py
|
||||
@@ -52,6 +52,7 @@ Spectral functions
|
||||
@ -32,5 +32,5 @@ index 5e85a9c119..d75acf6d26 100644
|
||||
raise ValueError('noverlap must be less than n')
|
||||
return np.lib.stride_tricks.sliding_window_view(
|
||||
--
|
||||
2.36.1
|
||||
2.39.2
|
||||
|
||||
|
39
0006-Fix-setting-CSS-with-latest-GTK4.patch
Normal file
39
0006-Fix-setting-CSS-with-latest-GTK4.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 49484f456c93830c25dc7d4afe2110da8450a485 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Tue, 21 Feb 2023 20:52:42 -0500
|
||||
Subject: [PATCH 6/7] Fix setting CSS with latest GTK4
|
||||
|
||||
In the upcoming 4.10 release, the type annotation was fixed [1]. There
|
||||
may be some overrides added in PyGObject [2] to avoid this difference,
|
||||
but we don't depend on a specific version of it to be able to rely on
|
||||
that (and it's not released yet.) This code should work with the
|
||||
override as well.
|
||||
|
||||
[1] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5441
|
||||
[2] https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/231
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
lib/matplotlib/backends/backend_gtk4.py | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/matplotlib/backends/backend_gtk4.py b/lib/matplotlib/backends/backend_gtk4.py
|
||||
index 8628e14de0..3288192920 100644
|
||||
--- a/lib/matplotlib/backends/backend_gtk4.py
|
||||
+++ b/lib/matplotlib/backends/backend_gtk4.py
|
||||
@@ -74,7 +74,11 @@ class FigureCanvasGTK4(_FigureCanvasGTK, Gtk.DrawingArea):
|
||||
self.set_focusable(True)
|
||||
|
||||
css = Gtk.CssProvider()
|
||||
- css.load_from_data(b".matplotlib-canvas { background-color: white; }")
|
||||
+ style = '.matplotlib-canvas { background-color: white; }'
|
||||
+ if Gtk.check_version(4, 9, 3) is None:
|
||||
+ css.load_from_data(style, -1)
|
||||
+ else:
|
||||
+ css.load_from_data(style.encode('utf-8'))
|
||||
style_ctx = self.get_style_context()
|
||||
style_ctx.add_provider(css, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
|
||||
style_ctx.add_class("matplotlib-canvas")
|
||||
--
|
||||
2.39.2
|
||||
|
@ -0,0 +1,27 @@
|
||||
From 254394ebc1413a363a678ed589adcd30cc986e0c Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Mon, 27 Feb 2023 22:19:23 -0500
|
||||
Subject: [PATCH 7/7] TST: Increase test_set_line_coll_dash_image tolerance
|
||||
slightly.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
lib/matplotlib/tests/test_lines.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/matplotlib/tests/test_lines.py b/lib/matplotlib/tests/test_lines.py
|
||||
index 7eecf5675a..b75d3c01b2 100644
|
||||
--- a/lib/matplotlib/tests/test_lines.py
|
||||
+++ b/lib/matplotlib/tests/test_lines.py
|
||||
@@ -185,7 +185,7 @@ def test_set_drawstyle():
|
||||
|
||||
@image_comparison(
|
||||
['line_collection_dashes'], remove_text=True, style='mpl20',
|
||||
- tol=0.62 if platform.machine() in ('aarch64', 'ppc64le', 's390x') else 0)
|
||||
+ tol=0.65 if platform.machine() in ('aarch64', 'ppc64le', 's390x') else 0)
|
||||
def test_set_line_coll_dash_image():
|
||||
fig, ax = plt.subplots()
|
||||
np.random.seed(0)
|
||||
--
|
||||
2.39.2
|
||||
|
@ -30,14 +30,14 @@
|
||||
%global _docdir_fmt %{name}
|
||||
|
||||
# Updated test images for new FreeType.
|
||||
%global mpl_images_version 3.6.1
|
||||
%global mpl_images_version 3.7.0
|
||||
|
||||
# The version of FreeType in this Fedora branch.
|
||||
%global ftver 2.12.1
|
||||
|
||||
Name: python-matplotlib
|
||||
Version: 3.6.3
|
||||
%global Version 3.6.3
|
||||
Version: 3.7.0
|
||||
%global Version 3.7.0
|
||||
Release: %autorelease
|
||||
Summary: Python 2D plotting library
|
||||
# qt_editor backend is MIT
|
||||
@ -53,15 +53,19 @@ Source1: mplsetup.cfg
|
||||
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
|
||||
Patch1002: 0002-Don-t-require-oldest-supported-numpy.patch
|
||||
# Increase tolerances for new FreeType everywhere:
|
||||
Patch1002: 0002-Set-FreeType-version-to-%{ftver}-and-update-tolerances.patch
|
||||
Patch1003: 0003-Increase-a-few-test-tolerances-on-some-arches.patch
|
||||
Patch1003: 0003-Set-FreeType-version-to-%{ftver}-and-update-tolerances.patch
|
||||
|
||||
# https://github.com/matplotlib/matplotlib/pull/21190#issuecomment-1223271888
|
||||
Patch0001: 0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch
|
||||
# https://github.com/matplotlib/matplotlib/pull/25068
|
||||
Source2000: pgf_pdflatex.pdf
|
||||
Source2001: pgf_rcupdate2.pdf
|
||||
# https://github.com/matplotlib/matplotlib/pull/25280
|
||||
Patch0002: 0006-Fix-setting-CSS-with-latest-GTK4.patch
|
||||
# https://github.com/matplotlib/matplotlib/pull/25341
|
||||
Patch0003: 0007-TST-Increase-test_set_line_coll_dash_image-tolerance.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
@ -300,19 +304,22 @@ Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
||||
|
||||
# Fedora-specific patches follow:
|
||||
%patch1001 -p1
|
||||
# Updated test images for new FreeType.
|
||||
%patch1002 -p1
|
||||
gzip -dc %SOURCE1000 | tar xf - --transform='s~^mpl-images-%{mpl_images_version}-with-freetype-%{ftver}/\([^/]\+\)/~lib/\1/tests/baseline_images/~'
|
||||
# Updated test images for new FreeType.
|
||||
%patch1003 -p1
|
||||
gzip -dc %SOURCE1000 | tar xf - --transform='s~^mpl-images-%{mpl_images_version}-with-freetype-%{ftver}/~~'
|
||||
|
||||
# Copy mplsetup.cfg to the builddir
|
||||
cp -p %{SOURCE1} mplsetup.cfg
|
||||
|
||||
%patch1003 -p1
|
||||
|
||||
# Backports or reported upstream
|
||||
%patch0001 -p1
|
||||
# https://github.com/matplotlib/matplotlib/pull/25068
|
||||
cp -a %SOURCE2000 %SOURCE2001 lib/matplotlib/tests/baseline_images/test_backend_pgf/
|
||||
# https://github.com/matplotlib/matplotlib/pull/25280
|
||||
%patch0002 -p1
|
||||
# https://github.com/matplotlib/matplotlib/pull/25341
|
||||
%patch0003 -p1
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
@ -327,7 +334,7 @@ MPLCONFIGDIR=$PWD %pyproject_wheel
|
||||
%if %{with html}
|
||||
# Need to make built matplotlib libs available for the sphinx extensions:
|
||||
MPLCONFIGDIR=$PWD \
|
||||
PYTHONPATH="%{pyprojec_site_lib}" \
|
||||
PYTHONPATH="%{pyproject_site_lib}" \
|
||||
make -C doc html
|
||||
%endif
|
||||
# Ensure all example files are non-executable so that the -doc
|
||||
@ -378,7 +385,7 @@ MPLCONFIGDIR=$PWD \
|
||||
env %{pytest} -ra -n auto \
|
||||
-m 'not network' \
|
||||
-k 'not test_invisible_Line_rendering and not test_form_widget_get_with_datetime_and_date_fields' \
|
||||
--pyargs matplotlib mpl_toolkits.tests
|
||||
--pyargs matplotlib mpl_toolkits.axes_grid1 mpl_toolkits.axisartist mpl_toolkits.mplot3d
|
||||
%endif
|
||||
|
||||
|
||||
@ -401,13 +408,13 @@ MPLCONFIGDIR=$PWD \
|
||||
|
||||
%files -n python3-matplotlib
|
||||
%license LICENSE/
|
||||
%doc README.rst
|
||||
%doc README.md
|
||||
%{python3_sitearch}/matplotlib-*.dist-info/
|
||||
%{python3_sitearch}/matplotlib-*-nspkg.pth
|
||||
%{python3_sitearch}/matplotlib/
|
||||
%exclude %{python3_sitearch}/matplotlib/tests/baseline_images/*
|
||||
%{python3_sitearch}/mpl_toolkits/
|
||||
%exclude %{python3_sitearch}/mpl_toolkits/tests/baseline_images/*
|
||||
%exclude %{python3_sitearch}/mpl_toolkits/*/tests/baseline_images/*
|
||||
%pycached %{python3_sitearch}/pylab.py
|
||||
%pycached %exclude %{python3_sitearch}/matplotlib/backends/backend_qt5*.py
|
||||
%pycached %exclude %{python3_sitearch}/matplotlib/backends/backend_gtk*.py
|
||||
@ -421,7 +428,7 @@ MPLCONFIGDIR=$PWD \
|
||||
|
||||
%files -n python3-matplotlib-test-data
|
||||
%{python3_sitearch}/matplotlib/tests/baseline_images/
|
||||
%{python3_sitearch}/mpl_toolkits/tests/baseline_images/
|
||||
%{python3_sitearch}/mpl_toolkits/*/tests/baseline_images/
|
||||
|
||||
%files -n python3-matplotlib-qt5
|
||||
%pycached %{python3_sitearch}/matplotlib/backends/backend_qt5*.py
|
||||
|
4
sources
4
sources
@ -1,4 +1,4 @@
|
||||
SHA512 (matplotlib-3.6.3.tar.gz) = 844ca90bcc9953d3d1289a6d471180a3dadb49c75eb59858bbbfb67d4b1292b83b86b366f22ab12d9e97c980376d48b86e745607ec4e812a3010c6fec01398dc
|
||||
SHA512 (matplotlib-3.6.1-with-freetype-2.12.1.tar.gz) = 9210cfe8db2743519188d924dfd5f4ec4a0b5ae589b8a596f5a35b900234fa3a2fe81a047fc486ec69359259685438f4c19bb96a63ca0f544d2f48fbabb1326e
|
||||
SHA512 (matplotlib-3.7.0.tar.gz) = 60207fb10394422b7a11faffb2775c23c377e6dd72ef9f3fde1099d50e1810c4be55cf814da74fd87faf49a628459472945bb901a4cbe73c9676df54b862ad5c
|
||||
SHA512 (matplotlib-3.7.0-with-freetype-2.12.1.tar.gz) = 7c70aaba58d4fcc0bea4f8bc76de71e899c71ceca937ee983531ad79d5604568d8e370bd913bef96ab103903fbc1c5f9318eb5c589fbc33cb2d48b39a04bbb21
|
||||
SHA512 (pgf_pdflatex.pdf) = dc81cc2247f54a2aaf9507ce1db556d91170674796b564d32bfb4c23f38effab6543394cb6caee3c29a32639c9d848517b400d1cac8d20f90678367818a62aa1
|
||||
SHA512 (pgf_rcupdate2.pdf) = 8c0a71047871a055de01a4f0a90aeda9da27e53338d1e89cb20bd52bc54e40a1180df933de0f27c9116d3e983d03b0c47008bebfcf110cf282f8d1d19c026070
|
||||
|
Loading…
Reference in New Issue
Block a user