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

- Update to 2.2.2
  * Pandas 2.2.2 is now compatible with numpy 2.0
  * Pandas 2.2.2 is the first version of pandas that is generally
    compatible with the upcoming numpy 2.0 release, and wheels for
    pandas 2.2.2 will work with both numpy 1.x and 2.x. One major
    caveat is that arrays created with numpy 2.0’s new StringDtype
    will convert to object dtyped arrays upon Series/DataFrame
    creation. Full support for numpy 2.0’s StringDtype is expected
    to land in pandas 3.0.
  * As usual please report any bugs discovered to our issue tracker
  ## Fixed regressions
  * DataFrame.__dataframe__() was producing incorrect data buffers
    when the a column’s type was a pandas nullable on with missing
    values (GH 56702)
  * DataFrame.__dataframe__() was producing incorrect data buffers
    when the a column’s type was a pyarrow nullable on with missing
    values (GH 57664)
  * Avoid issuing a spurious DeprecationWarning when a custom
    DataFrame or Series subclass method is called (GH 57553)
  * Fixed regression in precision of to_datetime() with string and
    unit input (GH 57051)
  ## Bug fixes
  * DataFrame.__dataframe__() was producing incorrect data buffers
    when the column’s type was nullable boolean (GH 55332)
  * DataFrame.__dataframe__() was showing bytemask instead of
    bitmask for 'string[pyarrow]' validity buffer (GH 57762)
  * DataFrame.__dataframe__() was showing non-null validity buffer
    (instead of None) 'string[pyarrow]' without missing values (GH
    57761)
  * DataFrame.to_sql() was failing to find the right table when
    using the schema argument (GH 57539)
- Remove obsolete python39 multibuild
- Add pandas-pr58269-pyarrow16xpass.patch
  gh#pandas-dev/pandas#58269

OBS-URL: https://build.opensuse.org/request/show/1171775
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pandas?expand=0&rev=114
This commit is contained in:
Dirk Mueller 2024-05-06 08:07:03 +00:00 committed by Git OBS Bridge
parent 38bd51831f
commit 1654daaf58
7 changed files with 102 additions and 16 deletions

View File

@ -1,5 +1,4 @@
<multibuild>
<package>test-py39</package>
<package>test-py310</package>
<package>test-py311</package>
<package>test-py312</package>

View File

@ -2,7 +2,7 @@
<service name="tar_scm" mode="disabled">
<param name="url">https://github.com/pandas-dev/pandas.git</param>
<param name="scm">git</param>
<param name="revision">v2.2.1</param>
<param name="revision">v2.2.2</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="filename">pandas</param>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5976687845c1b908a748264033d0f876e706fd97813ad914ac782160399cc246
size 49830028

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

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

View File

@ -0,0 +1,40 @@
From 1828b62ee913da44ec4402642ef7baaafeb65677 Mon Sep 17 00:00:00 2001
From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
Date: Mon, 15 Apr 2024 09:47:31 -1000
Subject: [PATCH] Backport PR #58268: CI/TST: Unxfail
test_slice_locs_negative_step Pyarrow test
---
pandas/tests/indexes/object/test_indexing.py | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/pandas/tests/indexes/object/test_indexing.py b/pandas/tests/indexes/object/test_indexing.py
index 443cacf94d239..ebf9dac715f8d 100644
--- a/pandas/tests/indexes/object/test_indexing.py
+++ b/pandas/tests/indexes/object/test_indexing.py
@@ -7,7 +7,6 @@
NA,
is_matching_na,
)
-from pandas.compat import pa_version_under16p0
import pandas.util._test_decorators as td
import pandas as pd
@@ -201,16 +200,7 @@ class TestSliceLocs:
(pd.IndexSlice["m":"m":-1], ""), # type: ignore[misc]
],
)
- def test_slice_locs_negative_step(self, in_slice, expected, dtype, request):
- if (
- not pa_version_under16p0
- and dtype == "string[pyarrow_numpy]"
- and in_slice == slice("a", "a", -1)
- ):
- request.applymarker(
- pytest.mark.xfail(reason="https://github.com/apache/arrow/issues/40642")
- )
-
+ def test_slice_locs_negative_step(self, in_slice, expected, dtype):
index = Index(list("bcdxy"), dtype=dtype)
s_start, s_stop = index.slice_locs(in_slice.start, in_slice.stop, in_slice.step)

View File

@ -1,3 +1,41 @@
-------------------------------------------------------------------
Tue Apr 30 18:08:56 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Update to 2.2.2
* Pandas 2.2.2 is now compatible with numpy 2.0
* Pandas 2.2.2 is the first version of pandas that is generally
compatible with the upcoming numpy 2.0 release, and wheels for
pandas 2.2.2 will work with both numpy 1.x and 2.x. One major
caveat is that arrays created with numpy 2.0s new StringDtype
will convert to object dtyped arrays upon Series/DataFrame
creation. Full support for numpy 2.0s StringDtype is expected
to land in pandas 3.0.
* As usual please report any bugs discovered to our issue tracker
## Fixed regressions
* DataFrame.__dataframe__() was producing incorrect data buffers
when the a columns type was a pandas nullable on with missing
values (GH 56702)
* DataFrame.__dataframe__() was producing incorrect data buffers
when the a columns type was a pyarrow nullable on with missing
values (GH 57664)
* Avoid issuing a spurious DeprecationWarning when a custom
DataFrame or Series subclass method is called (GH 57553)
* Fixed regression in precision of to_datetime() with string and
unit input (GH 57051)
## Bug fixes
* DataFrame.__dataframe__() was producing incorrect data buffers
when the columns type was nullable boolean (GH 55332)
* DataFrame.__dataframe__() was showing bytemask instead of
bitmask for 'string[pyarrow]' validity buffer (GH 57762)
* DataFrame.__dataframe__() was showing non-null validity buffer
(instead of None) 'string[pyarrow]' without missing values (GH
57761)
* DataFrame.to_sql() was failing to find the right table when
using the schema argument (GH 57539)
- Remove obsolete python39 multibuild
- Add pandas-pr58269-pyarrow16xpass.patch
gh#pandas-dev/pandas#58269
-------------------------------------------------------------------
Mon Mar 4 20:44:10 UTC 2024 - Ben Greiner <code@bnavigator.de>

View File

@ -25,9 +25,6 @@
%else
%define psuffix -%{flavor}
%bcond_without test
%if "%{flavor}" != "test-py39"
%define skip_python39 1
%endif
%if "%{flavor}" != "test-py310"
%define skip_python310 1
%endif
@ -64,7 +61,7 @@ ExclusiveArch: donotbuild
%endif
Name: python-pandas%{psuffix}
# Set version through _service
Version: 2.2.1
Version: 2.2.2
Release: 0
Summary: Python data structures for data analysis, time series, and statistics
License: BSD-3-Clause
@ -72,10 +69,13 @@ URL: https://pandas.pydata.org/
# SourceRepository: https://github.com/pandas-dev/pandas
# Must be created by cloning through `osc service runall`: gh#pandas-dev/pandas#54903, gh#pandas-dev/pandas#54907
Source0: pandas-%{version}.tar.gz
# PATCH-FIX-UPSTREAM pandas-pr58269-pyarrow16xpass.patch -- gh#pandas-dev/pandas#58269
Patch0: https://github.com/pandas-dev/pandas/pull/58269.patch#/pandas-pr58269-pyarrow16xpass.patch
%if !%{with test}
BuildRequires: %{python_module Cython >= 3.0.5}
BuildRequires: %{python_module devel >= 3.9}
BuildRequires: %{python_module meson-python >= 0.13.1}
BuildRequires: %{python_module numpy-devel >= 1.23.2 if %python-base < 3.12 else %python-numpy-devel >= 1.26}
BuildRequires: %{python_module numpy-devel >= 1.26}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module versioneer-toml}
BuildRequires: %{python_module wheel}
@ -83,16 +83,21 @@ BuildRequires: fdupes
BuildRequires: gcc%{?gccver}-c++
BuildRequires: git-core
BuildRequires: meson >= 1.2.1
%endif
BuildRequires: python-rpm-macros
Requires: python-python-dateutil >= 2.8.2
Requires: python-pytz >= 2020.1
Requires: timezone >= 2022a
Obsoletes: python-pandas-doc < %{version}
Provides: python-pandas-doc = %{version}
%if 0%{python_version_nodots} < 312
Requires: (python-numpy >= 1.23.2 with python-numpy < 2)
%if 0%{python_version_nodots} < 311
Requires: python-numpy >= 1.22.4
%else
Requires: (python-numpy >= 1.26 with python-numpy < 2)
%if 0%{python_version_nodots} == 311
Requires: python-numpy >= 1.23.2
%else
Requires: python-numpy >= 1.26
%endif
%endif
# SECTION extras
Recommends: python-pandas-performance
@ -131,7 +136,7 @@ BuildRequires: %{python_module dask-dataframe}
BuildRequires: %{python_module pandas-all = %{version}}
BuildRequires: %{python_module pandas-clipboard = %{version}}
BuildRequires: %{python_module pandas-compression = %{version}}
BuildRequires: %{python_module pandas-computation = %{version} if %python-base >= 3.10}
BuildRequires: %{python_module pandas-computation = %{version}}
BuildRequires: %{python_module pandas-excel = %{version}}
%{?with_pyarrow:BuildRequires: %{python_module pandas-feather = %{version}}}
BuildRequires: %{python_module pandas-fss = %{version}}
@ -418,9 +423,7 @@ Requires: python-pytest-xdist >= 2.2.0
Requires: python-scipy >= 1.10.0
Requires: python-tables >= 3.8.0
Requires: python-tabulate >= 0.9
%if 0%{python_version_nodots} >= 310
Requires: python-xarray >= 2022.12
%endif
Requires: python-xlrd >= 2.0.1
Requires: python-zstandard >= 0.19.0
%{?with_aws:Requires: python-s3fs >= 2022.05.0}
@ -456,6 +459,7 @@ sed -i "s|'generate_version.py',|'${genpython}', 'generate_version.py',|" meson.
# don't require the PyPI data only tzdata package, we use the timezone RPM package
sed -i '/dependencies = \[/,/\]/ {/tzdata.*>=/d}' pyproject.toml
%endif
%autopatch -p1
%build
%if !%{with test}
@ -516,6 +520,11 @@ SKIP_TESTS+=" or test_maybe_promote_int_with_int"
SKIP_TESTS+=" or (test_rolling_quantile_interpolation_options and data1 and linear and 0.1)"
# overflow
SKIP_TESTS+=" or test_large_string_pyarrow"
SKIP_TESTS+=" or test_pandas_nullable_with_missing_values"
SKIP_TESTS+=" or test_pandas_nullable_without_missing_values"
# pyarrow read-only errors
SKIP_TESTS+=" or test_left_join_multi_index"
SKIP_TESTS+=" or test_join_on_single_col_dup_on_right"
# dtype mismatch
SKIP_TESTS+=" or test_frame_setitem_dask_array_into_new_col"
SKIP_TESTS+=" or test_get_indexer_arrow_dictionary_target"