commit python-healpy for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-healpy for openSUSE:Factory checked in at 2024-07-22 17:17:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-healpy (Old) and /work/SRC/openSUSE:Factory/.python-healpy.new.17339 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-healpy" Mon Jul 22 17:17:56 2024 rev:9 rq:1188826 version:1.16.6 Changes: -------- --- /work/SRC/openSUSE:Factory/python-healpy/python-healpy.changes 2023-10-06 21:16:45.844885912 +0200 +++ /work/SRC/openSUSE:Factory/.python-healpy.new.17339/python-healpy.changes 2024-07-22 17:19:40.949312405 +0200 @@ -1,0 +2,9 @@ +Sat Jul 20 10:19:17 UTC 2024 - Atri Bhattacharya <badshah400@gmail.com> + +- Add python-healpy-scipy-1_14-compat.patch: Account for the + renaming of trapz to trapezoid in scipy 1.14. +- Add python-healpy-matplotlib-1_9-compat.patch: Fix compatibility + with matplotlib >= 3.9; upstream commit 0b1f498 rebased for + current version. + +------------------------------------------------------------------- New: ---- python-healpy-matplotlib-1_9-compat.patch python-healpy-scipy-1_14-compat.patch BETA DEBUG BEGIN: New: renaming of trapz to trapezoid in scipy 1.14. - Add python-healpy-matplotlib-1_9-compat.patch: Fix compatibility with matplotlib >= 3.9; upstream commit 0b1f498 rebased for New: - Add python-healpy-scipy-1_14-compat.patch: Account for the renaming of trapz to trapezoid in scipy 1.14. BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-healpy.spec ++++++ --- /var/tmp/diff_new_pack.DfaOkK/_old 2024-07-22 17:19:41.825347625 +0200 +++ /var/tmp/diff_new_pack.DfaOkK/_new 2024-07-22 17:19:41.825347625 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-healpy # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,6 +24,10 @@ License: GPL-2.0-only URL: https://github.com/healpy/healpy Source: https://files.pythonhosted.org/packages/source/h/healpy/healpy-%{version}.tar.gz +# PATCH-FIX-UPSTREAM python-healpy-scipy-1_14-compat.patch badshah400@gmail.com -- Account for renaming of integrate.trapz to integrate.trapezoidal in scipy 1.14 +Patch0: python-healpy-scipy-1_14-compat.patch +# PATCH-FIX-UPSTREAM python-healpy-matplotlib-1_9-compat.patch badshah400@gmail.com -- Compatibility with matplotlib 3.9 via upstream commit 0b1f498 rebased for current version +Patch1: python-healpy-matplotlib-1_9-compat.patch BuildRequires: %{python_module Cython} BuildRequires: %{python_module devel} BuildRequires: %{python_module numpy-devel >= 1.13} ++++++ python-healpy-matplotlib-1_9-compat.patch ++++++ From 7a68c6d83a78961027601025fc6553a67f6a44a6 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade <quantum.analyst@gmail.com> Date: Mon, 29 Apr 2024 16:15:05 -0400 Subject: [PATCH] Fix errors with Matplotlib 3.9 The `matplotlib.cm.get_cmap` API was deprecated in 3.7, and removed in 3.9, but `matplotlib.pyplot.get_cmap` remains. --- projaxes.py | 4 ++-- src/_line_integral_convolution.pyx | 4 ++-- test/test_visufunc.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/healpy/projaxes.py b/healpy/projaxes.py index 8c301647..dc6fcef9 100644 --- a/healpy/projaxes.py +++ b/healpy/projaxes.py @@ -948,14 +948,14 @@ def create_colormap(cmap, badcolor="gray", bgcolor="white"): cmap_path = os.path.join(datapath, f"{cmap}_cmap.dat") cmap0 = matplotlib.colors.ListedColormap(np.loadtxt(cmap_path) / 255.0, cmap) else: - cmap0 = matplotlib.cm.get_cmap(cmap) + cmap0 = plt.get_cmap(cmap) elif type(cmap) in [ matplotlib.colors.LinearSegmentedColormap, matplotlib.colors.ListedColormap, ]: cmap0 = cmap else: - cmap0 = matplotlib.cm.get_cmap(matplotlib.rcParams["image.cmap"]) + cmap0 = plt.get_cmap(matplotlib.rcParams["image.cmap"]) if hasattr(cmap0, "_segmentdata"): newcm = matplotlib.colors.LinearSegmentedColormap( "newcm", cmap0._segmentdata, cmap0.N diff --git a/healpy/src/_line_integral_convolution.pyx b/healpy/src/_line_integral_convolution.pyx index 1b3b6c8f..48af98dd 100644 --- a/healpy/src/_line_integral_convolution.pyx +++ b/healpy/src/_line_integral_convolution.pyx @@ -78,12 +78,12 @@ def line_integral_convolution( ------- >>> import healpy as hp >>> import numpy as np - >>> import matplotlib.cm >>> import matplotlib.colors + >>> import matplotlib.pyplot as plt >>> I, Q, U = hp.read_map('iqu_map.fits', (0, 1, 2)) >>> lic = hp.line_integral_convolution(Q, U) >>> hp.mollview(I) - >>> cmap_colors = matplotlib.cm.get_cmap('binary', 256)(np.linspace(0, 1, 256)) + >>> cmap_colors = plt.get_cmap('binary', 256)(np.linspace(0, 1, 256)) >>> cmap_colors[..., 3] = 0.5 # Make colormap partially transparent >>> cmap = matplotlib.colors.ListedColormap(cmap_colors) >>> hp.mollview(lic, cmap=cmap, cbar=False, reuse_axes=True) diff --git a/healpy/test/test_visufunc.py b/healpy/test/test_visufunc.py index e4d85906..ae3bb0c4 100644 --- a/healpy/test/test_visufunc.py +++ b/healpy/test/test_visufunc.py @@ -1,8 +1,8 @@ import matplotlib -import matplotlib.cm matplotlib.use("agg") import unittest +import matplotlib.pyplot as plt import numpy as np import copy @@ -93,7 +93,7 @@ def test_azeqview_ma_nocrash(self): def test_cmap_colors(self): # Get a built-in colormap name = 'viridis' - cmap = copy.copy(matplotlib.cm.get_cmap(name)) + cmap = copy.copy(plt.get_cmap(name)) # Set outlier colors color = (0.25,0.75,0.95,1.0) ++++++ python-healpy-scipy-1_14-compat.patch ++++++ --- healpy/sphtfunc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) Index: healpy-1.16.6/healpy/sphtfunc.py =================================================================== --- healpy-1.16.6.orig/healpy/sphtfunc.py +++ healpy-1.16.6/healpy/sphtfunc.py @@ -24,7 +24,10 @@ import numpy as np import astropy.io.fits as pf from .utils.deprecation import deprecated_renamed_argument -from scipy.integrate import trapz +try: + from scipy.integrate import trapezoid as trapz +except ImportError: + from scipy.integrate import trapz from astropy.utils import data DATAURL = "https://healpy.github.io/healpy-data/"
participants (1)
-
Source-Sync