From f97a7a2b07cf3b7f10e6133555be3b8fd4266c24 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 4 May 2022 19:14:19 -0400 Subject: [PATCH] Update to 3.5.2 (#2081232) --- .gitignore | 2 + 0001-matplotlibrc-path-search-fix.patch | 6 +- ...sion-to-2.11.0-and-update-tolerances.patch | 36 +++++----- ...a-few-test-tolerances-on-some-arches.patch | 22 +++---- ...-increase-tolerance-on-rcupdate-test.patch | 26 -------- 0005-Fix-snap-argument-to-pcolormesh.patch | 66 ------------------- python-matplotlib.spec | 11 ++-- sources | 4 +- 8 files changed, 41 insertions(+), 132 deletions(-) rename 0004-Increase-a-few-test-tolerances-on-some-arches.patch => 0003-Increase-a-few-test-tolerances-on-some-arches.patch (89%) delete mode 100644 0003-Slightly-increase-tolerance-on-rcupdate-test.patch delete mode 100644 0005-Fix-snap-argument-to-pcolormesh.patch diff --git a/.gitignore b/.gitignore index 6d97002..9f9b814 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,5 @@ matplotlib-1.0.0-without-gpc.tar.gz /matplotlib-3.5.0-with-freetype-2.11.0.tar.gz /matplotlib-3.5.1.tar.gz /matplotlib-3.5.1-with-freetype-2.11.0.tar.gz +/matplotlib-3.5.2.tar.gz +/matplotlib-3.5.2-with-freetype-2.11.0.tar.gz diff --git a/0001-matplotlibrc-path-search-fix.patch b/0001-matplotlibrc-path-search-fix.patch index 05c8f42..516ff27 100644 --- a/0001-matplotlibrc-path-search-fix.patch +++ b/0001-matplotlibrc-path-search-fix.patch @@ -1,7 +1,7 @@ -From 134f23fc6b79898d23fd587e6c5a20f554263630 Mon Sep 17 00:00:00 2001 +From 595f7e2f1c1349d1015f13a00da33e08d02d6640 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 27 Sep 2017 19:35:59 -0400 -Subject: [PATCH 1/4] matplotlibrc path search fix +Subject: [PATCH 1/3] matplotlibrc path search fix Signed-off-by: Elliott Sales de Andrade --- @@ -39,5 +39,5 @@ index ba9cd6c90c..bc800e1322 100644 for fname in gen_candidates(): -- -2.31.1 +2.35.1 diff --git a/0002-Set-FreeType-version-to-2.11.0-and-update-tolerances.patch b/0002-Set-FreeType-version-to-2.11.0-and-update-tolerances.patch index 8ff2623..6686306 100644 --- a/0002-Set-FreeType-version-to-2.11.0-and-update-tolerances.patch +++ b/0002-Set-FreeType-version-to-2.11.0-and-update-tolerances.patch @@ -1,7 +1,7 @@ -From 3e06485b38ce4059ac3019a521e6efa446a24d5d Mon Sep 17 00:00:00 2001 +From 200afb4b8503031e1aad437482b2bc61b1cede32 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 14 Feb 2020 06:05:42 -0500 -Subject: [PATCH 2/4] 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 --- @@ -28,10 +28,10 @@ index bc800e1322..10ff904c8e 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 39b2478637..98878513b5 100644 +index eb4c34382b..03b92d34fa 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py -@@ -6594,7 +6594,7 @@ def test_normal_axes(): +@@ -6710,7 +6710,7 @@ def test_normal_axes(): ] for nn, b in enumerate(bbaxis): targetbb = mtransforms.Bbox.from_bounds(*target[nn]) @@ -40,7 +40,7 @@ index 39b2478637..98878513b5 100644 target = [ [150.0, 119.999, 930.0, 11.111], -@@ -6612,7 +6612,7 @@ def test_normal_axes(): +@@ -6728,7 +6728,7 @@ def test_normal_axes(): target = [85.5138, 75.88888, 1021.11, 1017.11] targetbb = mtransforms.Bbox.from_bounds(*target) @@ -50,10 +50,10 @@ index 39b2478637..98878513b5 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 a717eace83..64b9262143 100644 +index 8fd3cc5a35..b1e0fa57cd 100644 --- a/lib/matplotlib/tests/test_constrainedlayout.py +++ b/lib/matplotlib/tests/test_constrainedlayout.py -@@ -411,7 +411,7 @@ def test_hidden_axes(): +@@ -431,7 +431,7 @@ def test_hidden_axes(): extents1 = np.copy(axs[0, 0].get_position().extents) np.testing.assert_allclose( @@ -129,10 +129,10 @@ index e9b01b160d..beab853489 100644 diff --git a/setupext.py b/setupext.py -index e41ab98fe1..ff7f45d804 100644 +index 90bc304531..7ae976b8fa 100644 --- a/setupext.py +++ b/setupext.py -@@ -167,12 +167,18 @@ _freetype_hashes = { +@@ -167,6 +167,12 @@ _freetype_hashes = { '955e17244e9b38adb0c98df66abb50467312e6bb70eac07e49ce6bd1a20e809a', '2.10.1': '3a60d391fd579440561bf0e7f31af2222bc610ad6ce4d9d7bd2165bca8669110', @@ -142,17 +142,19 @@ index e41ab98fe1..ff7f45d804 100644 + '5eab795ebb23ac77001cfb68b7d4d50b5d6c7469247b0b01b2c953269f658dac', + '2.11.0': + 'a45c6b403413abd5706f3582f04c8339d26397c4304b78fa552f2215df64101f', + '2.11.1': + 'f8db94d307e9c54961b39a1cc799a67d46681480696ed72ecf78d4473770f09b' } - # This is the version of FreeType to use when building a local version. It +@@ -174,7 +180,7 @@ _freetype_hashes = { # 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`. --LOCAL_FREETYPE_VERSION = '2.6.1' -+LOCAL_FREETYPE_VERSION = '2.11.0' - LOCAL_FREETYPE_HASH = _freetype_hashes.get(LOCAL_FREETYPE_VERSION, 'unknown') - - # Also update the cache path in `.circleci/config.yml`. -@@ -581,6 +587,7 @@ class FreeType(SetupPackage): +-TESTING_VERSION_OF_FREETYPE = '2.6.1' ++TESTING_VERSION_OF_FREETYPE = '2.11.0' + if sys.platform.startswith('win') and platform.machine() == 'ARM64': + # older versions of freetype are not supported for win/arm64 + # Matplotlib tests will not pass +@@ -590,6 +596,7 @@ class FreeType(SetupPackage): ext.extra_objects.insert( 0, str(src_path / 'objs' / '.libs' / libfreetype)) ext.define_macros.append(('FREETYPE_BUILD_TYPE', 'local')) @@ -161,5 +163,5 @@ index e41ab98fe1..ff7f45d804 100644 def do_custom_build(self, env): # We're using a system freetype -- -2.31.1 +2.35.1 diff --git a/0004-Increase-a-few-test-tolerances-on-some-arches.patch b/0003-Increase-a-few-test-tolerances-on-some-arches.patch similarity index 89% rename from 0004-Increase-a-few-test-tolerances-on-some-arches.patch rename to 0003-Increase-a-few-test-tolerances-on-some-arches.patch index 565d9c4..ed85cc9 100644 --- a/0004-Increase-a-few-test-tolerances-on-some-arches.patch +++ b/0003-Increase-a-few-test-tolerances-on-some-arches.patch @@ -1,7 +1,7 @@ -From 715490fce1f7a2579f620802bbf25d525b5f2e7c Mon Sep 17 00:00:00 2001 +From eec799b589e203bfadaed0edb67e1719b843f0fd Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 24 Aug 2021 04:47:50 -0400 -Subject: [PATCH 4/4] Increase a few test tolerances on some arches. +Subject: [PATCH 3/3] Increase a few test tolerances on some arches. Signed-off-by: Elliott Sales de Andrade --- @@ -14,10 +14,10 @@ Signed-off-by: Elliott Sales de Andrade 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py -index 98878513b5..890f1de85d 100644 +index 03b92d34fa..0149a5d01a 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py -@@ -890,7 +890,8 @@ def test_imshow(): +@@ -918,7 +918,8 @@ def test_imshow(): ax.imshow("r", data=data) @@ -27,7 +27,7 @@ index 98878513b5..890f1de85d 100644 def test_imshow_clip(): # As originally reported by Gellule Xg # use former defaults to match existing baseline image -@@ -2083,7 +2084,8 @@ def test_contour_hatching(): +@@ -2127,7 +2128,8 @@ def test_contour_hatching(): extend='both', alpha=0.5) @@ -38,7 +38,7 @@ index 98878513b5..890f1de85d 100644 x, y, z = contour_dat() diff --git a/lib/matplotlib/tests/test_colorbar.py b/lib/matplotlib/tests/test_colorbar.py -index 0fd049655a..65dbb6410e 100644 +index 304056f6d1..083c595f6b 100644 --- a/lib/matplotlib/tests/test_colorbar.py +++ b/lib/matplotlib/tests/test_colorbar.py @@ -1,3 +1,5 @@ @@ -47,8 +47,8 @@ index 0fd049655a..65dbb6410e 100644 import numpy as np import pytest -@@ -186,7 +188,8 @@ def test_colorbar_positioning(use_gridspec): - anchor=(0.8, 0.5), shrink=0.6, use_gridspec=use_gridspec) +@@ -218,7 +220,8 @@ def test_colorbar_single_ax_panchor_false(): + plt.colorbar(panchor=False) -@image_comparison(['contour_colorbar.png'], remove_text=True) @@ -58,7 +58,7 @@ index 0fd049655a..65dbb6410e 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 5d887416a4..c0a652f5d5 100644 +index 10fb011166..40f60de022 100644 --- a/lib/matplotlib/tests/test_contour.py +++ b/lib/matplotlib/tests/test_contour.py @@ -345,7 +345,8 @@ def test_contourf_log_extension(): @@ -109,7 +109,7 @@ index f6917a134b..a7b5772e8c 100644 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 c846ecfdcb..c04b086784 100644 +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(): @@ -123,5 +123,5 @@ index c846ecfdcb..c04b086784 100644 X, Y, U, V = velocity_field() plt.streamplot(X, Y, U, V, color=U, density=0.6, linewidth=2, -- -2.31.1 +2.35.1 diff --git a/0003-Slightly-increase-tolerance-on-rcupdate-test.patch b/0003-Slightly-increase-tolerance-on-rcupdate-test.patch deleted file mode 100644 index 4d93084..0000000 --- a/0003-Slightly-increase-tolerance-on-rcupdate-test.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 77ff08e47935f5ea307eb9fd69ca08a774f264f7 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Fri, 4 Jun 2021 02:32:31 -0400 -Subject: [PATCH 3/4] Slightly increase tolerance on rcupdate test. - -Signed-off-by: Elliott Sales de Andrade ---- - lib/matplotlib/tests/test_backend_pgf.py | 2 +- - 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 9b5b0b28ee..eac63a6902 100644 ---- a/lib/matplotlib/tests/test_backend_pgf.py -+++ b/lib/matplotlib/tests/test_backend_pgf.py -@@ -136,7 +136,7 @@ def test_rcupdate(): - 'pgf.preamble': ('\\usepackage[utf8x]{inputenc}' - '\\usepackage[T1]{fontenc}' - '\\usepackage{sfmath}')}] -- tol = [0, 13.2] if _old_gs_version else [0, 0] -+ tol = [6, 1.28] - for i, rc_set in enumerate(rc_sets): - with mpl.rc_context(rc_set): - for substring, pkg in [('sfmath', 'sfmath'), ('utf8x', 'ucs')]: --- -2.31.1 - diff --git a/0005-Fix-snap-argument-to-pcolormesh.patch b/0005-Fix-snap-argument-to-pcolormesh.patch deleted file mode 100644 index b642b9d..0000000 --- a/0005-Fix-snap-argument-to-pcolormesh.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 4dabe86f04281c9ec307ecb2586f29f9c03b1257 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Tue, 5 Oct 2021 22:14:49 -0400 -Subject: [PATCH 5/5] Fix snap argument to pcolormesh - -If it's passed as a keyword argument, then it needs to be removed from -`kwargs`, or not passed again explicitly. Other handling of `snap` uses -`setdefault`, so do that here too. - -Signed-off-by: Elliott Sales de Andrade ---- - lib/matplotlib/axes/_axes.py | 5 +++-- - lib/matplotlib/tests/test_axes.py | 7 ++++--- - 2 files changed, 7 insertions(+), 5 deletions(-) - -diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py -index 4eca2e6b0b..dcaadb8be3 100644 ---- a/lib/matplotlib/axes/_axes.py -+++ b/lib/matplotlib/axes/_axes.py -@@ -6016,9 +6016,10 @@ default: :rc:`scatter.edgecolors` - # convert to one dimensional array - C = C.ravel() - -- snap = kwargs.get('snap', rcParams['pcolormesh.snap']) -+ kwargs.setdefault('snap', rcParams['pcolormesh.snap']) -+ - collection = mcoll.QuadMesh( -- coords, antialiased=antialiased, shading=shading, snap=snap, -+ coords, antialiased=antialiased, shading=shading, - array=C, cmap=cmap, norm=norm, alpha=alpha, **kwargs) - collection._scale_norm(norm, vmin, vmax) - self._pcolor_grid_deprecation_helper() -diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py -index a5e678d048..935cd11c1e 100644 ---- a/lib/matplotlib/tests/test_axes.py -+++ b/lib/matplotlib/tests/test_axes.py -@@ -1250,22 +1250,23 @@ def test_pcolorflaterror(): - ax.pcolormesh(x, y, Z, shading='flat') - - -+@pytest.mark.parametrize('snap', [False, True]) - @check_figures_equal(extensions=["png"]) --def test_pcolorauto(fig_test, fig_ref): -+def test_pcolorauto(fig_test, fig_ref, snap): - ax = fig_test.subplots() - x = np.arange(0, 10) - y = np.arange(0, 4) - np.random.seed(19680801) - Z = np.random.randn(3, 9) - # this is the same as flat; note that auto is default -- ax.pcolormesh(x, y, Z) -+ ax.pcolormesh(x, y, Z, snap=snap) - - ax = fig_ref.subplots() - # specify the centers - x2 = x[:-1] + np.diff(x) / 2 - y2 = y[:-1] + np.diff(y) / 2 - # this is same as nearest: -- ax.pcolormesh(x2, y2, Z) -+ ax.pcolormesh(x2, y2, Z, snap=snap) - - - @image_comparison(['canonical']) --- -2.31.1 - diff --git a/python-matplotlib.spec b/python-matplotlib.spec index 9dc6cd8..f5f7e84 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -30,14 +30,14 @@ %global _docdir_fmt %{name} # Updated test images for new FreeType. -%global mpl_images_version 3.5.1 +%global mpl_images_version 3.5.2 # The version of FreeType in this Fedora branch. %global ftver 2.11.0 Name: python-matplotlib -Version: 3.5.1 -%global Version 3.5.1 +Version: 3.5.2 +%global Version 3.5.2 Release: %autorelease Summary: Python 2D plotting library # qt_editor backend is MIT @@ -55,9 +55,7 @@ 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 -# Work around for problems with texlive 2021 (#1965547) -Patch1003: 0003-Slightly-increase-tolerance-on-rcupdate-test.patch -Patch1004: 0004-Increase-a-few-test-tolerances-on-some-arches.patch +Patch1003: 0003-Increase-a-few-test-tolerances-on-some-arches.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -294,7 +292,6 @@ gzip -dc %SOURCE1000 | tar xf - --transform='s~^mpl-images-%{mpl_images_version} cp -p %{SOURCE1} mplsetup.cfg %patch1003 -p1 -%patch1004 -p1 %generate_buildrequires diff --git a/sources b/sources index 4cbc3b1..90a730a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (matplotlib-3.5.1.tar.gz) = c6cee81a9d06b879eb64204d64f8cdedea2533927ab1023202ab999e2503bc41a40716901679eb79b131fff3e413942d501e3c6ef82b053170088b56d0a7ce26 -SHA512 (matplotlib-3.5.1-with-freetype-2.11.0.tar.gz) = 7dd682279e04283d02099d6639541d69554391f3ee8330057720566c3dea3d22a2f0427ad7881e9978237191e3467cca1e33002371af7ac4501e7ccc58236a0f +SHA512 (matplotlib-3.5.2.tar.gz) = 9b6e87aeee69e106c90d1f915d2f97bf42a538bc00d885c884d2723355c2339c2cf036d2d80097db50ffa6c48a3118d96ad4cec7ff38368b19ce33eaae75f396 +SHA512 (matplotlib-3.5.2-with-freetype-2.11.0.tar.gz) = 6485e6cbfc7239af0e07555128e75db8dc1919674e8593caf2d6fa38db20595d306403e326c9b3a4a848b45e1bd48266bddda06df2d0a63f93cd590949528bf7