Accepting request 1110188 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1110188 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pandas?expand=0&rev=55
This commit is contained in:
commit
c543d32990
70
pandas-pr55073-pyarrow13.patch
Normal file
70
pandas-pr55073-pyarrow13.patch
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
From 613e9aa49936cd941e631f8d6ec3ea557f94cc30 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ben Greiner <code@bnavigator.de>
|
||||||
|
Date: Fri, 8 Sep 2023 22:33:47 +0200
|
||||||
|
Subject: [PATCH] Backport PR #55048: COMPAT: bump pyarrow min version for div
|
||||||
|
on duration
|
||||||
|
|
||||||
|
---
|
||||||
|
pandas/compat/__init__.py | 2 ++
|
||||||
|
pandas/compat/pyarrow.py | 2 ++
|
||||||
|
pandas/tests/extension/test_arrow.py | 3 ++-
|
||||||
|
3 files changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/pandas/compat/__init__.py b/pandas/compat/__init__.py
|
||||||
|
index be0a762642e46..684e9dccdc0f9 100644
|
||||||
|
--- a/pandas/compat/__init__.py
|
||||||
|
+++ b/pandas/compat/__init__.py
|
||||||
|
@@ -30,6 +30,7 @@
|
||||||
|
pa_version_under9p0,
|
||||||
|
pa_version_under11p0,
|
||||||
|
pa_version_under13p0,
|
||||||
|
+ pa_version_under14p0,
|
||||||
|
)
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
@@ -186,6 +187,7 @@ def get_bz2_file() -> type[pandas.compat.compressors.BZ2File]:
|
||||||
|
"pa_version_under9p0",
|
||||||
|
"pa_version_under11p0",
|
||||||
|
"pa_version_under13p0",
|
||||||
|
+ "pa_version_under14p0",
|
||||||
|
"IS64",
|
||||||
|
"ISMUSL",
|
||||||
|
"PY310",
|
||||||
|
diff --git a/pandas/compat/pyarrow.py b/pandas/compat/pyarrow.py
|
||||||
|
index 049ce50920e28..12f58be109d98 100644
|
||||||
|
--- a/pandas/compat/pyarrow.py
|
||||||
|
+++ b/pandas/compat/pyarrow.py
|
||||||
|
@@ -15,6 +15,7 @@
|
||||||
|
pa_version_under11p0 = _palv < Version("11.0.0")
|
||||||
|
pa_version_under12p0 = _palv < Version("12.0.0")
|
||||||
|
pa_version_under13p0 = _palv < Version("13.0.0")
|
||||||
|
+ pa_version_under14p0 = _palv < Version("14.0.0")
|
||||||
|
except ImportError:
|
||||||
|
pa_version_under7p0 = True
|
||||||
|
pa_version_under8p0 = True
|
||||||
|
@@ -23,3 +24,4 @@
|
||||||
|
pa_version_under11p0 = True
|
||||||
|
pa_version_under12p0 = True
|
||||||
|
pa_version_under13p0 = True
|
||||||
|
+ pa_version_under14p0 = True
|
||||||
|
diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py
|
||||||
|
index ec2ca494b2aa1..d6e75a57f71e7 100644
|
||||||
|
--- a/pandas/tests/extension/test_arrow.py
|
||||||
|
+++ b/pandas/tests/extension/test_arrow.py
|
||||||
|
@@ -40,6 +40,7 @@
|
||||||
|
pa_version_under9p0,
|
||||||
|
pa_version_under11p0,
|
||||||
|
pa_version_under13p0,
|
||||||
|
+ pa_version_under14p0,
|
||||||
|
)
|
||||||
|
|
||||||
|
from pandas.core.dtypes.dtypes import (
|
||||||
|
@@ -951,7 +952,7 @@ def _is_temporal_supported(self, opname, pa_dtype):
|
||||||
|
or (
|
||||||
|
opname
|
||||||
|
in ("__truediv__", "__rtruediv__", "__floordiv__", "__rfloordiv__")
|
||||||
|
- and not pa_version_under13p0
|
||||||
|
+ and not pa_version_under14p0
|
||||||
|
)
|
||||||
|
)
|
||||||
|
and pa.types.is_duration(pa_dtype)
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Sep 10 13:10:06 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Fix test failures with pyarrow 13
|
||||||
|
* Add pandas-pr55073-pyarrow13.patch
|
||||||
|
* gh#pandas-dev/pandas#55073
|
||||||
|
* gh#pandas-dev/pandas#55048
|
||||||
|
* gh#pandas-dev/pandas#55020
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 5 21:02:37 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
Tue Sep 5 21:02:37 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -62,6 +62,8 @@ URL: https://pandas.pydata.org/
|
|||||||
# SourceRepository: https://github.com/pandas-dev/pandas
|
# 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
|
# Must be created by cloning through `osc service runall`: gh#pandas-dev/pandas#54903, gh#pandas-dev/pandas#54907
|
||||||
Source0: pandas-%{version}.tar.gz
|
Source0: pandas-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM pandas-pr55073-pyarrow13.patch gh#pandas-dev/pandas#55073 gh#pandas-dev/pandas#55048
|
||||||
|
Patch0: https://github.com/pandas-dev/pandas/pull/55073.patch#/pandas-pr55073-pyarrow13.patch
|
||||||
BuildRequires: %{python_module Cython >= 0.29.33 with %python-Cython < 3}
|
BuildRequires: %{python_module Cython >= 0.29.33 with %python-Cython < 3}
|
||||||
BuildRequires: %{python_module devel >= 3.9}
|
BuildRequires: %{python_module devel >= 3.9}
|
||||||
BuildRequires: %{python_module meson-python >= 0.13.1}
|
BuildRequires: %{python_module meson-python >= 0.13.1}
|
||||||
@ -421,6 +423,7 @@ sed -i "s|'python', 'generate_version.py',|'${firstpython3}', 'generate_version.
|
|||||||
# don't require the PyPI data only tzdata package, we use the timezone RPM package
|
# don't require the PyPI data only tzdata package, we use the timezone RPM package
|
||||||
sed -i '/dependencies = \[/,/\]/ {/tzdata.*>=/d}' pyproject.toml
|
sed -i '/dependencies = \[/,/\]/ {/tzdata.*>=/d}' pyproject.toml
|
||||||
%endif
|
%endif
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if !%{with test}
|
%if !%{with test}
|
||||||
|
Loading…
Reference in New Issue
Block a user