Accepting request 1091231 from home:bnavigator:pyarrow
- Skip invalid pandas 2 test * pyarrow-pr35822-pandas2-extensiontype.patch * gh#apache/arrow#35822 * gh#apache/arrow#35839 OBS-URL: https://build.opensuse.org/request/show/1091231 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pyarrow?expand=0&rev=6
This commit is contained in:
54
pyarrow-pr35822-pandas2-extensiontype.patch
Normal file
54
pyarrow-pr35822-pandas2-extensiontype.patch
Normal file
@@ -0,0 +1,54 @@
|
||||
From 8dcbfff2f55cca5938ca6a094aab54c57d06bae0 Mon Sep 17 00:00:00 2001
|
||||
From: Joris Van den Bossche <jorisvandenbossche@gmail.com>
|
||||
Date: Tue, 25 Apr 2023 11:35:11 +0200
|
||||
Subject: [PATCH] [Python][CI] Skip extension type test failing with pandas
|
||||
2.0.1
|
||||
|
||||
---
|
||||
python/pyarrow/tests/test_extension_type.py | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/python/pyarrow/tests/test_extension_type.py b/python/pyarrow/tests/test_extension_type.py
|
||||
index 44280ca95131b..090e22a746d51 100644
|
||||
--- a/python/pyarrow/tests/test_extension_type.py
|
||||
+++ b/python/pyarrow/tests/test_extension_type.py
|
||||
@@ -1296,8 +1296,10 @@ def test_extension_to_pandas_storage_type(registered_period_type):
|
||||
assert result["ext"].dtype == pandas_dtype
|
||||
|
||||
import pandas as pd
|
||||
- if Version(pd.__version__) > Version("2.0.0"):
|
||||
-
|
||||
+ if (
|
||||
+ Version(pd.__version__) > Version("2.0.0") and
|
||||
+ Version(pd.__version__) != Version("2.0.1")
|
||||
+ ):
|
||||
# Check the usage of types_mapper
|
||||
result = table.to_pandas(types_mapper=pd.ArrowDtype)
|
||||
assert isinstance(result["ext"].dtype, pd.ArrowDtype)
|
||||
|
||||
From efe901b97911ad05e1767843add211c918983e8b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= <raulcumplido@gmail.com>
|
||||
Date: Tue, 30 May 2023 14:41:34 +0200
|
||||
Subject: [PATCH] GH-35821: [Python][CI] Skip extension type test failing with
|
||||
pandas 2.0.2
|
||||
|
||||
---
|
||||
python/pyarrow/tests/test_extension_type.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/python/pyarrow/tests/test_extension_type.py b/python/pyarrow/tests/test_extension_type.py
|
||||
index 4ef6573179e45..023968b20df46 100644
|
||||
--- a/python/pyarrow/tests/test_extension_type.py
|
||||
+++ b/python/pyarrow/tests/test_extension_type.py
|
||||
@@ -1299,9 +1299,9 @@ def test_extension_to_pandas_storage_type(registered_period_type):
|
||||
assert result["ext"].dtype == pandas_dtype
|
||||
|
||||
import pandas as pd
|
||||
+ # Skip tests for 2.0.x, See: GH-35821
|
||||
if (
|
||||
- Version(pd.__version__) > Version("2.0.0") and
|
||||
- Version(pd.__version__) != Version("2.0.1")
|
||||
+ Version(pd.__version__) >= Version("2.1.0")
|
||||
):
|
||||
# Check the usage of types_mapper
|
||||
result = table.to_pandas(types_mapper=pd.ArrowDtype)
|
||||
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 7 07:39:44 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Skip invalid pandas 2 test
|
||||
* pyarrow-pr35822-pandas2-extensiontype.patch
|
||||
* gh#apache/arrow#35822
|
||||
* gh#apache/arrow#35839
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 18 07:28:28 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ Source: https://files.pythonhosted.org/packages/source/p/pyarrow/pyarrow
|
||||
Source10: LICENSE.txt
|
||||
Source11: NOTICE.txt
|
||||
Source99: python-pyarrow.rpmlintrc
|
||||
# PATCH-FIX-UPSTREAM pyarrow-pr35822-pandas2-extensiontype.patch gh#apache/arrow#35822, gh#apache/arrow#35839
|
||||
Patch0: pyarrow-pr35822-pandas2-extensiontype.patch
|
||||
BuildRequires: %{python_module Cython >= 0.29.31}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module numpy-devel >= 1.16.6}
|
||||
@@ -93,7 +95,7 @@ This package provides the header files within the python
|
||||
platlib for consuming modules using cythonization.
|
||||
|
||||
%prep
|
||||
%setup -q -n pyarrow-%{version}
|
||||
%autosetup -p2 -n pyarrow-%{version}
|
||||
cp %{SOURCE10} %{SOURCE11} ./
|
||||
# we disabled the jemalloc backend in apache-arrow
|
||||
sed -i 's/should_have_jemalloc = sys.platform == "linux"/should_have_jemalloc = False/' pyarrow/tests/test_memory.py
|
||||
|
||||
Reference in New Issue
Block a user