Update to latest version.

This commit is contained in:
Elliott Sales de Andrade 2017-12-10 05:15:28 -05:00
parent 09769170a4
commit 2d712efe1e
12 changed files with 53 additions and 328 deletions

1
.gitignore vendored
View File

@ -17,3 +17,4 @@ matplotlib-1.0.0-without-gpc.tar.gz
/matplotlib-2.0.2.tar.gz
/matplotlib-2.1.0rc1.tar.gz
/matplotlib-2.1.0.tar.gz
/matplotlib-2.1.1.tar.gz

View File

@ -1,27 +0,0 @@
From 0420e360523e3452467bfc7d9bb19c3593cde2e7 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Thu, 5 Oct 2017 21:26:53 -0400
Subject: [PATCH 1/9] TST: Skip sphinxext if unavailable instead of error.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
lib/matplotlib/sphinxext/tests/test_tinypages.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/matplotlib/sphinxext/tests/test_tinypages.py b/lib/matplotlib/sphinxext/tests/test_tinypages.py
index 5141a4cdd..6ee3e9e07 100644
--- a/lib/matplotlib/sphinxext/tests/test_tinypages.py
+++ b/lib/matplotlib/sphinxext/tests/test_tinypages.py
@@ -22,8 +22,7 @@ def setup_module():
ret = call([sys.executable, '-msphinx', '--help'],
stdout=PIPE, stderr=PIPE)
if ret != 0:
- raise RuntimeError(
- "'{} -msphinx' does not return 0".format(sys.executable))
+ pytest.skip("'{} -msphinx' does not return 0".format(sys.executable))
@cbook.deprecated("2.1", alternative="filecmp.cmp")
--
2.13.5

View File

@ -1,7 +1,7 @@
From 5b1c238764a6f594991459f2c269e41157edba2f Mon Sep 17 00:00:00 2001
From 8dba6d00d8ead090f6161854f9e64d28ea18e663 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sun, 15 Oct 2017 17:16:11 -0400
Subject: [PATCH 6/9] Use fuzzy comparison for stroke join determination.
Subject: [PATCH 1/4] Use fuzzy comparison for stroke join determination.
This sometimes produces something just slightly different from 0
compared to x86(_64).
@ -26,5 +26,5 @@ index 4806dcd4b..4871d96ce 100644
// Inner join
//---------------
--
2.13.5
2.13.6

View File

