Accepting request 967137 from home:bnavigator:branches:devel:languages:python:numeric

- Update to version 1.4.2
- Copy back the installed package into the source tree
  * mimics upstreams test setup of an editable install
  * avoids conftest.py collection errors with pytest 7

OBS-URL: https://build.opensuse.org/request/show/967137
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pandas?expand=0&rev=70
This commit is contained in:
Markéta Machová 2022-04-06 05:42:27 +00:00 committed by Git OBS Bridge
parent eb6a616f64
commit efb32b793f
4 changed files with 70 additions and 31 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8db93ec98ac7cb5f8ac1420c10f5e3c43533153f253fe7fb6d891cf5aa2b80d2
size 4941369

3
pandas-1.4.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:92bc1fc585f1463ca827b45535957815b7deb218c549b7c18402c322c7549a12
size 4940242

View File

@ -1,3 +1,42 @@
-------------------------------------------------------------------
Tue Apr 5 13:40:30 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to version 1.4.2
* Fixed regression in DataFrame.drop() and Series.drop() when
Index had extension dtype and duplicates (GH45860)
* Fixed regression in read_csv() killing python process when
invalid file input was given for engine="c" (GH45957)
* Fixed memory performance regression in Series.fillna() when
called on a DataFrame column with inplace=True (GH46149)
* Provided an alternative solution for passing custom Excel
formats in Styler.to_excel(), which was a regression based on
stricter CSS validation. Examples available in the
documentation for Styler.format() (GH46152)
* Fixed regression in DataFrame.replace() when a replacement
value was also a target for replacement (GH46306)
* Fixed regression in DataFrame.replace() when the replacement
value was explicitly None when passed in a dictionary to
to_replace (GH45601, GH45836)
* Fixed regression when setting values with DataFrame.loc()
losing MultiIndex names if DataFrame was empty before (GH46317)
* Fixed regression when rendering boolean datatype columns with
Styler() (GH46384)
* Fixed regression in Groupby.rolling() with a frequency window
that would raise a ValueError even if the datetimes within each
group were monotonic (GH46061)
* Fix some cases for subclasses that define their _constructor
properties as general callables (GH46018)
* Fixed “longtable” formatting in Styler.to_latex() when
column_format is given in extended format (GH46037)
* Fixed incorrect rendering in Styler.format() with
hyperlinks="html" when the url contains a colon or other
special characters (GH46389)
* Improved error message in Rolling when window is a frequency
and NaT is in the rolling axis (GH46087)
- Copy back the installed package into the source tree
* mimics upstreams test setup of an editable install
* avoids conftest.py collection errors with pytest 7
-------------------------------------------------------------------
Sat Feb 12 23:29:24 UTC 2022 - Arun Persaud <arun@gmx.de>

View File

