Compare commits
4 Commits
public_clo
...
factory
| Author | SHA256 | Date | |
|---|---|---|---|
| c579277c74 | |||
| 0ae9364c9c | |||
| 93ae2a2ae1 | |||
| 1f436a5c27 |
8
_service
8
_service
@@ -1,16 +1,16 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<service name="tar_scm" mode="manual">
|
||||
<param name="url">https://github.com/pandas-dev/pandas.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="revision">v2.3.1</param>
|
||||
<param name="revision">v2.3.3</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="versionrewrite-pattern">v(.*)</param>
|
||||
<param name="filename">pandas</param>
|
||||
<param name="package-meta">yes</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
<service name="recompress" mode="manual">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">gz</param>
|
||||
</service>
|
||||
<service name="set_version" mode="disabled" />
|
||||
<service name="set_version" mode="manual" />
|
||||
</services>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b80d93d9d3b3863c33864b393ba1712d7bc0461720b61b799988e13f06c5ad37
|
||||
size 403715895
|
||||
3
pandas-2.3.3.tar.gz
Normal file
3
pandas-2.3.3.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:06c424fa3f1e3f4cabcedbb93b18f652f1ad76d652db5d3b63eb161afe9e157f
|
||||
size 413228464
|
||||
197
pandas-pr62553-numexpr.patch
Normal file
197
pandas-pr62553-numexpr.patch
Normal file
@@ -0,0 +1,197 @@
|
||||
From 5fc3df37d772befbdba7cc2bd3e9ce572fe607c0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Kothe?= <kothe65@gmail.com>
|
||||
Date: Fri, 3 Oct 2025 14:11:53 -0300
|
||||
Subject: [PATCH] [backport 2.3.x] TST: remove expected warnings for new
|
||||
`numexpr` version (#62553) (#62557)
|
||||
|
||||
---
|
||||
pandas/tests/frame/test_arithmetic.py | 10 +++-
|
||||
pandas/tests/series/test_arithmetic.py | 8 ++-
|
||||
pandas/tests/test_expressions.py | 76 +++++++++++++++-----------
|
||||
3 files changed, 60 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/pandas/tests/frame/test_arithmetic.py b/pandas/tests/frame/test_arithmetic.py
|
||||
index 195126f1c5382..567183e45189e 100644
|
||||
--- a/pandas/tests/frame/test_arithmetic.py
|
||||
+++ b/pandas/tests/frame/test_arithmetic.py
|
||||
@@ -12,6 +12,7 @@
|
||||
import pytest
|
||||
|
||||
from pandas.compat import HAS_PYARROW
|
||||
+from pandas.compat._optional import import_optional_dependency
|
||||
import pandas.util._test_decorators as td
|
||||
|
||||
import pandas as pd
|
||||
@@ -27,6 +28,7 @@
|
||||
_check_mixed_float,
|
||||
_check_mixed_int,
|
||||
)
|
||||
+from pandas.util.version import Version
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -1092,6 +1094,8 @@ def test_binop_other(self, op, value, dtype, switch_numexpr_min_elements):
|
||||
(operator.mod, "complex128"),
|
||||
}
|
||||
|
||||
+ ne = import_optional_dependency("numexpr", errors="ignore")
|
||||
+ ne_warns_on_op = ne is not None and Version(ne.__version__) < Version("2.13.1")
|
||||
if (op, dtype) in invalid:
|
||||
warn = None
|
||||
if (dtype == "<M8[ns]" and op == operator.add) or (
|
||||
@@ -1120,7 +1124,11 @@ def test_binop_other(self, op, value, dtype, switch_numexpr_min_elements):
|
||||
|
||||
elif (op, dtype) in skip:
|
||||
if op in [operator.add, operator.mul]:
|
||||
- if expr.USE_NUMEXPR and switch_numexpr_min_elements == 0:
|
||||
+ if (
|
||||
+ expr.USE_NUMEXPR
|
||||
+ and switch_numexpr_min_elements == 0
|
||||
+ and ne_warns_on_op
|
||||
+ ):
|
||||
# "evaluating in Python space because ..."
|
||||
warn = UserWarning
|
||||
else:
|
||||
diff --git a/pandas/tests/series/test_arithmetic.py b/pandas/tests/series/test_arithmetic.py
|
||||
index a65d7687cfb06..28f12476c9ef9 100644
|
||||
--- a/pandas/tests/series/test_arithmetic.py
|
||||
+++ b/pandas/tests/series/test_arithmetic.py
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
from pandas._libs import lib
|
||||
from pandas._libs.tslibs import IncompatibleFrequency
|
||||
+from pandas.compat._optional import import_optional_dependency
|
||||
|
||||
import pandas as pd
|
||||
from pandas import (
|
||||
@@ -26,7 +27,7 @@
|
||||
import pandas._testing as tm
|
||||
from pandas.core import ops
|
||||
from pandas.core.computation import expressions as expr
|
||||
-from pandas.core.computation.check import NUMEXPR_INSTALLED
|
||||
+from pandas.util.version import Version
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True, params=[0, 1000000], ids=["numexpr", "python"])
|
||||
@@ -353,9 +354,12 @@ def test_add_list_to_masked_array(self, val, dtype):
|
||||
|
||||
def test_add_list_to_masked_array_boolean(self, request):
|
||||
# GH#22962
|
||||
+ ne = import_optional_dependency("numexpr", errors="ignore")
|
||||
warning = (
|
||||
UserWarning
|
||||
- if request.node.callspec.id == "numexpr" and NUMEXPR_INSTALLED
|
||||
+ if request.node.callspec.id == "numexpr"
|
||||
+ and ne
|
||||
+ and Version(ne.__version__) < Version("2.13.1")
|
||||
else None
|
||||
)
|
||||
ser = Series([True, None, False], dtype="boolean")
|
||||
diff --git a/pandas/tests/test_expressions.py b/pandas/tests/test_expressions.py
|
||||
index dfec99f0786eb..1ea16f96b73e7 100644
|
||||
--- a/pandas/tests/test_expressions.py
|
||||
+++ b/pandas/tests/test_expressions.py
|
||||
@@ -4,6 +4,8 @@
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
+from pandas.compat._optional import import_optional_dependency
|
||||
+
|
||||
from pandas import option_context
|
||||
import pandas._testing as tm
|
||||
from pandas.core.api import (
|
||||
@@ -12,6 +14,7 @@
|
||||
Series,
|
||||
)
|
||||
from pandas.core.computation import expressions as expr
|
||||
+from pandas.util.version import Version
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -324,7 +327,7 @@ def test_bool_ops_raise_on_arithmetic(self, op_str, opname):
|
||||
@pytest.mark.parametrize(
|
||||
"op_str,opname", [("+", "add"), ("*", "mul"), ("-", "sub")]
|
||||
)
|
||||
- def test_bool_ops_warn_on_arithmetic(self, op_str, opname):
|
||||
+ def test_bool_ops_warn_on_arithmetic(self, op_str, opname, monkeypatch):
|
||||
n = 10
|
||||
df = DataFrame(
|
||||
{
|
||||
@@ -343,36 +346,47 @@ def test_bool_ops_warn_on_arithmetic(self, op_str, opname):
|
||||
# raises TypeError
|
||||
return
|
||||
|
||||
- with tm.use_numexpr(True, min_elements=5):
|
||||
- with tm.assert_produces_warning():
|
||||
- r = f(df, df)
|
||||
- e = fe(df, df)
|
||||
- tm.assert_frame_equal(r, e)
|
||||
-
|
||||
- with tm.assert_produces_warning():
|
||||
- r = f(df.a, df.b)
|
||||
- e = fe(df.a, df.b)
|
||||
- tm.assert_series_equal(r, e)
|
||||
-
|
||||
- with tm.assert_produces_warning():
|
||||
- r = f(df.a, True)
|
||||
- e = fe(df.a, True)
|
||||
- tm.assert_series_equal(r, e)
|
||||
-
|
||||
- with tm.assert_produces_warning():
|
||||
- r = f(False, df.a)
|
||||
- e = fe(False, df.a)
|
||||
- tm.assert_series_equal(r, e)
|
||||
-
|
||||
- with tm.assert_produces_warning():
|
||||
- r = f(False, df)
|
||||
- e = fe(False, df)
|
||||
- tm.assert_frame_equal(r, e)
|
||||
-
|
||||
- with tm.assert_produces_warning():
|
||||
- r = f(df, True)
|
||||
- e = fe(df, True)
|
||||
- tm.assert_frame_equal(r, e)
|
||||
+ msg = "operator is not supported by numexpr"
|
||||
+ ne = import_optional_dependency("numexpr", errors="ignore")
|
||||
+ warning = (
|
||||
+ UserWarning
|
||||
+ if ne
|
||||
+ and op_str in {"+", "*"}
|
||||
+ and Version(ne.__version__) < Version("2.13.1")
|
||||
+ else None
|
||||
+ )
|
||||
+ with monkeypatch.context() as m:
|
||||
+ m.setattr(expr, "_MIN_ELEMENTS", 5)
|
||||
+ with option_context("compute.use_numexpr", True):
|
||||
+ with tm.assert_produces_warning(warning, match=msg):
|
||||
+ r = f(df, df)
|
||||
+ e = fe(df, df)
|
||||
+ tm.assert_frame_equal(r, e)
|
||||
+
|
||||
+ with tm.assert_produces_warning(warning, match=msg):
|
||||
+ r = f(df.a, df.b)
|
||||
+ e = fe(df.a, df.b)
|
||||
+ tm.assert_series_equal(r, e)
|
||||
+
|
||||
+ with tm.assert_produces_warning(warning, match=msg):
|
||||
+ r = f(df.a, True)
|
||||
+ e = fe(df.a, True)
|
||||
+ tm.assert_series_equal(r, e)
|
||||
+
|
||||
+ with tm.assert_produces_warning(warning, match=msg):
|
||||
+ r = f(False, df.a)
|
||||
+ e = fe(False, df.a)
|
||||
+ tm.assert_series_equal(r, e)
|
||||
+
|
||||
+ with tm.assert_produces_warning(warning, match=msg):
|
||||
+ r = f(False, df)
|
||||
+ e = fe(False, df)
|
||||
+ tm.assert_frame_equal(r, e)
|
||||
+
|
||||
+ with tm.assert_produces_warning(warning, match=msg):
|
||||
+ r = f(df, True)
|
||||
+ e = fe(df, True)
|
||||
+ tm.assert_frame_equal(r, e)
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"test_input,expected",
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pandas
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -37,6 +37,9 @@
|
||||
%if "%{flavor}" != "test-py313"
|
||||
%define skip_python313 1
|
||||
%endif
|
||||
%if "%{flavor}" != "test-py314"
|
||||
%define skip_python314 1
|
||||
%endif
|
||||
# Skip empty buildsets on tumbleweed or flavors other than python311 on leap with sle15_python_module_pythons
|
||||
%if "%{shrink:%{pythons}}" == "" || ("%pythons" == "python311" && 0%{?skip_python311})
|
||||
ExclusiveArch: donotbuild
|
||||
@@ -58,13 +61,13 @@ ExclusiveArch: donotbuild
|
||||
# depend/not depend on python-pyarrow and apache-arrow [bsc#1218592]
|
||||
%bcond_without pyarrow
|
||||
|
||||
%if %{suse_version} <= 1500
|
||||
%if 0%{?suse_version} && %{suse_version} <= 1500
|
||||
# requires __has_builtin with keywords
|
||||
%define gccver 13
|
||||
%define gccver 14
|
||||
%endif
|
||||
Name: python-pandas%{psuffix}
|
||||
# Set version through _service
|
||||
Version: 2.3.1
|
||||
Version: 2.3.3
|
||||
Release: 0
|
||||
Summary: Python data structures for data analysis, time series, and statistics
|
||||
License: BSD-3-Clause
|
||||
@@ -74,11 +77,13 @@ URL: https://pandas.pydata.org/
|
||||
Source0: pandas-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM pandas-pr61132-dropna.patch gh#pandas-dev/pandas#61132 BUG: .mode(dropna=False) doesn't work with nullable integers
|
||||
Patch1: pandas-pr61132-dropna.patch
|
||||
# PATCH-FIX-UPSTREAM pandas-pr62553-numexpr.patch gh#pandas-dev/pandas#62553 TST: remove expected warnings for new numexpr version
|
||||
Patch2: pandas-pr62553-numexpr.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.26}
|
||||
BuildRequires: %{python_module numpy-devel >= 1.22.4}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module versioneer-toml}
|
||||
BuildRequires: %{python_module wheel}
|
||||
@@ -99,7 +104,7 @@ Requires: python-numpy >= 1.22.4
|
||||
%if 0%{python_version_nodots} == 311
|
||||
Requires: python-numpy >= 1.23.2
|
||||
%else
|
||||
Requires: python-numpy >= 1.26
|
||||
Requires: python-numpy >= 1.26.0
|
||||
%endif
|
||||
%endif
|
||||
# SECTION extras
|
||||
@@ -206,7 +211,7 @@ provide speed improvements, especially when working with large data sets.
|
||||
%package computation
|
||||
Summary: The python pandas[computation] extra
|
||||
Requires: python-pandas = %{version}
|
||||
Requires: python-scipy >= 1.10.0
|
||||
Requires: python-scipy >= 1.12.0
|
||||
Requires: python-xarray >= 2022.12.0
|
||||
BuildArch: noarch
|
||||
|
||||
@@ -215,7 +220,7 @@ This package provides the [computation] extra for python-pandas
|
||||
|
||||
%package fss
|
||||
Summary: The python pandas[fss] extra
|
||||
Requires: python-fsspec >= 2022.11
|
||||
Requires: python-fsspec >= 2023.12.2
|
||||
Requires: python-pandas = %{version}
|
||||
BuildArch: noarch
|
||||
|
||||
@@ -407,7 +412,7 @@ Requires: python-beautifulsoup4 >= 4.11.2
|
||||
Requires: python-blosc
|
||||
%{?with_calamine:Requires: python-calamine >= 0.1.7}
|
||||
%{?with_pyarrow:Requires: python-fastparquet >= 2022.12}
|
||||
Requires: python-fsspec >= 2022.11
|
||||
Requires: python-fsspec >= 2023.12.2
|
||||
Requires: python-gcsfs >= 2022.11
|
||||
Requires: python-html5lib >= 1.1
|
||||
Requires: python-hypothesis >= 6.46.1
|
||||
@@ -423,7 +428,7 @@ Requires: python-psycopg2 >= 2.9.6
|
||||
Requires: python-pyreadstat >= 1.2.0
|
||||
Requires: python-pytest >= 7.3.2
|
||||
Requires: python-pytest-xdist >= 2.2.0
|
||||
Requires: python-scipy >= 1.10.0
|
||||
Requires: python-scipy >= 1.12.0
|
||||
Requires: python-tables >= 3.8.0
|
||||
Requires: python-tabulate >= 0.9
|
||||
Requires: python-xarray >= 2022.12
|
||||
|
||||
Reference in New Issue
Block a user