@ -1,142 +0,0 @@
From 279f95dae9dcd74d51c5913254889712697d1d8a Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Fri, 6 Oct 2017 20:06:09 -0400
Subject: [PATCH 2/9] TST: Capture all internal warnings.
These are either deprecations, or checks for old, but probably
incorrect, behaviour.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
lib/matplotlib/tests/test_axes.py | 10 ++++++++--
lib/matplotlib/tests/test_cbook.py | 22 ++++++++++++----------
lib/matplotlib/tests/test_colors.py | 10 +++++++++-
lib/matplotlib/tests/test_dates.py | 5 ++++-
lib/matplotlib/tests/test_image.py | 4 ++--
5 files changed, 35 insertions(+), 16 deletions(-)
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
index 0c22740a4..273b6f4ec 100644
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
@@ -1677,13 +1677,19 @@ def test_as_mpl_axes_api():
ax_via_gca = plt.gca(projection=prj)
assert ax_via_gca is ax
# try getting the axes given a different polar projection
- ax_via_gca = plt.gca(projection=prj2)
+ with pytest.warns(UserWarning) as rec:
+ ax_via_gca = plt.gca(projection=prj2)
+ assert len(rec) == 1
+ assert 'Requested projection is different' in str(rec[0].message)
assert ax_via_gca is not ax
assert ax.get_theta_offset() == 0, ax.get_theta_offset()
assert ax_via_gca.get_theta_offset() == np.pi, \
ax_via_gca.get_theta_offset()
# try getting the axes given an == (not is) polar projection
- ax_via_gca = plt.gca(projection=prj3)
+ with pytest.warns(UserWarning):
+ ax_via_gca = plt.gca(projection=prj3)
+ assert len(rec) == 1
+ assert 'Requested projection is different' in str(rec[0].message)
assert ax_via_gca is ax
plt.close()
diff --git a/lib/matplotlib/tests/test_cbook.py b/lib/matplotlib/tests/test_cbook.py
index f254b173c..4ff2cc52a 100644
--- a/lib/matplotlib/tests/test_cbook.py
+++ b/lib/matplotlib/tests/test_cbook.py
@@ -29,16 +29,18 @@ def test_is_hashable():
def test_restrict_dict():
d = {'foo': 'bar', 1: 2}
- d1 = cbook.restrict_dict(d, ['foo', 1])
- assert d1 == d
- d2 = cbook.restrict_dict(d, ['bar', 2])
- assert d2 == {}
- d3 = cbook.restrict_dict(d, {'foo': 1})
- assert d3 == {'foo': 'bar'}
- d4 = cbook.restrict_dict(d, {})
- assert d4 == {}
- d5 = cbook.restrict_dict(d, {'foo', 2})
- assert d5 == {'foo': 'bar'}
+ with pytest.warns(cbook.deprecation.MatplotlibDeprecationWarning) as rec:
+ d1 = cbook.restrict_dict(d, ['foo', 1])
+ assert d1 == d
+ d2 = cbook.restrict_dict(d, ['bar', 2])
+ assert d2 == {}
+ d3 = cbook.restrict_dict(d, {'foo': 1})
+ assert d3 == {'foo': 'bar'}
+ d4 = cbook.restrict_dict(d, {})
+ assert d4 == {}
+ d5 = cbook.restrict_dict(d, {'foo', 2})
+ assert d5 == {'foo': 'bar'}
+ assert len(rec) == 5
# check that d was not modified
assert d == {'foo': 'bar', 1: 2}
diff --git a/lib/matplotlib/tests/test_colors.py b/lib/matplotlib/tests/test_colors.py
index 721813e62..82c73fe71 100644
--- a/lib/matplotlib/tests/test_colors.py
+++ b/lib/matplotlib/tests/test_colors.py
@@ -690,7 +690,7 @@ def test_tableau_order():
assert list(mcolors.TABLEAU_COLORS.values()) == dflt_cycle
-def test_ndarray_subclass_norm():
+def test_ndarray_subclass_norm(recwarn):
# Emulate an ndarray subclass that handles units
# which objects when adding or subtracting with other
# arrays. See #6622 and #8696
@@ -707,3 +707,11 @@ def test_ndarray_subclass_norm():
mcolors.SymLogNorm(3, vmax=5, linscale=1),
mcolors.PowerNorm(1)]:
assert_array_equal(norm(data.view(MyArray)), norm(data))
+ if isinstance(norm, mcolors.PowerNorm):
+ assert len(recwarn) == 1
+ warn = recwarn.pop(UserWarning)
+ assert ('Power-law scaling on negative values is ill-defined'
+ in str(warn.message))
+ else:
+ assert len(recwarn) == 0
+ recwarn.clear()
diff --git a/lib/matplotlib/tests/test_dates.py b/lib/matplotlib/tests/test_dates.py
index 9f69d2ea7..437482f5f 100644
--- a/lib/matplotlib/tests/test_dates.py
+++ b/lib/matplotlib/tests/test_dates.py
@@ -96,7 +96,10 @@ def test_too_many_date_ticks():
tf = datetime.datetime(2000, 1, 20)
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
- ax.set_xlim((t0, tf), auto=True)
+ with pytest.warns(UserWarning) as rec:
+ ax.set_xlim((t0, tf), auto=True)
+ assert len(rec) == 1
+ assert 'Attempting to set identical left==right' in str(rec[0].message)
ax.plot([], [])
ax.xaxis.set_major_locator(mdates.DayLocator())
with pytest.raises(RuntimeError):
diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py
index 68a22894e..6240dd219 100644
--- a/lib/matplotlib/tests/test_image.py
+++ b/lib/matplotlib/tests/test_image.py
@@ -603,7 +603,8 @@ def test_load_from_url():
@image_comparison(baseline_images=['log_scale_image'],
remove_text=True)
-def test_log_scale_image():
+# The recwarn fixture captures a warning in image_comparison.
+def test_log_scale_image(recwarn):
Z = np.zeros((10, 10))
Z[::2] = 1
@@ -615,7 +616,6 @@ def test_log_scale_image():
ax.set_yscale('log')
-
@image_comparison(baseline_images=['rotate_image'],
remove_text=True)
def test_rotate_image():
--
2.13.5