@ -42,16 +42,16 @@
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-pandas%{psuffix}
Version: 1.4.1
Version: 1.4.2
Release: 0
Summary: Python data structures for data analysis, time series, and statistics
License: BSD-3-Clause
Group: Development/Libraries/Python
URL: https://pandas.pydata.org/
Source0: https://files.pythonhosted.org/packages/source/p/pandas/pandas-%{version}.tar.gz
BuildRequires: %{python_module Cython >= 0.29.21}
BuildRequires: %{python_module Cython >= 0.29.24}
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module devel >= 3.7.1}
BuildRequires: %{python_module devel >= 3.8}
BuildRequires: %{python_module numpy-devel >= 1.18.5}
BuildRequires: %{python_module python-dateutil >= 2.8.1}
BuildRequires: %{python_module pytz >= 2020.1}
@ -107,6 +107,7 @@ BuildRequires: %{python_module numexpr >= 2.7.1}
BuildRequires: %{python_module openpyxl >= 3.0.3}
BuildRequires: %{python_module pandas = %{version}}
BuildRequires: %{python_module pytest >= 6.0}
BuildRequires: %{python_module pytest-asyncio >= 0.17}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module scipy >= 1.4.1}
@ -124,17 +125,8 @@ heterogeneous) and time series data. It is a high-level building
block for doing data analysis in Python.
%prep
%if !%{with test}
%setup -q -n pandas-%{version}
%else
%setup -q -c -n pandas-%{version} -T
cd ..
# unpack only the files we need for testing
tar xf %{SOURCE0} \
pandas-%{version}/pyproject.toml \
pandas-%{version}/pandas/io/formats/templates/html.tpl
sed -i 's/--strict-data-files//' pandas-%{version}/pyproject.toml
%endif
sed -i 's/--strict-data-files//' pyproject.toml
%build
%if !%{with test}
@ -151,6 +143,12 @@ rm -r %{buildroot}%{$python_sitearch}/pandas/_libs/src
rm -r %{buildroot}%{$python_sitearch}/pandas/_libs/tslibs/src
%fdupes %{buildroot}%{$python_sitearch}
}
%else
# Copy the installed package back into the source tree
# This is equivalent to build and install editable (pip install -e .), and the only way
# to have a passing test suite due to how the test collection works in pytest >= 7.
# Only works for separate python flavors in multibuild.
%python_expand cp -rf %{$python_sitearch}/pandas/* pandas/
%endif
%check
@ -162,14 +160,20 @@ export PYTHONDONTWRITEBYTECODE=1
# https://github.com/pytest-dev/pytest/issues/920
# https://github.com/pytest-dev/pytest/issues/1075
export PYTHONHASHSEED=1
# tries to compile stuff in system sitearch
SKIP_TESTS+=" or test_oo_optimizable"
# dtypes not as expected
# https://github.com/pandas-dev/pandas/issues/39096
# https://github.com/pandas-dev/pandas/issues/36579
SKIP_TESTS+=" or (test_misc and test_memory_usage and series and empty and index)"
SKIP_TESTS="(test_misc and test_memory_usage and series and empty and index)"
# pytest-xdist worker crash
SKIP_TESTS+=" or test_pivot_number_of_levels_larger_than_int32"
# --skip-* arguments: Upstream's custom way to skip marked tests. These do not use pytest.mark.
SKIP_ARGS="--skip-network"
# clipboard not set up properly in build service without window manager
SKIP_MARKERS="clipboard"
# skip tests which upstream marked for -n 1 only.
SKIP_MARKERS+=" or single_cpu"
if [ $(getconf LONG_BIT) -eq 32 ]; then
# https://github.com/pandas-dev/pandas/issues/31856
SKIP_TESTS+=" or test_maybe_promote_int_with_int"
@ -202,24 +206,20 @@ SKIP_TESTS+=" or (test_groupby and test_groupby_numerical_stability_sum_mean)"
SKIP_TESTS+=" or (test_groupby and test_groupby_numerical_stability_cumsum)"
SKIP_TESTS+=" or (test_c_parser_only and test_float_precision_options)"
# run the slow tests only on x86_64
%define test_fast --skip-slow --skip-db
SKIP_ARGS+=" --skip-slow --skip-db"
%endif
# The test collection consumes a lot of memory per worker. This sets %%jobs.
%limit_build -m 2048
%{python_expand $python -c 'import pandas; print(pandas.__path__); print(pandas.show_versions())'
# -c pyproject.toml: get the marker declarations
# cache: can't just say no cacheprovider, because one test checks for the --lf option of pytest-cache
# --skip-* arguments: Upstreams custom way to skip marked tests. These do not use pytest.mark.
# clipboard marker: not set up properly in build service
# need to specify test path directly instead of --pyargs pandas in order
# to find all conftest.py files https://github.com/pytest-dev/pytest/issues/1596
xvfb-run pytest-%{$python_bin_suffix} -v -n %{jobs} \
-c pyproject.toml \
xvfb-run pytest-%{$python_bin_suffix} -v -n %{jobs} --dist=loadfile \
-o cache_dir=$PWD/.pytest_cache --cache-clear \
--skip-network %{?test_fast} \
-m "not clipboard" \
-k "not (${SKIP_TESTS:4})" \
%{$python_sitearch}/pandas
${SKIP_ARGS} \
-m "not (${SKIP_MARKERS})" \
-k "not (${SKIP_TESTS})" \
pandas
}
%endif