|
|
b0c798d |
From 939fcad1ab9dc4986bd86842f616dc50cb6398e2 Mon Sep 17 00:00:00 2001
|
|
|
9046bbb |
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
|
9046bbb |
Date: Sat, 4 May 2019 04:36:45 -0400
|
|
|
9046bbb |
Subject: [PATCH 2/4] Set FreeType version to 2.10.0 and update tolerances.
|
|
|
9046bbb |
|
|
|
9046bbb |
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
|
9046bbb |
---
|
|
|
1f37c6a |
lib/matplotlib/__init__.py | 2 +-
|
|
|
1f37c6a |
lib/matplotlib/tests/test_axes.py | 6 +++---
|
|
|
1f37c6a |
lib/matplotlib/tests/test_constrainedlayout.py | 2 +-
|
|
|
1f37c6a |
lib/matplotlib/tests/test_tightlayout.py | 10 +++++-----
|
|
|
1f37c6a |
setupext.py | 5 ++++-
|
|
|
1f37c6a |
5 files changed, 14 insertions(+), 11 deletions(-)
|
|
|
9046bbb |
|
|
|
9046bbb |
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
|
|
|
1f37c6a |
index 7a4115491..1bf9d3e03 100644
|
|
|
9046bbb |
--- a/lib/matplotlib/__init__.py
|
|
|
9046bbb |
+++ b/lib/matplotlib/__init__.py
|
|
|
1f37c6a |
@@ -1361,7 +1361,7 @@ def _init_tests():
|
|
|
9046bbb |
|
|
|
9046bbb |
# The version of FreeType to install locally for running the
|
|
|
9046bbb |
# tests. This must match the value in `setupext.py`
|
|
|
9046bbb |
- LOCAL_FREETYPE_VERSION = '2.6.1'
|
|
|
9046bbb |
+ LOCAL_FREETYPE_VERSION = '2.10.0'
|
|
|
9046bbb |
|
|
|
9046bbb |
from matplotlib import ft2font
|
|
|
9046bbb |
if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or
|
|
|
9046bbb |
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
|
|
|
b0c798d |
index 356b9ad42..84a1956ee 100644
|
|
|
9046bbb |
--- a/lib/matplotlib/tests/test_axes.py
|
|
|
9046bbb |
+++ b/lib/matplotlib/tests/test_axes.py
|
|
|
b0c798d |
@@ -6207,7 +6207,7 @@ def test_normal_axes():
|
|
|
9046bbb |
]
|
|
|
9046bbb |
for nn, b in enumerate(bbaxis):
|
|
|
9046bbb |
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
|
|
|
9046bbb |
- assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
|
|
|
9046bbb |
+ assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=0)
|
|
|
9046bbb |
|
|
|
9046bbb |
target = [
|
|
|
9046bbb |
[150.0, 119.999, 930.0, 11.111],
|
|
|
b0c798d |
@@ -6225,7 +6225,7 @@ def test_normal_axes():
|
|
|
9046bbb |
|
|
|
9046bbb |
target = [85.5138, 75.88888, 1021.11, 1017.11]
|
|
|
9046bbb |
targetbb = mtransforms.Bbox.from_bounds(*target)
|
|
|
9046bbb |
- assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
|
|
|
9046bbb |
+ assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=0)
|
|
|
9046bbb |
|
|
|
9046bbb |
# test that get_position roundtrips to get_window_extent
|
|
|
9046bbb |
axbb = ax.get_position().transformed(fig.transFigure).bounds
|
|
|
b0c798d |
@@ -6350,7 +6350,7 @@ def test_get_tightbbox_polar():
|
|
|
9046bbb |
fig.canvas.draw()
|
|
|
9046bbb |
bb = ax.get_tightbbox(fig.canvas.get_renderer())
|
|
|
9046bbb |
assert_allclose(bb.extents,
|
|
|
9046bbb |
- [107.7778, 29.2778, 539.7847, 450.7222], rtol=1e-03)
|
|
|
9046bbb |
+ [107.7778, 29.2778, 539.7847, 450.7222], rtol=1)
|
|
|
9046bbb |
|
|
|
9046bbb |
|
|
|
9046bbb |
@check_figures_equal(extensions=["png"])
|
|
|
1f37c6a |
diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py
|
|
|
1f37c6a |
index 8769fcec3..e9ae292f6 100644
|
|
|
1f37c6a |
--- a/lib/matplotlib/tests/test_constrainedlayout.py
|
|
|
1f37c6a |
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
|
|
|
1f37c6a |
@@ -416,4 +416,4 @@ def test_hidden_axes():
|
|
|
1f37c6a |
extents1 = np.copy(axs[0, 0].get_position().extents)
|
|
|
1f37c6a |
|
|
|
1f37c6a |
np.testing.assert_allclose(extents1,
|
|
|
1f37c6a |
- [0.045552, 0.548288, 0.47319, 0.982638], rtol=1e-5)
|
|
|
1f37c6a |
+ [0.045552, 0.548288, 0.47319, 0.982638], rtol=1e-2)
|
|
|
9046bbb |
diff --git a/lib/matplotlib/tests/test_tightlayout.py b/lib/matplotlib/tests/test_tightlayout.py
|
|
|
9046bbb |
index 0b9469cb8..7963b82ff 100644
|
|
|
9046bbb |
--- a/lib/matplotlib/tests/test_tightlayout.py
|
|
|
9046bbb |
+++ b/lib/matplotlib/tests/test_tightlayout.py
|
|
|
9046bbb |
@@ -186,12 +186,12 @@ def test_outward_ticks():
|
|
|
9046bbb |
plt.tight_layout()
|
|
|
9046bbb |
# These values were obtained after visual checking that they correspond
|
|
|
9046bbb |
# to a tight layouting that did take the ticks into account.
|
|
|
9046bbb |
- ans = [[[0.091, 0.607], [0.433, 0.933]],
|
|
|
9046bbb |
- [[0.579, 0.607], [0.922, 0.933]],
|
|
|
9046bbb |
- [[0.091, 0.140], [0.433, 0.466]],
|
|
|
9046bbb |
- [[0.579, 0.140], [0.922, 0.466]]]
|
|
|
9046bbb |
+ ans = [[[0.09, 0.61], [0.43, 0.93]],
|
|
|
9046bbb |
+ [[0.58, 0.61], [0.92, 0.93]],
|
|
|
9046bbb |
+ [[0.09, 0.14], [0.43, 0.47]],
|
|
|
9046bbb |
+ [[0.58, 0.14], [0.92, 0.47]]]
|
|
|
9046bbb |
for nn, ax in enumerate(fig.axes):
|
|
|
9046bbb |
- assert_array_equal(np.round(ax.get_position().get_points(), 3),
|
|
|
9046bbb |
+ assert_array_equal(np.round(ax.get_position().get_points(), 2),
|
|
|
9046bbb |
ans[nn])
|
|
|
9046bbb |
|
|
|
9046bbb |
|
|
|
9046bbb |
diff --git a/setupext.py b/setupext.py
|
|
|
9046bbb |
index 3e8b382cc..2a3fc3ee7 100644
|
|
|
9046bbb |
--- a/setupext.py
|
|
|
9046bbb |
+++ b/setupext.py
|
|
|
9046bbb |
@@ -135,12 +135,15 @@ _freetype_hashes = {
|
|
|
9046bbb |
'2.7.1': '162ef25aa64480b1189cdb261228e6c5c44f212aac4b4621e28cf2157efb59f5',
|
|
|
9046bbb |
'2.8': '33a28fabac471891d0523033e99c0005b95e5618dc8ffa7fa47f9dadcacb1c9b',
|
|
|
9046bbb |
'2.8.1': '876711d064a6a1bd74beb18dd37f219af26100f72daaebd2d86cb493d7cd7ec6',
|
|
|
9046bbb |
+ '2.9': 'bf380e4d7c4f3b5b1c1a7b2bf3abb967bda5e9ab480d0df656e0e08c5019c5e6',
|
|
|
9046bbb |
+ '2.9.1': 'ec391504e55498adceb30baceebd147a6e963f636eb617424bcfc47a169898ce',
|
|
|
9046bbb |
+ '2.10.0': '955e17244e9b38adb0c98df66abb50467312e6bb70eac07e49ce6bd1a20e809a',
|
|
|
9046bbb |
}
|
|
|
9046bbb |
# This is the version of FreeType to use when building a local
|
|
|
9046bbb |
# version. It must match the value in
|
|
|
9046bbb |
# lib/matplotlib.__init__.py and also needs to be changed below in the
|
|
|
9046bbb |
# embedded windows build script (grep for "REMINDER" in this file)
|
|
|
9046bbb |
-LOCAL_FREETYPE_VERSION = '2.6.1'
|
|
|
9046bbb |
+LOCAL_FREETYPE_VERSION = '2.10.0'
|
|
|
9046bbb |
LOCAL_FREETYPE_HASH = _freetype_hashes.get(LOCAL_FREETYPE_VERSION, 'unknown')
|
|
|
9046bbb |
|
|
|
9046bbb |
|
|
|
9046bbb |
--
|
|
|
b0c798d |
2.21.1
|
|
|
9046bbb |
|