View File

@ -1,7 +1,7 @@
From 400b97c30de5aa45e48a26c552dc310a3c1cf758 Mon Sep 17 00:00:00 2001
From 22121f236ebdc8f8539c2c0901073dce80f4edd8 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 7/9] matplotlibrc path search fix
Subject: [PATCH 2/4] matplotlibrc path search fix
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/__init__.py b/lib/matplotlib/__init__.py
index 00488a134..b989bc380 100644
index 3ba486af1..b8caf27dc 100644
--- a/lib/matplotlib/__init__.py
+++ b/lib/matplotlib/__init__.py
@@ -635,9 +635,12 @@ def _get_data_path():
@ -35,5 +35,5 @@ index 00488a134..b989bc380 100644
for fname in gen_candidates():
if os.path.isfile(fname):
--
2.13.5
2.13.6

View File

@ -1,28 +0,0 @@
From ee4253242cbaf972443ee49c59f056d8957f4f4f Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Fri, 6 Oct 2017 20:53:16 -0400
Subject: [PATCH 3/9] TST: Don't require LaTeX or Inkscape for nose tests.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
lib/matplotlib/tests/test_compare_images.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/matplotlib/tests/test_compare_images.py b/lib/matplotlib/tests/test_compare_images.py
index 488fae823..f5bb9dda8 100644
--- a/lib/matplotlib/tests/test_compare_images.py
+++ b/lib/matplotlib/tests/test_compare_images.py
@@ -203,6 +203,10 @@ def test_nose_image_comparison(func, kwargs, errors, failures, dots,
assert failures[self.failure_count][1] in str(err[1])
self.failure_count += 1
+ # Make sure that multiple extensions work, but don't require LaTeX or
+ # Inkscape to do so.
+ kwargs.setdefault('extensions', ['png', 'png', 'png'])
+
func = image_comparison(**kwargs)(func)
loader = nose.loader.TestLoader()
suite = loader.loadTestsFromGenerator(
--
2.13.5

View File

@ -1,7 +1,7 @@
From ce6e4fd43193698df2168fa946be479e5f8b96ff Mon Sep 17 00:00:00 2001
From cfdc835923407810bd087f60332cdc8cdcb23f05 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sun, 15 Oct 2017 17:35:47 -0400
Subject: [PATCH 8/9] TST: Increase tolerances for FreeType 2.7.1.
Subject: [PATCH 3/4] TST: Increase tolerances for FreeType 2.7.1.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
@ -28,7 +28,7 @@ index c5e069b31..ebd68cfab 100644
savefig_kwarg=None,
# Default of mpl_test_settings fixture and cleanup too.
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
index 273b6f4ec..4cf9cfa29 100644
index 33be78004..c73e55802 100644
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
@@ -672,7 +672,7 @@ def test_polar_rlabel_position():
@ -40,7 +40,7 @@ index 273b6f4ec..4cf9cfa29 100644
def test_polar_theta_limits():
r = np.arange(0, 3.0, 0.01)
theta = 2*np.pi*r
@@ -4641,7 +4641,7 @@ def test_rc_spines():
@@ -4679,7 +4679,7 @@ def test_rc_spines():
@image_comparison(baseline_images=['rc_grid'], extensions=['png'],
@ -124,5 +124,5 @@ index c157433c7..c13f3be2f 100644
def test_xyz(self):
fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
--
2.13.5
2.13.6

View File

@ -1,34 +0,0 @@
From a95786dc8f982c8f7d212badad883754fe448c98 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sat, 7 Oct 2017 00:28:59 -0400
Subject: [PATCH 4/9] Fix AxesImage.get_cursor_data on arm.
For some reason, NaN gets converted to 0 as an integer instead of
INT_MIN like on x86.
Fixes #6538.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
lib/matplotlib/image.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/matplotlib/image.py b/lib/matplotlib/image.py
index ea2331cb4..52decc3ec 100644
--- a/lib/matplotlib/image.py
+++ b/lib/matplotlib/image.py
@@ -822,7 +822,10 @@ class AxesImage(_ImageBase):
array_extent = Bbox([[0, 0], arr.shape[:2]])
trans = BboxTransform(boxin=data_extent, boxout=array_extent)
y, x = event.ydata, event.xdata
- i, j = trans.transform_point([y, x]).astype(int)
+ point = trans.transform_point([y, x])
+ if any(np.isnan(point)):
+ return None
+ i, j = point.astype(int)
# Clip the coordinates at array bounds
if not (0 <= i < arr.shape[0]) or not (0 <= j < arr.shape[1]):
return None
--
2.13.5

View File

@ -1,7 +1,7 @@
From 7adef54248198dfff9cd74178b56a383d8ba40f8 Mon Sep 17 00:00:00 2001
From 4fbf2473e97a259494117a408a5efa377fa5a947 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sun, 15 Oct 2017 21:11:26 -0400
Subject: [PATCH 9/9] TST: Increase some tolerances for 32-bit systems.
Subject: [PATCH 4/4] TST: Increase some tolerances for 32-bit systems.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
@ -18,7 +18,7 @@ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
10 files changed, 38 insertions(+), 36 deletions(-)
diff --git a/lib/matplotlib/tests/test_artist.py b/lib/matplotlib/tests/test_artist.py
index 71b87e5af..151e58387 100644
index 786d50903..105714ef4 100644
--- a/lib/matplotlib/tests/test_artist.py
+++ b/lib/matplotlib/tests/test_artist.py
@@ -95,7 +95,8 @@ def test_collection_transform_of_none():
@ -32,7 +32,7 @@ index 71b87e5af..151e58387 100644
exterior = mpath.Path.unit_rectangle().deepcopy()
exterior.vertices *= 4
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
index 4cf9cfa29..1cf0a00f2 100644
index c73e55802..90db6dfda 100644
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
@@ -483,7 +483,7 @@ def test_single_point():
@ -44,7 +44,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_single_date():
time1 = [721964.0]
data1 = [-65.54]
@@ -969,7 +969,7 @@ def test_fill_between_interpolate():
@@ -972,7 +972,7 @@ def test_fill_between_interpolate():
@image_comparison(baseline_images=['fill_between_interpolate_decreasing'],
@ -53,7 +53,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_fill_between_interpolate_decreasing():
p = np.array([724.3, 700, 655])
t = np.array([9.4, 7, 2.2])
@@ -1083,7 +1083,7 @@ def test_pcolormesh():
@@ -1086,7 +1086,7 @@ def test_pcolormesh():
@image_comparison(baseline_images=['pcolormesh_datetime_axis'],
@ -62,7 +62,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_pcolormesh_datetime_axis():
fig = plt.figure()
fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)
@@ -1109,7 +1109,7 @@ def test_pcolormesh_datetime_axis():
@@ -1112,7 +1112,7 @@ def test_pcolormesh_datetime_axis():
@image_comparison(baseline_images=['pcolor_datetime_axis'],
@ -71,7 +71,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_pcolor_datetime_axis():
fig = plt.figure()
fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)
@@ -1159,7 +1159,7 @@ def test_canonical():
@@ -1168,7 +1168,7 @@ def test_canonical():
@image_comparison(baseline_images=['arc_angles'], remove_text=True,
@ -80,7 +80,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_arc_angles():
from matplotlib import patches
# Ellipse parameters
@@ -2396,7 +2396,7 @@ def test_boxplot_mod_artist_after_plotting():
@@ -2434,7 +2434,7 @@ def test_boxplot_mod_artist_after_plotting():
@image_comparison(baseline_images=['violinplot_vert_baseline',
'violinplot_vert_baseline'],
@ -89,7 +89,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_vert_violinplot_baseline():
# First 9 digits of frac(sqrt(2))
np.random.seed(414213562)
@@ -2414,7 +2414,7 @@ def test_vert_violinplot_baseline():
@@ -2452,7 +2452,7 @@ def test_vert_violinplot_baseline():
@image_comparison(baseline_images=['violinplot_vert_showmeans'],
@ -98,7 +98,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_vert_violinplot_showmeans():
ax = plt.axes()
# First 9 digits of frac(sqrt(3))
@@ -2425,7 +2425,7 @@ def test_vert_violinplot_showmeans():
@@ -2463,7 +2463,7 @@ def test_vert_violinplot_showmeans():
@image_comparison(baseline_images=['violinplot_vert_showextrema'],
@ -107,7 +107,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_vert_violinplot_showextrema():
ax = plt.axes()
# First 9 digits of frac(sqrt(5))
@@ -2436,7 +2436,7 @@ def test_vert_violinplot_showextrema():
@@ -2474,7 +2474,7 @@ def test_vert_violinplot_showextrema():
@image_comparison(baseline_images=['violinplot_vert_showmedians'],
@ -116,7 +116,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_vert_violinplot_showmedians():
ax = plt.axes()
# First 9 digits of frac(sqrt(7))
@@ -2447,7 +2447,7 @@ def test_vert_violinplot_showmedians():
@@ -2485,7 +2485,7 @@ def test_vert_violinplot_showmedians():
@image_comparison(baseline_images=['violinplot_vert_showall'],
@ -125,7 +125,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_vert_violinplot_showall():
ax = plt.axes()
# First 9 digits of frac(sqrt(11))
@@ -2458,7 +2458,7 @@ def test_vert_violinplot_showall():
@@ -2496,7 +2496,7 @@ def test_vert_violinplot_showall():
@image_comparison(baseline_images=['violinplot_vert_custompoints_10'],
@ -134,7 +134,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_vert_violinplot_custompoints_10():
ax = plt.axes()
# First 9 digits of frac(sqrt(13))
@@ -2469,7 +2469,7 @@ def test_vert_violinplot_custompoints_10():
@@ -2507,7 +2507,7 @@ def test_vert_violinplot_custompoints_10():
@image_comparison(baseline_images=['violinplot_vert_custompoints_200'],
@ -143,7 +143,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_vert_violinplot_custompoints_200():
ax = plt.axes()
# First 9 digits of frac(sqrt(17))
@@ -2480,7 +2480,7 @@ def test_vert_violinplot_custompoints_200():
@@ -2518,7 +2518,7 @@ def test_vert_violinplot_custompoints_200():
@image_comparison(baseline_images=['violinplot_horiz_baseline'],
@ -152,7 +152,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_horiz_violinplot_baseline():
ax = plt.axes()
# First 9 digits of frac(sqrt(19))
@@ -2491,7 +2491,7 @@ def test_horiz_violinplot_baseline():
@@ -2529,7 +2529,7 @@ def test_horiz_violinplot_baseline():
@image_comparison(baseline_images=['violinplot_horiz_showmedians'],
@ -161,7 +161,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_horiz_violinplot_showmedians():
ax = plt.axes()
# First 9 digits of frac(sqrt(23))
@@ -2502,7 +2502,7 @@ def test_horiz_violinplot_showmedians():
@@ -2540,7 +2540,7 @@ def test_horiz_violinplot_showmedians():
@image_comparison(baseline_images=['violinplot_horiz_showmeans'],
@ -170,7 +170,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_horiz_violinplot_showmeans():
ax = plt.axes()
# First 9 digits of frac(sqrt(29))
@@ -2513,7 +2513,7 @@ def test_horiz_violinplot_showmeans():
@@ -2551,7 +2551,7 @@ def test_horiz_violinplot_showmeans():
@image_comparison(baseline_images=['violinplot_horiz_showextrema'],
@ -179,7 +179,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_horiz_violinplot_showextrema():
ax = plt.axes()
# First 9 digits of frac(sqrt(31))
@@ -2524,7 +2524,7 @@ def test_horiz_violinplot_showextrema():
@@ -2562,7 +2562,7 @@ def test_horiz_violinplot_showextrema():
@image_comparison(baseline_images=['violinplot_horiz_showall'],
@ -188,7 +188,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_horiz_violinplot_showall():
ax = plt.axes()
# First 9 digits of frac(sqrt(37))
@@ -2535,7 +2535,7 @@ def test_horiz_violinplot_showall():
@@ -2573,7 +2573,7 @@ def test_horiz_violinplot_showall():
@image_comparison(baseline_images=['violinplot_horiz_custompoints_10'],
@ -197,7 +197,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_horiz_violinplot_custompoints_10():
ax = plt.axes()
# First 9 digits of frac(sqrt(41))
@@ -2546,7 +2546,7 @@ def test_horiz_violinplot_custompoints_10():
@@ -2584,7 +2584,7 @@ def test_horiz_violinplot_custompoints_10():
@image_comparison(baseline_images=['violinplot_horiz_custompoints_200'],
@ -206,7 +206,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_horiz_violinplot_custompoints_200():
ax = plt.axes()
# First 9 digits of frac(sqrt(43))
@@ -3872,7 +3872,7 @@ def test_psd_noise():
@@ -3910,7 +3910,7 @@ def test_psd_noise():
@image_comparison(baseline_images=['csd_freqs'], remove_text=True,
@ -215,7 +215,7 @@ index 4cf9cfa29..1cf0a00f2 100644
def test_csd_freqs():
'''test axes.csd with sinusoidal stimuli'''
n = 10000
@@ -5103,7 +5103,7 @@ def test_date_timezone_y():
@@ -5136,7 +5136,7 @@ def test_date_timezone_y():
@image_comparison(baseline_images=['date_timezone_x_and_y'],
@ -288,10 +288,10 @@ index b75ba7e9f..cfbb16444 100644
fig = plt.figure(figsize=(8, 6))
ax1 = fig.add_axes([0.05, 0.85, 0.9, 0.1])
diff --git a/lib/matplotlib/tests/test_contour.py b/lib/matplotlib/tests/test_contour.py
index 842bb908d..b50d71075 100644
index 16ac9e865..29c1b26f2 100644
--- a/lib/matplotlib/tests/test_contour.py
+++ b/lib/matplotlib/tests/test_contour.py
@@ -209,7 +209,7 @@ def test_given_colors_levels_and_extends():
@@ -228,7 +228,7 @@ def test_given_colors_levels_and_extends():
@image_comparison(baseline_images=['contour_datetime_axis'],
@ -300,7 +300,7 @@ index 842bb908d..b50d71075 100644
def test_contour_datetime_axis():
fig = plt.figure()
fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)
@@ -235,7 +235,7 @@ def test_contour_datetime_axis():
@@ -254,7 +254,7 @@ def test_contour_datetime_axis():
@image_comparison(baseline_images=['contour_test_label_transforms'],
@ -309,7 +309,7 @@ index 842bb908d..b50d71075 100644
def test_labels():
# Adapted from pylab_examples example code: contour_demo.py
# see issues #2475, #2843, and #2818 for explanation
@@ -264,7 +264,7 @@ def test_labels():
@@ -283,7 +283,7 @@ def test_labels():
@image_comparison(baseline_images=['contour_corner_mask_False',
'contour_corner_mask_True'],
@ -319,10 +319,10 @@ index 842bb908d..b50d71075 100644
n = 60
mask_level = 0.95
diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py
index 6240dd219..a4b51c52d 100644
index 0e423ab5f..8a46116fd 100644
--- a/lib/matplotlib/tests/test_image.py
+++ b/lib/matplotlib/tests/test_image.py
@@ -748,7 +748,7 @@ def test_imshow_endianess():
@@ -754,7 +754,7 @@ def test_imshow_endianess():
@image_comparison(baseline_images=['imshow_masked_interpolation'],
@ -384,5 +384,5 @@ index c13f3be2f..81a28aadb 100644
n_angles = 36
n_radii = 8
--
2.13.5
2.13.6

View File

@ -1,37 +0,0 @@
From aaab55ffee458dc867f3f51e2a9908c6885b7dec Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sat, 7 Oct 2017 05:40:35 -0400
Subject: [PATCH 5/9] TST: Use fuzzy comparison in test_psd_csd_equal.
Fixes #7158.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
lib/matplotlib/tests/test_mlab.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/matplotlib/tests/test_mlab.py b/lib/matplotlib/tests/test_mlab.py
index 15047bdeb..ef36eaf0b 100644
--- a/lib/matplotlib/tests/test_mlab.py
+++ b/lib/matplotlib/tests/test_mlab.py
@@ -7,7 +7,7 @@ import tempfile
import warnings
from numpy.testing import (assert_allclose, assert_almost_equal,
- assert_array_equal)
+ assert_array_equal, assert_array_almost_equal_nulp)
import numpy.ma.testutils as matest
import numpy as np
import datetime as datetime
@@ -1985,7 +1985,7 @@ class TestSpectral(object):
noverlap=self.nover_density,
pad_to=self.pad_to_density,
sides=self.sides)
- assert_array_equal(Pxx, Pxy)
+ assert_array_almost_equal_nulp(Pxx, Pxy)
assert_array_equal(freqsxx, freqsxy)
def test_specgram_auto_default_equal(self):
--
2.13.5

View File

@ -54,7 +54,7 @@
#global rctag rc1
Name: python-matplotlib
Version: 2.1.0
Version: 2.1.1
Release: 1%{?rctag:.%{rctag}}%{?dist}
Summary: Python 2D plotting library
Group: Development/Libraries
@ -64,20 +64,14 @@ URL: http://matplotlib.org
Source0: https://github.com/matplotlib/matplotlib/archive/v%{version}%{?rctag}.tar.gz#/matplotlib-%{version}%{?rctag}.tar.gz
Source1: setup.cfg
# https://github.com/matplotlib/matplotlib/pull/9304
Patch0001: 0001-TST-Skip-sphinxext-if-unavailable-instead-of-error.patch
Patch0002: 0002-TST-Capture-all-internal-warnings.patch
Patch0003: 0003-TST-Don-t-require-LaTeX-or-Inkscape-for-nose-tests.patch
Patch0004: 0004-Fix-AxesImage.get_cursor_data-on-arm.patch
Patch0005: 0005-TST-Use-fuzzy-comparison-in-test_psd_csd_equal.patch
# Depending on https://bugzilla.redhat.com/show_bug.cgi?id=1502499
# this may or may not go upstream.
Patch0006: 0006-Use-fuzzy-comparison-for-stroke-join-determination.patch
Patch0001: 0001-Use-fuzzy-comparison-for-stroke-join-determination.patch
# Fedora-specific patches.
Patch1001: 0007-matplotlibrc-path-search-fix.patch
Patch1002: 0008-TST-Increase-tolerances-for-FreeType-2.7.1.patch
Patch1686: 0009-TST-Increase-some-tolerances-for-32-bit-systems.patch
Patch1001: 0002-matplotlibrc-path-search-fix.patch
Patch1002: 0003-TST-Increase-tolerances-for-FreeType-2.7.1.patch
Patch1686: 0004-TST-Increase-some-tolerances-for-32-bit-systems.patch
BuildRequires: freetype-devel
BuildRequires: libpng-devel
@ -391,11 +385,6 @@ Requires: python3-tkinter
%prep
%autosetup -n matplotlib-%{version}%{?rctag} -N
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch1001 -p1
%patch1002 -p1
%ifarch i686
@ -617,6 +606,9 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} \
%endif
%changelog
* Sun Dec 10 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.1.1-1
- Update to latest release
* Mon Oct 16 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.1.0-1
- Update to latest release

View File

@ -1 +1 @@
SHA512 (matplotlib-2.1.0.tar.gz) = 19fa97eeb483218f92d72900654984387e90b9f9cc8fd62209443a6eaeb1415e68d7d9c20c5ae0028f99836db58f12aff3af56e756a4673f5130e3f5a724ca87
SHA512 (matplotlib-2.1.1.tar.gz) = 7faa6e4d215d863c436f5d5df9b2a19cf7044ec8e75be4c2e5b70ecb9fff7db03a8f092449401755c40a9ba719d1b0a7cc286e1e5ae5926b74cf91ec3826134f