Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pandas for openSUSE:Factory 
checked in at 2023-06-23 21:52:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pandas (Old)
 and      /work/SRC/openSUSE:Factory/.python-pandas.new.15902 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pandas"

Fri Jun 23 21:52:06 2023 rev:52 rq:1094649 version:2.0.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pandas/python-pandas.changes      
2023-06-13 16:08:46.666626223 +0200
+++ /work/SRC/openSUSE:Factory/.python-pandas.new.15902/python-pandas.changes   
2023-06-23 21:52:11.974485451 +0200
@@ -1,0 +2,6 @@
+Thu Jun 22 09:36:06 UTC 2023 - Guillaume GARDET <guillaume.gar...@opensuse.org>
+
+- Fix tests on aarch64:
+  * pandas-fix-tests.patch
+
+-------------------------------------------------------------------

New:
----
  pandas-fix-tests.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pandas.spec ++++++
--- /var/tmp/diff_new_pack.FqjYgK/_old  2023-06-23 21:52:12.694489361 +0200
+++ /var/tmp/diff_new_pack.FqjYgK/_new  2023-06-23 21:52:12.698489383 +0200
@@ -60,6 +60,8 @@
 # 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}

++++++ pandas-fix-tests.patch ++++++
--- 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

Reply via email to