Update to latest version (#1993426)
This commit is contained in:
parent
9d2b54f896
commit
ea5db0b4a8
2
.gitignore
vendored
2
.gitignore
vendored
@ -65,3 +65,5 @@ matplotlib-1.0.0-without-gpc.tar.gz
|
||||
/matplotlib-3.4.1-with-freetype-2.10.4.tar.gz
|
||||
/matplotlib-3.4.2.tar.gz
|
||||
/matplotlib-3.4.1-with-freetype-2.11.0.tar.gz
|
||||
/matplotlib-3.4.3.tar.gz
|
||||
/matplotlib-3.4.3-with-freetype-2.11.0.tar.gz
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 6277ea0c008b02cd2abe017d041b43a35a407c6c Mon Sep 17 00:00:00 2001
|
||||
From fc48d068c9e28cdd82e93db2248ff2fa6facc986 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/7] matplotlibrc path search fix
|
||||
Subject: [PATCH 1/3] matplotlibrc path search fix
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
|
@ -1,17 +1,18 @@
|
||||
From 322fe366ece11ae948c7f6ba0191f7dbc5db444b Mon Sep 17 00:00:00 2001
|
||||
From 8e37877bc09957a50ee2f181b62447adb14d5162 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/7] Set FreeType version to 2.11.0 and update tolerances.
|
||||
Subject: [PATCH 2/3] Set FreeType version to 2.11.0 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 | 2 +-
|
||||
lib/matplotlib/tests/test_mathtext.py | 7 +++++--
|
||||
lib/matplotlib/tests/test_polar.py | 2 +-
|
||||
lib/matplotlib/tests/test_tightlayout.py | 10 +++++-----
|
||||
setupext.py | 9 ++++++++-
|
||||
6 files changed, 18 insertions(+), 11 deletions(-)
|
||||
7 files changed, 23 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
|
||||
index 9d795f65f5..f01024109b 100644
|
||||
@ -27,7 +28,7 @@ index 9d795f65f5..f01024109b 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 ec4773d465..d63c200b1b 100644
|
||||
index 7950e5b830..046dbbe1b8 100644
|
||||
--- a/lib/matplotlib/tests/test_axes.py
|
||||
+++ b/lib/matplotlib/tests/test_axes.py
|
||||
@@ -6500,7 +6500,7 @@ def test_normal_axes():
|
||||
@ -49,7 +50,7 @@ index ec4773d465..d63c200b1b 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 67474628e7..d3e9d105dc 100644
|
||||
index 117b221cc2..d009912dfa 100644
|
||||
--- a/lib/matplotlib/tests/test_constrainedlayout.py
|
||||
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
|
||||
@@ -429,7 +429,7 @@ def test_hidden_axes():
|
||||
@ -61,6 +62,37 @@ index 67474628e7..d3e9d105dc 100644
|
||||
|
||||
|
||||
def test_colorbar_align():
|
||||
diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py
|
||||
index b5fd906d2f..8e3801a231 100644
|
||||
--- a/lib/matplotlib/tests/test_mathtext.py
|
||||
+++ b/lib/matplotlib/tests/test_mathtext.py
|
||||
@@ -1,5 +1,6 @@
|
||||
import io
|
||||
import os
|
||||
+import platform
|
||||
import re
|
||||
|
||||
import numpy as np
|
||||
@@ -189,7 +190,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))
|
||||
@@ -213,7 +215,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))
|
||||
diff --git a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py
|
||||
index c614eff027..daf4e26fb8 100644
|
||||
--- a/lib/matplotlib/tests/test_polar.py
|
||||
|
@ -1,7 +1,7 @@
|
||||
From d807e4e108073ee0fbda02340b206bf3766d9c7c Mon Sep 17 00:00:00 2001
|
||||
From 543d61d521c02120b48688ae56e39128144debd8 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Fri, 4 Jun 2021 02:32:31 -0400
|
||||
Subject: [PATCH 3/7] Slightly increase tolerance on rcupdate test.
|
||||
Subject: [PATCH 3/3] Slightly increase tolerance on rcupdate test.
|
||||
|
||||
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, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/matplotlib/tests/test_backend_pgf.py b/lib/matplotlib/tests/test_backend_pgf.py
|
||||
index 75f50ecbf0..0b56f01687 100644
|
||||
index 040b2e7146..6ee36edc9e 100644
|
||||
--- a/lib/matplotlib/tests/test_backend_pgf.py
|
||||
+++ b/lib/matplotlib/tests/test_backend_pgf.py
|
||||
@@ -127,7 +127,7 @@ def test_rcupdate():
|
||||
|
@ -1,29 +0,0 @@
|
||||
From ea96e5684af98e28e704dc26f12b793c6032ada6 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Fri, 4 Jun 2021 03:20:38 -0400
|
||||
Subject: [PATCH 4/7] Use new style for test_text_urls_tex.
|
||||
|
||||
This test does not depend on the font style, just that the annotation
|
||||
appears over it. Switching to mpl20 style stops using Helvetica, and
|
||||
thus avoids the issue with texlive 2021 on Fedora Rawhide.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
lib/matplotlib/tests/test_backend_pdf.py | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/lib/matplotlib/tests/test_backend_pdf.py b/lib/matplotlib/tests/test_backend_pdf.py
|
||||
index 06bfe1cdb1..548149d19d 100644
|
||||
--- a/lib/matplotlib/tests/test_backend_pdf.py
|
||||
+++ b/lib/matplotlib/tests/test_backend_pdf.py
|
||||
@@ -238,6 +238,7 @@ def test_text_urls():
|
||||
assert annot.Rect[1] == decimal.Decimal(y) * 72
|
||||
|
||||
|
||||
+@pytest.mark.style('mpl20')
|
||||
@needs_usetex
|
||||
def test_text_urls_tex():
|
||||
pikepdf = pytest.importorskip('pikepdf')
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,70 +0,0 @@
|
||||
From 982f5255e5da9c5023ca9997aff78c86eb0e8000 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Thu, 24 Jun 2021 01:45:04 -0400
|
||||
Subject: [PATCH 5/7] Backport PR #20488: FIX: Include 0 when checking lognorm
|
||||
vmin
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
lib/matplotlib/image.py | 6 +++---
|
||||
lib/matplotlib/tests/test_image.py | 19 ++++++++++---------
|
||||
2 files changed, 13 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/lib/matplotlib/image.py b/lib/matplotlib/image.py
|
||||
index 98e2b5eb79..efa50758da 100644
|
||||
--- a/lib/matplotlib/image.py
|
||||
+++ b/lib/matplotlib/image.py
|
||||
@@ -534,9 +534,9 @@ class _ImageBase(martist.Artist, cm.ScalarMappable):
|
||||
# we have re-set the vmin/vmax to account for small errors
|
||||
# that may have moved input values in/out of range
|
||||
s_vmin, s_vmax = vrange
|
||||
- if isinstance(self.norm, mcolors.LogNorm):
|
||||
- if s_vmin < 0:
|
||||
- s_vmin = max(s_vmin, np.finfo(scaled_dtype).eps)
|
||||
+ if isinstance(self.norm, mcolors.LogNorm) and s_vmin <= 0:
|
||||
+ # Don't give 0 or negative values to LogNorm
|
||||
+ s_vmin = np.finfo(scaled_dtype).eps
|
||||
with cbook._setattr_cm(self.norm,
|
||||
vmin=s_vmin,
|
||||
vmax=s_vmax,
|
||||
diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py
|
||||
index 9657968de7..38182f5a8a 100644
|
||||
--- a/lib/matplotlib/tests/test_image.py
|
||||
+++ b/lib/matplotlib/tests/test_image.py
|
||||
@@ -1213,23 +1213,24 @@ def test_imshow_quantitynd():
|
||||
fig.canvas.draw()
|
||||
|
||||
|
||||
+@pytest.mark.parametrize('x', [-1, 1])
|
||||
@check_figures_equal(extensions=['png'])
|
||||
-def test_huge_range_log(fig_test, fig_ref):
|
||||
- data = np.full((5, 5), -1, dtype=np.float64)
|
||||
+def test_huge_range_log(fig_test, fig_ref, x):
|
||||
+ # parametrize over bad lognorm -1 values and large range 1 -> 1e20
|
||||
+ data = np.full((5, 5), x, dtype=np.float64)
|
||||
data[0:2, :] = 1E20
|
||||
|
||||
ax = fig_test.subplots()
|
||||
- im = ax.imshow(data, norm=colors.LogNorm(vmin=100, vmax=data.max()),
|
||||
- interpolation='nearest', cmap='viridis')
|
||||
+ ax.imshow(data, norm=colors.LogNorm(vmin=1, vmax=data.max()),
|
||||
+ interpolation='nearest', cmap='viridis')
|
||||
|
||||
- data = np.full((5, 5), -1, dtype=np.float64)
|
||||
+ data = np.full((5, 5), x, dtype=np.float64)
|
||||
data[0:2, :] = 1000
|
||||
|
||||
- cmap = copy(plt.get_cmap('viridis'))
|
||||
- cmap.set_under('w')
|
||||
ax = fig_ref.subplots()
|
||||
- im = ax.imshow(data, norm=colors.Normalize(vmin=100, vmax=data.max()),
|
||||
- interpolation='nearest', cmap=cmap)
|
||||
+ cmap = plt.get_cmap('viridis').with_extremes(under='w')
|
||||
+ ax.imshow(data, norm=colors.Normalize(vmin=1, vmax=data.max()),
|
||||
+ interpolation='nearest', cmap=cmap)
|
||||
|
||||
|
||||
@check_figures_equal()
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,44 +0,0 @@
|
||||
From 28753e5db82bba5898ee302d687d201ae2a96cd6 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Mon, 9 Aug 2021 21:38:15 -0400
|
||||
Subject: [PATCH 6/7] Increase mathfont test tolerance on some systems.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
lib/matplotlib/tests/test_mathtext.py | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py
|
||||
index b5fd906d2f..8e3801a231 100644
|
||||
--- a/lib/matplotlib/tests/test_mathtext.py
|
||||
+++ b/lib/matplotlib/tests/test_mathtext.py
|
||||
@@ -1,5 +1,6 @@
|
||||
import io
|
||||
import os
|
||||
+import platform
|
||||
import re
|
||||
|
||||
import numpy as np
|
||||
@@ -189,7 +190,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))
|
||||
@@ -213,7 +215,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.31.1
|
||||
|
@ -1,42 +0,0 @@
|
||||
From 227aacf576f6fce253673ce05365db11dfa6df7d Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Tue, 10 Aug 2021 00:45:07 -0400
|
||||
Subject: [PATCH 7/7] Make test_change_epoch more robust.
|
||||
|
||||
The epoch is set by explicitly calling `mdates.set_epoch`, or implicitly
|
||||
set to the default by `mdates.get_epoch` (which is also called when
|
||||
converting datetimes.)
|
||||
|
||||
However, when running tests in parallel, there is no guarantee that any
|
||||
other call to `[gs]et_epoch` might have been made to lock it in, so we
|
||||
need to do that explicitly.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
lib/matplotlib/tests/test_dates.py | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/matplotlib/tests/test_dates.py b/lib/matplotlib/tests/test_dates.py
|
||||
index 8c821c0da5..36449e44aa 100644
|
||||
--- a/lib/matplotlib/tests/test_dates.py
|
||||
+++ b/lib/matplotlib/tests/test_dates.py
|
||||
@@ -1004,12 +1004,15 @@ def test_datetime64_in_list():
|
||||
def test_change_epoch():
|
||||
date = np.datetime64('2000-01-01')
|
||||
|
||||
+ # use private method to clear the epoch and allow it to be set...
|
||||
+ mdates._reset_epoch_test_example()
|
||||
+ mdates.get_epoch() # Set default.
|
||||
+
|
||||
with pytest.raises(RuntimeError):
|
||||
# this should fail here because there is a sentinel on the epoch
|
||||
# if the epoch has been used then it cannot be set.
|
||||
mdates.set_epoch('0000-01-01')
|
||||
|
||||
- # use private method to clear the epoch and allow it to be set...
|
||||
mdates._reset_epoch_test_example()
|
||||
mdates.set_epoch('1970-01-01')
|
||||
dt = (date - np.datetime64('1970-01-01')).astype('datetime64[D]')
|
||||
--
|
||||
2.31.1
|
||||
|
@ -41,14 +41,14 @@
|
||||
%global _docdir_fmt %{name}
|
||||
|
||||
# Updated test images for new FreeType.
|
||||
%global mpl_images_version 3.4.1
|
||||
%global mpl_images_version 3.4.3
|
||||
|
||||
# The version of FreeType in this Fedora branch.
|
||||
%global ftver 2.11.0
|
||||
|
||||
Name: python-matplotlib
|
||||
Version: 3.4.2
|
||||
%global Version 3.4.2
|
||||
Version: 3.4.3
|
||||
%global Version 3.4.3
|
||||
Release: %autorelease
|
||||
Summary: Python 2D plotting library
|
||||
# qt4_editor backend is MIT
|
||||
@ -66,15 +66,8 @@ Source1000: https://github.com/QuLogic/mpl-images/archive/v%{mpl_images_vers
|
||||
Patch1001: 0001-matplotlibrc-path-search-fix.patch
|
||||
# Increase tolerances for new FreeType everywhere:
|
||||
Patch1002: 0002-Set-FreeType-version-to-%{ftver}-and-update-tolerances.patch
|
||||
# Workarounds for problems with texlive 2021 (#1965547)
|
||||
# Work around for problems with texlive 2021 (#1965547)
|
||||
Patch1003: 0003-Slightly-increase-tolerance-on-rcupdate-test.patch
|
||||
Patch1004: 0004-Use-new-style-for-test_text_urls_tex.patch
|
||||
# https://github.com/matplotlib/matplotlib/pull/20488
|
||||
Patch1005: 0005-Backport-PR-20488-FIX-Include-0-when-checking-lognor.patch
|
||||
# Tweak tolerances a bit.
|
||||
Patch1006: 0006-Increase-mathfont-test-tolerance-on-some-systems.patch
|
||||
# https://github.com/matplotlib/matplotlib/pull/20817
|
||||
Patch1007: 0007-Make-test_change_epoch-more-robust.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
@ -331,10 +324,6 @@ gzip -dc %SOURCE1000 | tar xf - --transform='s~^mpl-images-%{mpl_images_version}
|
||||
cp -p %{SOURCE1} setup.cfg
|
||||
|
||||
%patch1003 -p1
|
||||
%patch1004 -p1
|
||||
%patch1005 -p1
|
||||
%patch1006 -p1
|
||||
%patch1007 -p1
|
||||
|
||||
|
||||
%build
|
||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (matplotlib-3.4.2.tar.gz) = 9f285fd828c543c0fe424fec332bac65d56b9df8be400911546975af9185d703c19d18acab2fe042450b51c9f3bb32e714994603070cdb7470097382f1727d8d
|
||||
SHA512 (matplotlib-3.4.1-with-freetype-2.11.0.tar.gz) = 762ecdbf15a7d1560e5602c575be96844dc10601b9f134d2e81e11f23738c2a9c3063989373e8971f03a0a09673fc5f9dd36775b1029ebe915d7ef740bd37cec
|
||||
SHA512 (matplotlib-3.4.3.tar.gz) = e346c7d0f33b7d2fb5b48a4578ec99a40c2e5b959d109526ccbe7582a37f10abb91d53062711c37eb4ccaf462fd8684e1557405c50ccf43139bc371601a60e80
|
||||
SHA512 (matplotlib-3.4.3-with-freetype-2.11.0.tar.gz) = d78333a2ce39f70fa1dd53545b25c83d519a40e01b115be59869b41d2bf56b92030d31d6e7bb1ffa555bdf0ab3e6b0acdb2a569c182d8ebc963f48f74ffead94
|
||||
|
Loading…
x
Reference in New Issue
Block a user