Compare commits

...

5 Commits

Author SHA1 Message Date
Elliott Sales de Andrade fbc57eefdb Update to latest version (#2139597) 2022-11-03 01:40:25 -04:00
Elliott Sales de Andrade 06a8e578fd Update to latest version (#2133173) 2022-10-15 00:46:15 -04:00
Elliott Sales de Andrade c30bc8df54 Update to latest version (#2127352) 2022-09-19 21:25:45 -04:00
Elliott Sales de Andrade 8b94e4ad13 Update to latest release candidate (#2119958) 2022-08-29 23:11:52 -04:00
Elliott Sales de Andrade 704b8e1dc2 Update to latest release candidate (#2119958) 2022-08-22 18:45:24 -04:00
9 changed files with 166 additions and 179 deletions

9
.gitignore vendored
View File

@ -80,3 +80,12 @@ matplotlib-1.0.0-without-gpc.tar.gz
/matplotlib-3.5.3.tar.gz
/matplotlib-3.5.3-with-freetype-2.11.0.tar.gz
/matplotlib-3.5.3-with-freetype-2.12.1.tar.gz
/matplotlib-3.6.0rc1.tar.gz
/matplotlib-3.6.0rc1-with-freetype-2.12.1.tar.gz
/matplotlib-3.6.0rc2.tar.gz
/matplotlib-3.6.0rc2-with-freetype-2.12.1.tar.gz
/matplotlib-3.6.0.tar.gz
/matplotlib-3.6.0-with-freetype-2.12.1.tar.gz
/matplotlib-3.6.1.tar.gz
/matplotlib-3.6.1-with-freetype-2.12.1.tar.gz
/matplotlib-3.6.2.tar.gz

View File

@ -1,4 +1,4 @@
From a2d7ef7b895d3b0bc9654d31c6cb40935eec0ce9 Mon Sep 17 00:00:00 2001
From 3e43f06eaad8cdb48d30b4cbe23a881c6fa5c1ff 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
@ -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 b8fd4f9860..23841c8377 100644
index 77d25bbe33..9786447e23 100644
--- a/lib/matplotlib/__init__.py
+++ b/lib/matplotlib/__init__.py
@@ -526,7 +526,8 @@ def get_cachedir():
@@ -540,7 +540,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 b8fd4f9860..23841c8377 100644
def matplotlib_fname():
@@ -546,6 +547,7 @@ def matplotlib_fname():
@@ -560,6 +561,7 @@ def matplotlib_fname():
is not defined)
- On other platforms,
- ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined
@ -30,7 +30,7 @@ index b8fd4f9860..23841c8377 100644
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
exist.
"""
@@ -564,6 +566,7 @@ def matplotlib_fname():
@@ -578,6 +580,7 @@ def matplotlib_fname():
yield matplotlibrc
yield os.path.join(matplotlibrc, 'matplotlibrc')
yield os.path.join(get_configdir(), 'matplotlibrc')

View File

@ -1,4 +1,4 @@
From 70e97e4ede29ccc16bad1d329d08b27d753a8f00 Mon Sep 17 00:00:00 2001
From c7f6a197992cfd989fddb858afcde5abcdecf70e 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.
@ -7,18 +7,17 @@ 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 | 2 +-
lib/matplotlib/tests/test_mathtext.py | 7 +++++--
lib/matplotlib/tests/test_constrainedlayout.py | 6 +++---
lib/matplotlib/tests/test_polar.py | 2 +-
lib/matplotlib/tests/test_tightlayout.py | 10 +++++-----
setupext.py | 15 +++++++++++++--
7 files changed, 28 insertions(+), 14 deletions(-)
6 files changed, 25 insertions(+), 14 deletions(-)
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
index 23841c8377..f7f76cbae6 100644
index 9786447e23..56266f0688 100644
--- a/lib/matplotlib/__init__.py
+++ b/lib/matplotlib/__init__.py
@@ -1203,7 +1203,7 @@ default_test_modules = [
@@ -1213,7 +1213,7 @@ default_test_modules = [
def _init_tests():
# The version of FreeType to install locally for running the
# tests. This must match the value in `setupext.py`
@ -28,10 +27,10 @@ index 23841c8377..f7f76cbae6 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 3bd3fecac3..f0b247a7bb 100644
index 8d6466c749..c8604b8657 100644
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
@@ -6732,7 +6732,7 @@ def test_normal_axes():
@@ -7210,7 +7210,7 @@ def test_normal_axes():
]
for nn, b in enumerate(bbaxis):
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
@ -40,7 +39,7 @@ index 3bd3fecac3..f0b247a7bb 100644
target = [
[150.0, 119.999, 930.0, 11.111],
@@ -6750,7 +6750,7 @@ def test_normal_axes():
@@ -7228,7 +7228,7 @@ def test_normal_axes():
target = [85.5138, 75.88888, 1021.11, 1017.11]
targetbb = mtransforms.Bbox.from_bounds(*target)
@ -50,7 +49,7 @@ index 3bd3fecac3..f0b247a7bb 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 8fd3cc5a35..b1e0fa57cd 100644
index 64906b74c3..bfa53cd430 100644
--- a/lib/matplotlib/tests/test_constrainedlayout.py
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
@@ -431,7 +431,7 @@ def test_hidden_axes():
@ -62,39 +61,26 @@ index 8fd3cc5a35..b1e0fa57cd 100644
def test_colorbar_align():
diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py
index 6921a17980..ba0e2a3a6c 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
@@ -192,7 +193,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))
@@ -216,7 +218,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))
@@ -637,7 +637,7 @@ def test_compressed1():
fig.draw_without_rendering()
pos = axs[0, 0].get_position()
- np.testing.assert_allclose(pos.x0, 0.2344, atol=1e-3)
+ np.testing.assert_allclose(pos.x0, 0.2344, atol=1e-2)
pos = axs[0, 1].get_position()
np.testing.assert_allclose(pos.x1, 0.7024, atol=1e-3)
@@ -652,7 +652,7 @@ def test_compressed1():
pos = axs[0, 0].get_position()
np.testing.assert_allclose(pos.x0, 0.06195, atol=1e-3)
- np.testing.assert_allclose(pos.y1, 0.8537, atol=1e-3)
+ 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)
diff --git a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py
index 85aece5fce..9fea856af4 100644
index c51508ae22..942ffcb521 100644
--- a/lib/matplotlib/tests/test_polar.py
+++ b/lib/matplotlib/tests/test_polar.py
@@ -314,7 +314,7 @@ def test_get_tightbbox_polar():
@ -107,10 +93,10 @@ index 85aece5fce..9fea856af4 100644
@check_figures_equal(extensions=["png"])
diff --git a/lib/matplotlib/tests/test_tightlayout.py b/lib/matplotlib/tests/test_tightlayout.py
index e9b01b160d..beab853489 100644
index 1eb7b4b453..697eba3211 100644
--- a/lib/matplotlib/tests/test_tightlayout.py
+++ b/lib/matplotlib/tests/test_tightlayout.py
@@ -172,12 +172,12 @@ def test_outward_ticks():
@@ -173,12 +173,12 @@ def test_outward_ticks():
plt.tight_layout()
# These values were obtained after visual checking that they correspond
# to a tight layouting that did take the ticks into account.
@ -129,10 +115,10 @@ index e9b01b160d..beab853489 100644
diff --git a/setupext.py b/setupext.py
index ae8c21599f..abd01d8813 100644
index 0387223b94..13096a812c 100644
--- a/setupext.py
+++ b/setupext.py
@@ -167,14 +167,24 @@ _freetype_hashes = {
@@ -168,13 +168,23 @@ _freetype_hashes = {
'955e17244e9b38adb0c98df66abb50467312e6bb70eac07e49ce6bd1a20e809a',
'2.10.1':
'3a60d391fd579440561bf0e7f31af2222bc610ad6ce4d9d7bd2165bca8669110',
@ -151,15 +137,14 @@ index ae8c21599f..abd01d8813 100644
+ 'efe71fd4b8246f1b0b1b9bfca13cfff1c9ad85930340c27df469733bbb620938',
}
# This is the version of FreeType to use when building a local version. It
# must match the value in lib/matplotlib.__init__.py and also needs to be
# changed below in the embedded windows build script (grep for "REMINDER" in
# this file). Also update the cache path in `.circleci/config.yml`.
# must match the value in lib/matplotlib.__init__.py, and the cache path in
# `.circleci/config.yml`.
-TESTING_VERSION_OF_FREETYPE = '2.6.1'
+TESTING_VERSION_OF_FREETYPE = '2.12.1'
if sys.platform.startswith('win') and platform.machine() == 'ARM64':
# older versions of freetype are not supported for win/arm64
# Matplotlib tests will not pass
@@ -593,6 +603,7 @@ class FreeType(SetupPackage):
@@ -584,6 +594,7 @@ class FreeType(SetupPackage):
ext.extra_objects.insert(
0, str(src_path / 'objs' / '.libs' / libfreetype))
ext.define_macros.append(('FREETYPE_BUILD_TYPE', 'local'))

View File

@ -1,23 +1,24 @@
From 5fcd96777ede1f29bc3f749d12152879a4d67fdf Mon Sep 17 00:00:00 2001
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_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_streamplot.py | 3 ++-
6 files changed, 17 insertions(+), 8 deletions(-)
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 f0b247a7bb..0a025bb6c7 100644
index c8604b8657..da72bb9415 100644
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
@@ -918,7 +918,8 @@ def test_imshow():
@@ -1031,7 +1031,8 @@ def test_imshow():
ax.imshow("r", data=data)
@ -27,7 +28,7 @@ index f0b247a7bb..0a025bb6c7 100644
def test_imshow_clip():
# As originally reported by Gellule Xg <gellule.xg@free.fr>
# use former defaults to match existing baseline image
@@ -2127,7 +2128,8 @@ def test_contour_hatching():
@@ -2340,7 +2341,8 @@ def test_contour_hatching():
extend='both', alpha=0.5)
@ -37,8 +38,21 @@ index f0b247a7bb..0a025bb6c7 100644
def test_contour_colorbar():
x, y, z = contour_dat()
diff --git a/lib/matplotlib/tests/test_backend_pgf.py b/lib/matplotlib/tests/test_backend_pgf.py
index 482bc073a7..ab16d9736c 100644
--- a/lib/matplotlib/tests/test_backend_pgf.py
+++ b/lib/matplotlib/tests/test_backend_pgf.py
@@ -169,7 +169,7 @@ def test_pathclip():
# test mixed mode rendering
@needs_pgf_xelatex
@pytest.mark.backend('pgf')
-@image_comparison(['pgf_mixedmode.pdf'], style='default')
+@image_comparison(['pgf_mixedmode.pdf'], style='default', tol=0.9)
def test_mixedmode():
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_colorbar.py b/lib/matplotlib/tests/test_colorbar.py
index f103fde7ee..920f392fc5 100644
index 4336b761f6..7d3927408b 100644
--- a/lib/matplotlib/tests/test_colorbar.py
+++ b/lib/matplotlib/tests/test_colorbar.py
@@ -1,3 +1,5 @@
@ -47,7 +61,7 @@ index f103fde7ee..920f392fc5 100644
import numpy as np
import pytest
@@ -230,7 +232,8 @@ def test_colorbar_single_ax_panchor_east(constrained):
@@ -233,7 +235,8 @@ def test_colorbar_single_ax_panchor_east(constrained):
assert ax.get_anchor() == 'E'
@ -58,10 +72,10 @@ index f103fde7ee..920f392fc5 100644
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 f4854db502..c4f0a2a31d 100644
index 8bf77f0d54..82c0b09ac3 100644
--- a/lib/matplotlib/tests/test_contour.py
+++ b/lib/matplotlib/tests/test_contour.py
@@ -345,7 +345,8 @@ def test_contourf_log_extension():
@@ -319,7 +319,8 @@ def test_contourf_log_extension():
@image_comparison(['contour_addlines.png'],
@ -72,10 +86,10 @@ index f4854db502..c4f0a2a31d 100644
# 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 ae02a50727..15f843fd42 100644
index 46dbe4cfe8..268473c6c0 100644
--- a/lib/matplotlib/tests/test_image.py
+++ b/lib/matplotlib/tests/test_image.py
@@ -1329,8 +1329,8 @@ def test_nonuniform_and_pcolor():
@@ -1322,8 +1322,8 @@ def test_nonuniform_and_pcolor():
ax.set(xlim=(0, 10))
@ -87,7 +101,7 @@ index ae02a50727..15f843fd42 100644
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 f6917a134b..a7b5772e8c 100644
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.
@ -98,7 +112,7 @@ index f6917a134b..a7b5772e8c 100644
import timeit
from types import SimpleNamespace
@@ -162,7 +163,8 @@ def test_set_drawstyle():
@@ -165,7 +166,8 @@ def test_set_drawstyle():
assert len(line.get_path().vertices) == len(x)
@ -108,20 +122,37 @@ index f6917a134b..a7b5772e8c 100644
def test_set_line_coll_dash_image():
fig, ax = plt.subplots()
np.random.seed(0)
diff --git a/lib/matplotlib/tests/test_streamplot.py b/lib/matplotlib/tests/test_streamplot.py
index c8824feb06..879d43f28b 100644
--- a/lib/matplotlib/tests/test_streamplot.py
+++ b/lib/matplotlib/tests/test_streamplot.py
@@ -34,7 +34,8 @@ def test_startpoints():
plt.plot(start_x, start_y, 'ok')
-@image_comparison(['streamplot_colormap'], remove_text=True, style='mpl20')
+@image_comparison(['streamplot_colormap'], remove_text=True, style='mpl20',
+ tol=0.01)
def test_colormap():
X, Y, U, V = velocity_field()
plt.streamplot(X, Y, U, V, color=U, density=0.6, linewidth=2,
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

View File

@ -1,36 +0,0 @@
From 804a868268056f01ac81906f311b61f4af480d92 Mon Sep 17 00:00:00 2001
From: Oscar Gustafsson <oscar.gustafsson@gmail.com>
Date: Mon, 4 Jul 2022 12:38:08 +0200
Subject: [PATCH 4/4] Remove setuptools_scm_git_archive dependency
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
setup.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/setup.py b/setup.py
index 17bb7481d2..9840c16601 100644
--- a/setup.py
+++ b/setup.py
@@ -316,8 +316,7 @@ setup( # Finally, pass this all along to setuptools to do the heavy lifting.
setup_requires=[
"certifi>=2020.06.20",
"numpy>=1.17",
- "setuptools_scm>=4,<7",
- "setuptools_scm_git_archive",
+ "setuptools_scm>=7",
],
install_requires=[
"cycler>=0.10",
@@ -330,7 +329,7 @@ setup( # Finally, pass this all along to setuptools to do the heavy lifting.
"python-dateutil>=2.7",
] + (
# Installing from a git checkout that is not producing a wheel.
- ["setuptools_scm>=4,<7"] if (
+ ["setuptools_scm>=7"] if (
Path(__file__).with_name(".git").exists() and
os.environ.get("CIBUILDWHEEL", "0") != "1"
) else []
--
2.36.1

View File

@ -0,0 +1,36 @@
From 77d0ef4bac7e14da704556a6f1f99962b0864a6a 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
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
lib/matplotlib/mlab.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/matplotlib/mlab.py b/lib/matplotlib/mlab.py
index 5e85a9c119..d75acf6d26 100644
--- a/lib/matplotlib/mlab.py
+++ b/lib/matplotlib/mlab.py
@@ -52,6 +52,7 @@ Spectral functions
import functools
from numbers import Number
+import sys
import numpy as np
@@ -252,7 +253,9 @@ def stride_windows(x, n, noverlap=None, axis=0):
def _stride_windows(x, n, noverlap=0, axis=0):
# np>=1.20 provides sliding_window_view, and we only ever use axis=0.
- if hasattr(np.lib.stride_tricks, "sliding_window_view") and axis == 0:
+ if (sys.maxsize > 2**32 and # NumPy version on 32-bit OOMs.
+ hasattr(np.lib.stride_tricks, "sliding_window_view") and
+ axis == 0):
if noverlap >= n:
raise ValueError('noverlap must be less than n')
return np.lib.stride_tricks.sliding_window_view(
--
2.36.1

View File

@ -1,38 +0,0 @@
From dc5b6e87b6f4e1817720ea5aea1110231aab5667 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Wed, 4 May 2022 20:41:01 -0400
Subject: [PATCH] Skip additional backend tests on import error
All the Qt tests in this file already do this, and the remaining one
fails if running headless.
---
lib/matplotlib/tests/test_backend_gtk3.py | 2 +-
lib/matplotlib/tests/test_backend_qt.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/matplotlib/tests/test_backend_gtk3.py b/lib/matplotlib/tests/test_backend_gtk3.py
index 5442930d117f..937ddef5a13f 100644
--- a/lib/matplotlib/tests/test_backend_gtk3.py
+++ b/lib/matplotlib/tests/test_backend_gtk3.py
@@ -6,7 +6,7 @@
pytest.importorskip("matplotlib.backends.backend_gtk3agg")
-@pytest.mark.backend("gtk3agg")
+@pytest.mark.backend("gtk3agg", skip_on_importerror=True)
def test_correct_key():
pytest.xfail("test_widget_send_event is not triggering key_press_event")
diff --git a/lib/matplotlib/tests/test_backend_qt.py b/lib/matplotlib/tests/test_backend_qt.py
index eee4e56536ec..61abf58ac84e 100644
--- a/lib/matplotlib/tests/test_backend_qt.py
+++ b/lib/matplotlib/tests/test_backend_qt.py
@@ -193,7 +193,7 @@ def test_other_signal_before_sigint(target, kwargs):
plt.figure()
-@pytest.mark.backend('Qt5Agg')
+@pytest.mark.backend('Qt5Agg', skip_on_importerror=True)
def test_fig_sigint_override(qt_core):
from matplotlib.backends.backend_qt5 import _BackendQT5
# Create a figure

View File

@ -30,21 +30,21 @@
%global _docdir_fmt %{name}
# Updated test images for new FreeType.
%global mpl_images_version 3.5.3
%global mpl_images_version 3.6.1
# The version of FreeType in this Fedora branch.
%global ftver 2.12.1
Name: python-matplotlib
Version: 3.5.3
%global Version 3.5.3
Version: 3.6.2
%global Version 3.6.2
Release: %autorelease
Summary: Python 2D plotting library
# qt_editor backend is MIT
# ResizeObserver at end of lib/matplotlib/backends/web_backend/js/mpl.js is Public Domain
License: Python and MIT and Public Domain
URL: http://matplotlib.org
Source0: https://github.com/matplotlib/matplotlib/archive/v%{Version}/matplotlib-%{Version}.tar.gz
Source0: %pypi_source matplotlib %{Version}
Source1: mplsetup.cfg
# Fedora-specific patches; see:
@ -57,8 +57,8 @@ Patch1001: 0001-matplotlibrc-path-search-fix.patch
Patch1002: 0002-Set-FreeType-version-to-%{ftver}-and-update-tolerances.patch
Patch1003: 0003-Increase-a-few-test-tolerances-on-some-arches.patch
# https://github.com/matplotlib/matplotlib/pull/23387
Patch0001: 0004-Remove-setuptools_scm_git_archive-dependency.patch
# https://github.com/matplotlib/matplotlib/pull/21190#issuecomment-1223271888
Patch0001: 0004-Use-old-stride_windows-implementation-on-32-bit-x86.patch
BuildRequires: gcc
BuildRequires: gcc-c++
@ -78,6 +78,10 @@ BuildRequires: ImageMagick
BuildRequires: inkscape
%endif
BuildRequires: font(dejavusans)
BuildRequires: font(notosanscjkjp)
BuildRequires: font(wenquanyizenhei)
BuildRequires: texlive-collection-basic
BuildRequires: texlive-collection-fontsrecommended
BuildRequires: texlive-collection-latex
@ -89,39 +93,35 @@ BuildRequires: texlive-tex-bin
BuildRequires: texlive-xetex-bin
# Search for documentclass and add the classes here.
BuildRequires: tex(article.cls)
BuildRequires: tex(minimal.cls)
# Search for inputenc and add any encodings used with it.
BuildRequires: tex(utf8.def)
BuildRequires: tex(utf8x.def)
# Found with: rg -Io 'usepackage(\[.+\])?\{.+\}' lib | rg -o '\{.+\}' | sort -u
# and then removing duplicates in one line, etc.
BuildRequires: tex(avant.sty)
BuildRequires: tex(bm.sty)
BuildRequires: tex(chancery.sty)
BuildRequires: tex(charter.sty)
BuildRequires: tex(chemformula.sty)
BuildRequires: tex(color.sty)
BuildRequires: tex(courier.sty)
BuildRequires: tex(euler.sty)
BuildRequires: tex(fancyhdr.sty)
BuildRequires: tex(fontenc.sty)
BuildRequires: tex(fontspec.sty)
BuildRequires: tex(geometry.sty)
BuildRequires: tex(graphicx.sty)
BuildRequires: tex(helvet.sty)
BuildRequires: tex(hyperref.sty)
BuildRequires: tex(import.sty)
BuildRequires: tex(inputenc.sty)
BuildRequires: tex(lmodern.sty)
BuildRequires: tex(mathpazo.sty)
BuildRequires: tex(mathptmx.sty)
BuildRequires: tex(pgf.sty)
BuildRequires: tex(preview.sty)
BuildRequires: tex(psfrag.sty)
BuildRequires: tex(sfmath.sty)
BuildRequires: tex(textcomp.sty)
BuildRequires: tex(txfonts.sty)
BuildRequires: tex(type1cm.sty)
BuildRequires: tex(type1ec.sty)
BuildRequires: tex(unicode-math.sty)
BuildRequires: tex(underscore.sty)
# See BakomaFonts._fontmap in lib/matplotlib/mathtext.py
BuildRequires: tex(cmb10.tfm)
BuildRequires: tex(cmex10.tfm)
@ -296,7 +296,7 @@ cp -p %{SOURCE1} mplsetup.cfg
%patch1003 -p1
# Backports
# Backports or reported upstream
%patch0001 -p1
@ -312,7 +312,7 @@ MPLCONFIGDIR=$PWD %pyproject_wheel
%if %{with html}
# Need to make built matplotlib libs available for the sphinx extensions:
MPLCONFIGDIR=$PWD \
PYTHONPATH=$(ls -d %{_pyproject_builddir}/pip-req-build-*/build/lib.%{python3_platform}-%{python3_version}) \
PYTHONPATH="%{pyprojec_site_lib}" \
make -C doc html
%endif
# Ensure all example files are non-executable so that the -doc

View File

@ -1,2 +1,2 @@
SHA512 (matplotlib-3.5.3.tar.gz) = 8d8bc28ef62a2373a0740ba5322f04ddbcc6485caf06883b54904f1ff7c979b9c4425516274d2b9e0cb63607d11bc3149044bee7ccac37de6ccd80480791cd4d
SHA512 (matplotlib-3.5.3-with-freetype-2.12.1.tar.gz) = 52793236ed8bafb8f9bd18608a69e1893e95cde2a2af416d7688ce6919df2af199752f7bf05ac41525e231a316fd3fd0192f2c5d0e399708161dec0939e1101e
SHA512 (matplotlib-3.6.2.tar.gz) = 51b84a4328a85f674cb44728955fca8bb5b8b702c788158b8bcfc13a44206a5a658ac12ed8f9a5f6ec53ef543395fab4f3871f91013ba1432f3e2b848c36976f
SHA512 (matplotlib-3.6.1-with-freetype-2.12.1.tar.gz) = 9210cfe8db2743519188d924dfd5f4ec4a0b5ae589b8a596f5a35b900234fa3a2fe81a047fc486ec69359259685438f4c19bb96a63ca0f544d2f48fbabb1326e