From b43f4c879d52422df52ac23ae97818e568aa51e746e174a6d09461a6b9a6e5a2 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 15 Aug 2022 07:11:27 +0000 Subject: [PATCH 1/2] Accepting request 995054 from home:apersaud:branches:devel:languages:python:numeric update to latest version OBS-URL: https://build.opensuse.org/request/show/995054 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-matplotlib?expand=0&rev=63 --- matplotlib-3.5.2.tar.gz | 3 --- matplotlib-3.5.3.tar.gz | 3 +++ python-matplotlib.changes | 25 +++++++++++++++++++++++++ python-matplotlib.spec | 16 ++-------------- 4 files changed, 30 insertions(+), 17 deletions(-) delete mode 100644 matplotlib-3.5.2.tar.gz create mode 100644 matplotlib-3.5.3.tar.gz diff --git a/matplotlib-3.5.2.tar.gz b/matplotlib-3.5.2.tar.gz deleted file mode 100644 index 053e214..0000000 --- a/matplotlib-3.5.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:48cf850ce14fa18067f2d9e0d646763681948487a8080ec0af2686468b4607a2 -size 35210006 diff --git a/matplotlib-3.5.3.tar.gz b/matplotlib-3.5.3.tar.gz new file mode 100644 index 0000000..26a467f --- /dev/null +++ b/matplotlib-3.5.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:339cac48b80ddbc8bfd05daae0a3a73414651a8596904c2a881cfd1edb65f26c +size 35236343 diff --git a/python-matplotlib.changes b/python-matplotlib.changes index af010f1..cfcb80d 100644 --- a/python-matplotlib.changes +++ b/python-matplotlib.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Sun Aug 14 14:47:16 UTC 2022 - Arun Persaud + +- specfile: + * removed pathc matplotlib-pr22975-fixarray.patch; included upstream + +- update to version 3.5.3: + * Fix alignment of over/under symbols + * Fix bugs in colorbars: + + alpha of extensions + + drawedges=True with extensions + + handling of panchor=False + * Fix builds on Cygwin and IBM i + * Fix contour labels in SubFigures + * Fix cursor output: + + for imshow with all negative values + + when using BoundaryNorm + * Fix interactivity in IPython/Jupyter + * Fix NaN handling in errorbar + * Fix NumPy conversion from AstroPy unit arrays + * Fix positional markerfmt passed to stem + * Fix unpickling: + + crash loading in a separate process + + incorrect DPI when HiDPI screens + ------------------------------------------------------------------- Thu May 26 16:23:46 UTC 2022 - Ben Greiner diff --git a/python-matplotlib.spec b/python-matplotlib.spec index c54b7d9..0a85227 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -31,7 +31,7 @@ ExclusiveArch: x86_64 aarch64 %bcond_with test %endif Name: python-matplotlib%{psuffix} -Version: 3.5.2 +Version: 3.5.3 Release: 0 Summary: Plotting Library for Python License: SUSE-Matplotlib @@ -41,8 +41,6 @@ Source1: matplotlib-mplsetup.cfg # Bundled version of freetype and qhull for testing purposes only Source98: http://www.qhull.org/download/qhull-2020-src-8.0.2.tgz Source99: https://downloads.sourceforge.net/project/freetype/freetype2/2.6.1/freetype-2.6.1.tar.gz -# PATCH-FIX-UPSTREAM matplotlib-pr22975-fixarray.patch -- gh#matplotlib/matplotlib#22975, required for astropy 5.1 -Patch1: https://github.com/matplotlib/matplotlib/pull/22975.patch#/matplotlib-pr22975-fixarray.patch BuildRequires: %{python_module Cycler >= 0.10} BuildRequires: %{python_module FontTools >= 4.22.0} BuildRequires: %{python_module devel} @@ -115,7 +113,6 @@ application servers, and six graphical user interface toolkits. %package cairo Summary: Cairo backend for %{name} -License: SUSE-Matplotlib Requires: %{name} = %{version} Requires: python-cairo @@ -125,7 +122,6 @@ for the %{name} plotting package %package gtk3 Summary: GTK3 backends for %{name} -License: SUSE-Matplotlib Requires: %{name} = %{version} Requires: %{name}-gtk-common = %{version} @@ -135,7 +131,6 @@ gtk3cairo backends for the %{name} plotting package %package gtk4 Summary: GTK4 backends for %{name} -License: SUSE-Matplotlib Requires: %{name} = %{version} Requires: %{name}-gtk-common = %{version} @@ -145,7 +140,6 @@ gtk4cairo backends for the %{name} plotting package %package gtk-common Summary: code common for GTK3 and GTK4 backends for %{name} -License: SUSE-Matplotlib Requires: %{name} = %{version} Requires: %{name}-cairo = %{version} Requires: gdk-pixbuf-loader-rsvg @@ -158,7 +152,6 @@ for the %{name} plotting package %package latex Summary: Allow rendering latex in %{name} -License: SUSE-Matplotlib Requires: %{name} = %{version} # grep usepackage lib/matplotlib/texmanager.py lib/matplotlib/backends/backend_pgf.py # https://github.com/search?q=usepackage+repo%3Amatplotlib%2Fmatplotlib+path%3Alib&type=Code @@ -194,7 +187,6 @@ and figures. %package qt5 Summary: Qt5 backend for %{name} -License: SUSE-Matplotlib Requires: %{name} = %{version} Requires: python-qt5 Provides: %{name}-qt-shared = %{version} @@ -206,7 +198,6 @@ for the %{name} plotting package %package testdata Summary: Test data for %{name} -License: SUSE-Matplotlib Requires: %{name} = %{version} %description testdata @@ -215,7 +206,6 @@ for the %{name} plotting package %package tk Summary: Tk backend for %{name} -License: SUSE-Matplotlib Requires: %{name} = %{version} Requires: python-Pillow-tk Requires: python-tk @@ -227,7 +217,6 @@ for the %{name} plotting package %package web Summary: Web backend for %{name} -License: SUSE-Matplotlib Requires: %{name} = %{version} Requires: python-tornado @@ -237,7 +226,6 @@ for the %{name} plotting package %package wx Summary: WxWidgets backend for %{name} -License: SUSE-Matplotlib Requires: %{name} = %{version} Requires: python-wxPython >= 4 @@ -246,7 +234,7 @@ This package includes the wxWidgets-based wxagg backend for %{name} plotting package %prep -%autosetup -p1 -n matplotlib-%{version} +%autosetup -n matplotlib-%{version} #copy freetype to the right location, so that matplotlib will not try to download it mkdir -p ~/.cache/matplotlib/ SHA=($(sha256sum %{SOURCE98})) From 10b0afb464331b413b66efa9aa7b1115bc3b4760725dc3e93dc9954d221cde05 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 19 Aug 2022 18:18:45 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-matplotlib?expand=0&rev=64 --- matplotlib-pr22975-fixarray.patch | 60 ------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 matplotlib-pr22975-fixarray.patch diff --git a/matplotlib-pr22975-fixarray.patch b/matplotlib-pr22975-fixarray.patch deleted file mode 100644 index 45a0633..0000000 --- a/matplotlib-pr22975-fixarray.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 29ce2c226aafc170cb9b874e81b158c832322cf7 Mon Sep 17 00:00:00 2001 -From: Jody Klymak -Date: Thu, 5 May 2022 04:38:49 +0000 -Subject: [PATCH] FIX: fix check_1d to also check for ndim - -Arrays sometimes don't have all the methods arrays should have, so -add another check here. Plot requires both ndim and shape and this -will extract the numpy array if x does not have those attributes. -Otherwise leave the object alone, because unit support (currently only -in plot) requires the object to retain the unit info. ---- - lib/matplotlib/cbook/__init__.py | 7 ++++++- - lib/matplotlib/tests/test_units.py | 19 +++++++++++++++++++ - 2 files changed, 25 insertions(+), 1 deletion(-) - -diff --git a/lib/matplotlib/cbook/__init__.py b/lib/matplotlib/cbook/__init__.py -index 774643fc9c99..5a955ed459c5 100644 ---- a/lib/matplotlib/cbook/__init__.py -+++ b/lib/matplotlib/cbook/__init__.py -@@ -1333,7 +1333,12 @@ def _check_1d(x): - """Convert scalars to 1D arrays; pass-through arrays as is.""" - # Unpack in case of e.g. Pandas or xarray object - x = _unpack_to_numpy(x) -- if not hasattr(x, 'shape') or len(x.shape) < 1: -+ # plot requires `shape` and `ndim`. If passed an -+ # object that doesn't provide them, then force to numpy array. -+ # Note this will strip unit information. -+ if (not hasattr(x, 'shape') or -+ not hasattr(x, 'ndim') or -+ len(x.shape) < 1): - return np.atleast_1d(x) - else: - return x -diff --git a/lib/matplotlib/tests/test_units.py b/lib/matplotlib/tests/test_units.py -index 93a12cebb2c8..d3b8c5a71643 100644 ---- a/lib/matplotlib/tests/test_units.py -+++ b/lib/matplotlib/tests/test_units.py -@@ -264,3 +264,22 @@ def test_empty_default_limits(quantity_converter): - fig.draw_without_rendering() - assert ax.get_ylim() == (0, 100) - assert ax.get_xlim() == (28.5, 31.5) -+ -+ -+# test array-like objects... -+class Kernel: -+ def __init__(self, array): -+ self._array = np.asanyarray(array) -+ -+ def __array__(self): -+ return self._array -+ -+ @property -+ def shape(self): -+ return self._array.shape -+ -+ -+def test_plot_kernel(): -+ # just a smoketest that fail -+ kernel = Kernel([1, 2, 3, 4, 5]) -+ plt.plot(kernel)