| |
@@ -1,24 +1,23 @@
|
| |
- From 70e97e4ede29ccc16bad1d329d08b27d753a8f00 Mon Sep 17 00:00:00 2001
|
| |
+ From dba1a25bb3cbe2d3dba3199401ab576621f060c2 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 2/5] 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 | 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 8639a44283..9a3e684e77 100644
|
| |
--- a/lib/matplotlib/__init__.py
|
| |
+++ b/lib/matplotlib/__init__.py
|
| |
- @@ -1203,7 +1203,7 @@ default_test_modules = [
|
| |
+ @@ -1212,7 +1212,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 @@
|
| |
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 268eb957f4..415de0c594 100644
|
| |
--- a/lib/matplotlib/tests/test_axes.py
|
| |
+++ b/lib/matplotlib/tests/test_axes.py
|
| |
- @@ -6732,7 +6732,7 @@ def test_normal_axes():
|
| |
+ @@ -7152,7 +7152,7 @@ def test_normal_axes():
|
| |
]
|
| |
for nn, b in enumerate(bbaxis):
|
| |
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
|
| |
@@ -40,7 +39,7 @@
|
| |
|
| |
target = [
|
| |
[150.0, 119.999, 930.0, 11.111],
|
| |
- @@ -6750,7 +6750,7 @@ def test_normal_axes():
|
| |
+ @@ -7170,7 +7170,7 @@ def test_normal_axes():
|
| |
|
| |
target = [85.5138, 75.88888, 1021.11, 1017.11]
|
| |
targetbb = mtransforms.Bbox.from_bounds(*target)
|
| |
@@ -50,7 +49,7 @@
|
| |
# 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 35eb850fcd..31086ae5b7 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 @@
|
| |
|
| |
|
| |
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 @@
|
| |
|
| |
@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 @@
|
| |
|
| |
|
| |
diff --git a/setupext.py b/setupext.py
|
| |
- index ae8c21599f..abd01d8813 100644
|
| |
+ index 69835c12f7..79ee6174e1 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 @@
|
| |
+ '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'))
|
| |