From 9a61ea77989448e639781baeddb1f21b846fcd70 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Jun 27 2019 07:22:25 +0000 Subject: Backport fixes for numpydoc 0.9. --- diff --git a/26059.patch b/26059.patch new file mode 100644 index 0000000..e706853 --- /dev/null +++ b/26059.patch @@ -0,0 +1,71 @@ +From 0ec909fca98ee5854f5865dd782d1aff99492ae6 Mon Sep 17 00:00:00 2001 +From: Joris Van den Bossche +Date: Fri, 12 Apr 2019 16:36:54 +0200 +Subject: [PATCH] DOC: fix See Also constructs (#26059) + +Signed-off-by: Elliott Sales de Andrade +--- + pandas/core/groupby/groupby.py | 12 ++++++++---- + pandas/core/indexes/base.py | 2 -- + 2 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py +index 8766fdbc2..0c3eaee8c 100644 +--- a/pandas/core/groupby/groupby.py ++++ b/pandas/core/groupby/groupby.py +@@ -1079,7 +1079,8 @@ class GroupBy(_GroupBy): + # defined here for API doc + raise NotImplementedError + +- @Substitution(name='groupby', see_also=_common_see_also) ++ @Substitution(name='groupby') ++ @Substitution(see_also=_common_see_also) + def mean(self, *args, **kwargs): + """ + Compute mean of groups, excluding missing values. +@@ -1527,7 +1528,8 @@ class GroupBy(_GroupBy): + return self._fill('bfill', limit=limit) + bfill = backfill + +- @Substitution(name='groupby', see_also=_common_see_also) ++ @Substitution(name='groupby') ++ @Substitution(see_also=_common_see_also) + def nth(self, n, dropna=None): + """ + Take the nth row from each group if n is an int, or a subset of rows +@@ -2036,7 +2038,8 @@ class GroupBy(_GroupBy): + shifted = fill_grp.shift(periods=periods, freq=freq) + return (filled / shifted) - 1 + +- @Substitution(name='groupby', see_also=_common_see_also) ++ @Substitution(name='groupby') ++ @Substitution(see_also=_common_see_also) + def head(self, n=5): + """ + Returns first n rows of each group. +@@ -2064,7 +2067,8 @@ class GroupBy(_GroupBy): + mask = self._cumcount_array() < n + return self._selected_obj[mask] + +- @Substitution(name='groupby', see_also=_common_see_also) ++ @Substitution(name='groupby') ++ @Substitution(see_also=_common_see_also) + def tail(self, n=5): + """ + Returns last n rows of each group. +diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py +index 2fa034670..4ec2e56d0 100644 +--- a/pandas/core/indexes/base.py ++++ b/pandas/core/indexes/base.py +@@ -3623,8 +3623,6 @@ class Index(IndexOpsMixin, PandasObject): + -------- + Index.array : Reference to the underlying data. + Index.to_numpy : A NumPy array representing the underlying data. +- +- Return the underlying data as an ndarray. + """ + return self._data.view(np.ndarray) + +-- +2.21.0 + diff --git a/python-pandas.spec b/python-pandas.spec index e383623..fcc4359 100644 --- a/python-pandas.spec +++ b/python-pandas.spec @@ -3,12 +3,14 @@ Name: python-%{srcname} Version: 0.24.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python library providing high-performance data analysis tools License: BSD URL: http://pandas.pydata.org/ Source0: https://pypi.io/packages/source/p/pandas/%{srcname}-%{version}.tar.gz +# Fix issues with numpydoc 0.9. +Patch0001: https://github.com/pandas-dev/pandas/pull/26059.patch %global __provides_exclude_from ^(%{python2_sitearch}|%{python3_sitearch})/.*\\.so$ @@ -49,7 +51,7 @@ analysis tools for the Python programming language. Python 3 version. %prep -%autosetup -n %{srcname}-%{version} +%autosetup -n %{srcname}-%{version} -p1 rm $(grep -rl '/\* Generated by Cython') @@ -65,6 +67,9 @@ rm $(grep -rl '/\* Generated by Cython') %{python3_sitearch}/%{srcname}* %changelog +* Thu Jun 27 2019 Elliott Sales de Andrade - 0.24.1-3 +- Fix doc build with numpydoc 0.9 + * Tue Jun 18 2019 Miro HronĨok - 0.24.1-2 - Subpackage python2-pandas has been removed See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal