Accepting request 1104661 from devel:languages:python:numeric

- update to 2.0.3:
  * Bug in Timestamp.weekday`() was returning incorrect results
    before '0000-02-29'
  * Fixed performance regression in merging on datetime-like columns
  * Fixed regression when DataFrame.to_string() creates extra space
    for string dtypes
  * Bug in DataFrame.convert_dtype() and Series.convert_dtype()
    when trying to convert ArrowDtype with dtype_backend="nullable_numpy"
  * Bug in RangeIndex.union() when using sort=True with another
    RangeIndex 
  * Bug in Series.reindex() when expanding a non-nanosecond datetime
    or timedelta
  * Bug in read_csv() when defining dtype with bool[pyarrow] for
    the "c" and "python" engines 
  * Bug in Series.str.split() and Series.str.rsplit() with expand=True 
  * Bug in indexing methods (e.g. DataFrame.__getitem__()) where
    taking the entire DataFrame/Series would raise an OverflowError
    when Copy on Write was enabled the length of the array was over
    the maximum size a 32-bit integer can hold
  * Bug when constructing a DataFrame with columns of an ArrowDtype
    with a pyarrow.dictionary type that reindexes the data
  * Bug when indexing a DataFrame or Series with an Index with a
    timestamp ArrowDtype would raise an AttributeError
- drop pandas-fix-tests.patch (upstream)

OBS-URL: https://build.opensuse.org/request/show/1104661
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pandas?expand=0&rev=53
This commit is contained in:
Ana Guerrero 2023-08-18 17:27:43 +00:00 committed by Git OBS Bridge
commit d6e140e6d9
5 changed files with 32 additions and 34 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:44f41cb263726716ff513081bf57ea62fec704f367e3fc8adb15e54991c98273
size 14036944

3
pandas-2.0.3-gh.tar.gz Normal file
View File

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

View File

@ -1,28 +0,0 @@
--- pandas-2.0.2/pandas/tests/frame/indexing/test_setitem.py.orig 2023-06-22 09:00:10.272775300 +0200
+++ pandas-2.0.2/pandas/tests/frame/indexing/test_setitem.py 2023-06-22 09:00:48.663682100 +0200
@@ -61,7 +61,8 @@ class TestDataFrameSetItem:
"dtype", ["int32", "int64", "uint32", "uint64", "float32", "float64"]
)
def test_setitem_dtype(self, dtype, float_frame):
- arr = np.random.randn(len(float_frame))
+ # Use randint since casting negative floats to uints is undefined
+ arr = np.random.randint(1, 10, len(float_frame))
float_frame[dtype] = np.array(arr, dtype=dtype)
assert float_frame[dtype].dtype.name == dtype
--- pandas-2.0.2/pandas/tests/series/methods/test_nlargest.py.orig 2023-06-22 09:02:58.788342500 +0200
+++ pandas-2.0.2/pandas/tests/series/methods/test_nlargest.py 2023-06-22 09:03:26.743975800 +0200
@@ -217,7 +217,12 @@ class TestSeriesNLargestNSmallest:
def test_nlargest_nullable(self, any_numeric_ea_dtype):
# GH#42816
dtype = any_numeric_ea_dtype
- arr = np.random.randn(10).astype(dtype.lower(), copy=False)
+ if dtype.startswith("UInt"):
+ # Can't cast from negative float to uint on some platforms
+ arr = np.random.randint(1, 10, 10)
+ else:
+ arr = np.random.randn(10)
+ arr = arr.astype(dtype.lower(), copy=False)
ser = Series(arr.copy(), dtype=dtype)
ser[1] = pd.NA

View File

@ -1,3 +1,31 @@
-------------------------------------------------------------------
Sun Aug 13 21:50:37 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.0.3:
* Bug in Timestamp.weekday`() was returning incorrect results
before '0000-02-29'
* Fixed performance regression in merging on datetime-like columns
* Fixed regression when DataFrame.to_string() creates extra space
for string dtypes
* Bug in DataFrame.convert_dtype() and Series.convert_dtype()
when trying to convert ArrowDtype with dtype_backend="nullable_numpy"
* Bug in RangeIndex.union() when using sort=True with another
RangeIndex
* Bug in Series.reindex() when expanding a non-nanosecond datetime
or timedelta
* Bug in read_csv() when defining dtype with bool[pyarrow] for
the "c" and "python" engines
* Bug in Series.str.split() and Series.str.rsplit() with expand=True
* Bug in indexing methods (e.g. DataFrame.__getitem__()) where
taking the entire DataFrame/Series would raise an OverflowError
when Copy on Write was enabled the length of the array was over
the maximum size a 32-bit integer can hold
* Bug when constructing a DataFrame with columns of an ArrowDtype
with a pyarrow.dictionary type that reindexes the data
* Bug when indexing a DataFrame or Series with an Index with a
timestamp ArrowDtype would raise an AttributeError
- drop pandas-fix-tests.patch (upstream)
-------------------------------------------------------------------
Thu Jun 22 09:36:06 UTC 2023 - Guillaume GARDET <guillaume.gardet@opensuse.org>

View File

@ -51,7 +51,7 @@
%{?sle15_python_module_pythons}
Name: python-pandas%{psuffix}
Version: 2.0.2
Version: 2.0.3
Release: 0
Summary: Python data structures for data analysis, time series, and statistics
License: BSD-3-Clause
@ -60,8 +60,6 @@ URL: https://pandas.pydata.org/
# Use GitHub Archive: Test-data
Source0: https://github.com/pandas-dev/pandas/archive/refs/tags/v%{version}.tar.gz#/pandas-%{version}-gh.tar.gz
# SourceRepository: https://github.com/pandas-dev/pandas
# https://github.com/pandas-dev/pandas/issues/53791#issuecomment-1602320315
Patch1: pandas-fix-tests.patch
BuildRequires: %{python_module Cython >= 0.29.33 with %python-Cython < 3}
BuildRequires: %{python_module devel >= 3.8}
BuildRequires: %{python_module numpy-devel >= 1.20.3}