Accepting request 1226927 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1226927 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pandas?expand=0&rev=72
This commit is contained in:
commit
4aba75120f
@ -2,4 +2,5 @@
|
|||||||
<package>test-py310</package>
|
<package>test-py310</package>
|
||||||
<package>test-py311</package>
|
<package>test-py311</package>
|
||||||
<package>test-py312</package>
|
<package>test-py312</package>
|
||||||
|
<package>test-py313</package>
|
||||||
</multibuild>
|
</multibuild>
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 27 12:26:36 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Drop tests-nomkl.patch and tests-wasm.patch, not needed anymore
|
||||||
|
- Skip a test failing with new xarray
|
||||||
|
|
||||||
|
------------------------------------------------------------------
|
||||||
Fri Oct 25 05:19:49 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
Fri Oct 25 05:19:49 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
- Skip two tests that fail with Numpy 2.1.
|
- Skip two tests that fail with Numpy 2.1.
|
||||||
|
@ -72,10 +72,6 @@ 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 gh#pandas-dev/pandas#1044cf44
|
|
||||||
Patch0: tests-nomkl.patch
|
|
||||||
# PATCH-FIX-UPSTREAM tiny part of gh#pandas-dev/pandas#4f743f98
|
|
||||||
Patch1: tests-wasm.patch
|
|
||||||
%if !%{with test}
|
%if !%{with test}
|
||||||
BuildRequires: %{python_module Cython >= 3.0.5}
|
BuildRequires: %{python_module Cython >= 3.0.5}
|
||||||
BuildRequires: %{python_module devel >= 3.9}
|
BuildRequires: %{python_module devel >= 3.9}
|
||||||
@ -524,6 +520,8 @@ SKIP_TESTS+=" or test_array_inference[data7-expected7]"
|
|||||||
# numpy 2.1 issues?
|
# numpy 2.1 issues?
|
||||||
SKIP_TESTS+=" or test_frame_setitem_dask_array_into_new_col"
|
SKIP_TESTS+=" or test_frame_setitem_dask_array_into_new_col"
|
||||||
SKIP_TESTS+=" or test_from_obscure_array"
|
SKIP_TESTS+=" or test_from_obscure_array"
|
||||||
|
# too new xarray https://github.com/pandas-dev/pandas/pull/60109
|
||||||
|
SKIP_TESTS+=" or (TestDataFrameToXArray and test_to_xarray_index_types)"
|
||||||
|
|
||||||
%ifarch %{ix86} %{arm32}
|
%ifarch %{ix86} %{arm32}
|
||||||
# https://github.com/pandas-dev/pandas/issues/31856
|
# https://github.com/pandas-dev/pandas/issues/31856
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
Binary files pandas-2.2.3.orig/.git/index and pandas-2.2.3/.git/index differ
|
|
||||||
diff -Nru pandas-2.2.3.orig/pandas/tests/indexes/interval/test_interval_tree.py pandas-2.2.3/pandas/tests/indexes/interval/test_interval_tree.py
|
|
||||||
--- pandas-2.2.3.orig/pandas/tests/indexes/interval/test_interval_tree.py 2024-09-20 12:21:50.000000000 +0000
|
|
||||||
+++ pandas-2.2.3/pandas/tests/indexes/interval/test_interval_tree.py 2024-10-01 12:32:47.570061987 +0000
|
|
||||||
@@ -4,7 +4,10 @@
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
from pandas._libs.interval import IntervalTree
|
|
||||||
-from pandas.compat import IS64
|
|
||||||
+from pandas.compat import (
|
|
||||||
+ IS64,
|
|
||||||
+ WASM,
|
|
||||||
+)
|
|
||||||
|
|
||||||
import pandas._testing as tm
|
|
||||||
|
|
||||||
@@ -190,6 +193,7 @@
|
|
||||||
expected = (50 + np.iinfo(np.int64).max) / 2
|
|
||||||
assert result == expected
|
|
||||||
|
|
||||||
+ @pytest.mark.xfail(WASM, reason="GH 23440")
|
|
||||||
@pytest.mark.parametrize(
|
|
||||||
"left, right, expected",
|
|
||||||
[
|
|
||||||
diff -Nru pandas-2.2.3.orig/pandas/tests/indexing/interval/test_interval_new.py pandas-2.2.3/pandas/tests/indexing/interval/test_interval_new.py
|
|
||||||
--- pandas-2.2.3.orig/pandas/tests/indexing/interval/test_interval_new.py 2024-09-20 12:21:50.000000000 +0000
|
|
||||||
+++ pandas-2.2.3/pandas/tests/indexing/interval/test_interval_new.py 2024-10-01 12:34:25.510718974 +0000
|
|
||||||
@@ -3,6 +3,8 @@
|
|
||||||
import numpy as np
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
+from pandas.compat import WASM
|
|
||||||
+
|
|
||||||
from pandas import (
|
|
||||||
Index,
|
|
||||||
Interval,
|
|
||||||
@@ -208,7 +210,7 @@
|
|
||||||
with pytest.raises(KeyError, match=r"\[6\]"):
|
|
||||||
obj.loc[[4, 5, 6]]
|
|
||||||
|
|
||||||
-
|
|
||||||
+@pytest.mark.xfail(WASM, reason="GH 23440")
|
|
||||||
@pytest.mark.parametrize(
|
|
||||||
"intervals",
|
|
||||||
[
|
|
||||||
diff -Nru pandas-2.2.3.orig/pandas/tests/indexing/interval/test_interval.py pandas-2.2.3/pandas/tests/indexing/interval/test_interval.py
|
|
||||||
--- pandas-2.2.3.orig/pandas/tests/indexing/interval/test_interval.py 2024-09-20 12:21:50.000000000 +0000
|
|
||||||
+++ pandas-2.2.3/pandas/tests/indexing/interval/test_interval.py 2024-10-01 12:33:50.518484555 +0000
|
|
||||||
@@ -2,6 +2,7 @@
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
from pandas._libs import index as libindex
|
|
||||||
+from pandas.compat import WASM
|
|
||||||
|
|
||||||
import pandas as pd
|
|
||||||
from pandas import (
|
|
||||||
@@ -35,6 +36,7 @@
|
|
||||||
expected = ser.iloc[2:5]
|
|
||||||
tm.assert_series_equal(expected, indexer_sl(ser)[ser >= 2])
|
|
||||||
|
|
||||||
+ @pytest.mark.xfail(WASM, reason="GH 23440")
|
|
||||||
@pytest.mark.parametrize("direction", ["increasing", "decreasing"])
|
|
||||||
def test_getitem_nonoverlapping_monotonic(self, direction, closed, indexer_sl):
|
|
||||||
tpls = [(0, 1), (2, 3), (4, 5)]
|
|
138
tests-wasm.patch
138
tests-wasm.patch
@ -1,138 +0,0 @@
|
|||||||
From 4f743f98649ce1fc17a57f7b02d81f7cc172dff6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
|
|
||||||
Date: Wed, 8 May 2024 22:21:57 +0530
|
|
||||||
Subject: [PATCH] BLD, TST: Build and test Pyodide wheels for `pandas` in CI
|
|
||||||
(#57896)
|
|
||||||
|
|
||||||
* Create initial Pyodide workflow
|
|
||||||
|
|
||||||
* Do not import pandas folder from the repo
|
|
||||||
|
|
||||||
* Install hypothesis for testing
|
|
||||||
|
|
||||||
* Add pytest decorator to skip tests on WASM
|
|
||||||
|
|
||||||
* Skip `time.tzset()` tests on WASM platforms
|
|
||||||
|
|
||||||
* Skip file system access tests on WASM
|
|
||||||
|
|
||||||
* Skip two more tzset test failures
|
|
||||||
|
|
||||||
* Skip two more FS failures on WASM
|
|
||||||
|
|
||||||
* Resolve last two tzset failures on WASM
|
|
||||||
|
|
||||||
* Add a `WASM` constant for Emscripten platform checks
|
|
||||||
|
|
||||||
* Fix floating point imprecision with `np.timedelta64`
|
|
||||||
|
|
||||||
* Mark tz OverflowError as xfail on WASM
|
|
||||||
|
|
||||||
* Try to fix OverflowError with date ranges
|
|
||||||
|
|
||||||
* Move job to unit tests workflow, withdraw env vars
|
|
||||||
|
|
||||||
* Fix up a few style errors, use WASM variable
|
|
||||||
|
|
||||||
* Bump Pyodide to `0.25.1`
|
|
||||||
|
|
||||||
See https://github.com/pyodide/pyodide/pull/4654 for
|
|
||||||
more discussion. This commit resolves a build error
|
|
||||||
coming from the `pyodide build` command which
|
|
||||||
broke due to a new `build` release by PyPA.
|
|
||||||
|
|
||||||
* Use shorter job name
|
|
||||||
|
|
||||||
* Skip test where warning is not raised properly
|
|
||||||
|
|
||||||
* Don't run `test_date_time` loc check on WASM
|
|
||||||
|
|
||||||
* Don't run additional loc checks in `test_sas7bdat`
|
|
||||||
|
|
||||||
* Disable WASM OverflowError
|
|
||||||
|
|
||||||
* Skip tests requiring fp exception support
|
|
||||||
|
|
||||||
* xfail tests that require stricter tolerances
|
|
||||||
|
|
||||||
* xfail test where `OverflowError`s are received
|
|
||||||
|
|
||||||
* Remove upper-pin from `pydantic`
|
|
||||||
|
|
||||||
* Better skip messages via `pytest.skipif` decorator
|
|
||||||
|
|
||||||
* Import `WASM` var via public API where possible
|
|
||||||
|
|
||||||
* Unpin `pytest` for Pyodide job
|
|
||||||
|
|
||||||
* Add reason attr when using boolean to skip test
|
|
||||||
|
|
||||||
* Don't xfail, skip tests that bring `OverflowError`s
|
|
||||||
|
|
||||||
* Skip timedelta test that runs well only on 64-bit
|
|
||||||
|
|
||||||
* Skip tests that use `np.timedelta64`
|
|
||||||
|
|
||||||
---------
|
|
||||||
|
|
||||||
Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
|
|
||||||
---
|
|
||||||
.github/workflows/unit-tests.yml | 61 ++++++++++++++++++-
|
|
||||||
pandas/compat/__init__.py | 2 +
|
|
||||||
pandas/compat/_constants.py | 2 +
|
|
||||||
pandas/tests/apply/test_str.py | 3 +
|
|
||||||
pandas/tests/arithmetic/test_timedelta64.py | 2 +
|
|
||||||
.../datetimes/methods/test_normalize.py | 4 ++
|
|
||||||
.../datetimes/methods/test_resolution.py | 8 ++-
|
|
||||||
.../io/parser/common/test_file_buffer_url.py | 3 +
|
|
||||||
pandas/tests/io/parser/test_c_parser_only.py | 21 ++++---
|
|
||||||
pandas/tests/io/sas/test_sas7bdat.py | 9 ++-
|
|
||||||
pandas/tests/io/test_common.py | 10 ++-
|
|
||||||
pandas/tests/io/xml/test_xml.py | 2 +
|
|
||||||
.../scalar/timestamp/methods/test_replace.py | 3 +
|
|
||||||
.../methods/test_timestamp_method.py | 3 +
|
|
||||||
pandas/tests/scalar/timestamp/test_formats.py | 3 +
|
|
||||||
pandas/tests/tools/test_to_datetime.py | 6 +-
|
|
||||||
pandas/tests/tools/test_to_timedelta.py | 6 +-
|
|
||||||
pandas/tests/tseries/offsets/test_common.py | 8 ++-
|
|
||||||
pandas/tests/tslibs/test_parsing.py | 2 +
|
|
||||||
pandas/util/_test_decorators.py | 5 ++
|
|
||||||
20 files changed, 146 insertions(+), 17 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pandas/compat/__init__.py b/pandas/compat/__init__.py
|
|
||||||
index 572dd8c9b61a0..4583e7edebbdc 100644
|
|
||||||
--- a/pandas/compat/__init__.py
|
|
||||||
+++ b/pandas/compat/__init__.py
|
|
||||||
@@ -22,6 +22,7 @@
|
|
||||||
PY311,
|
|
||||||
PY312,
|
|
||||||
PYPY,
|
|
||||||
+ WASM,
|
|
||||||
)
|
|
||||||
import pandas.compat.compressors
|
|
||||||
from pandas.compat.numpy import is_numpy_dev
|
|
||||||
@@ -207,4 +208,5 @@ def get_bz2_file() -> type[pandas.compat.compressors.BZ2File]:
|
|
||||||
"PY311",
|
|
||||||
"PY312",
|
|
||||||
"PYPY",
|
|
||||||
+ "WASM",
|
|
||||||
]
|
|
||||||
diff --git a/pandas/compat/_constants.py b/pandas/compat/_constants.py
|
|
||||||
index 7bc3fbaaefebf..2625389e5254a 100644
|
|
||||||
--- a/pandas/compat/_constants.py
|
|
||||||
+++ b/pandas/compat/_constants.py
|
|
||||||
@@ -17,6 +17,7 @@
|
|
||||||
PY311 = sys.version_info >= (3, 11)
|
|
||||||
PY312 = sys.version_info >= (3, 12)
|
|
||||||
PYPY = platform.python_implementation() == "PyPy"
|
|
||||||
+WASM = (sys.platform == "emscripten") or (platform.machine() in ["wasm32", "wasm64"])
|
|
||||||
ISMUSL = "musl" in (sysconfig.get_config_var("HOST_GNU_TYPE") or "")
|
|
||||||
REF_COUNT = 2 if PY311 else 3
|
|
||||||
|
|
||||||
@@ -27,4 +28,5 @@
|
|
||||||
"PY311",
|
|
||||||
"PY312",
|
|
||||||
"PYPY",
|
|
||||||
+ "WASM",
|
|
||||||
]
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user