21 Commits

Author SHA256 Message Date
6789fc612d Accepting request 1199479 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1199479
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pandas?expand=0&rev=69
2024-09-10 19:12:17 +00:00
60349b6793 - Drop pandas-pr58720-xarray-dp.patch: It does no longer xfail
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pandas?expand=0&rev=127
2024-09-08 16:12:30 +00:00
84dd2bde95 Accepting request 1197229 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1197229
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pandas?expand=0&rev=68
2024-08-30 11:25:55 +00:00
75f85e65a8 - Skip overflowing tests on 32-bit
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pandas?expand=0&rev=125
2024-08-29 04:05:54 +00:00
790978b920 PyTables is finally np2 compatible.
- Add pandas-pr59353-np2eval.patch
  * gh#pandas-dev/pandas#59353
  * gh#pandas-dev/pandas#58548

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pandas?expand=0&rev=124
2024-08-28 02:53:17 +00:00
45d1f08bf7 Accepting request 1187906 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1187906
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pandas?expand=0&rev=67
2024-07-17 13:14:18 +00:00
764bd51d96 - Add pandas-pr59175-matplotlib.patch -- gh#pandas-dev/pandas#59175
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pandas?expand=0&rev=122
2024-07-16 12:12:22 +00:00
8224719555 Accepting request 1179390 from devel:languages:python:numeric
- Add pandas-pr58269-pyarrow16xpass.patch
  (gh#pandas-dev/pandas!58269)
- Add pandas-pr58720-xarray-dp.patch
  (gh#pandas-dev/pandas!58720), which makes pandas compatible
  with the modern xarray
- Add pandas-pr58484-matplotlib.patch
  (gh#pandas-dev/pandas!58484), which makes pandas compatible
  with the modern matplotlib
- Skip also test_plot_scatter_shape (gh#pandas-dev/pandas#58851)

OBS-URL: https://build.opensuse.org/request/show/1179390
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pandas?expand=0&rev=66
2024-06-09 18:18:43 +00:00
e8a960e9a2 - Skip also test_plot_scatter_shape (gh#pandas-dev/pandas#58851)
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pandas?expand=0&rev=120
2024-06-07 17:58:35 +00:00
8946b05778 - Add pandas-pr58269-pyarrow16xpass.patch
(gh#pandas-dev/pandas!58269)
- Add pandas-pr58720-xarray-dp.patch
  (gh#pandas-dev/pandas!58720), which makes pandas compatible
  with the modern xarray
- Add pandas-pr58484-matplotlib.patch
  (gh#pandas-dev/pandas!58484), which makes pandas compatible
  with the modern matplotlib

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pandas?expand=0&rev=119
2024-06-07 16:33:39 +00:00
12cdb27e5b Accepting request 1173512 from devel:languages:python:numeric
- Reverting, apparently it was a bad idea.

- Skip build on Python 3.10 ... too many dependencies are missing.

OBS-URL: https://build.opensuse.org/request/show/1173512
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pandas?expand=0&rev=65
2024-05-13 15:57:37 +00:00
dc27535a17 - Reverting, apparently it was a bad idea.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pandas?expand=0&rev=117
2024-05-12 17:57:54 +00:00
489eb0fe0b - Skip build on Python 3.10 ... too many dependencies are missing.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pandas?expand=0&rev=116
2024-05-09 23:45:09 +00:00
e543de2338 Accepting request 1172106 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1172106
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pandas?expand=0&rev=64
2024-05-07 16:02:13 +00:00
1654daaf58 Accepting request 1171775 from home:bnavigator:branches:devel:languages:python:numeric
- Update to 2.2.2
  * Pandas 2.2.2 is now compatible with numpy 2.0
  * Pandas 2.2.2 is the first version of pandas that is generally
    compatible with the upcoming numpy 2.0 release, and wheels for
    pandas 2.2.2 will work with both numpy 1.x and 2.x. One major
    caveat is that arrays created with numpy 2.0’s new StringDtype
    will convert to object dtyped arrays upon Series/DataFrame
    creation. Full support for numpy 2.0’s StringDtype is expected
    to land in pandas 3.0.
  * As usual please report any bugs discovered to our issue tracker
  ## Fixed regressions
  * DataFrame.__dataframe__() was producing incorrect data buffers
    when the a column’s type was a pandas nullable on with missing
    values (GH 56702)
  * DataFrame.__dataframe__() was producing incorrect data buffers
    when the a column’s type was a pyarrow nullable on with missing
    values (GH 57664)
  * Avoid issuing a spurious DeprecationWarning when a custom
    DataFrame or Series subclass method is called (GH 57553)
  * Fixed regression in precision of to_datetime() with string and
    unit input (GH 57051)
  ## Bug fixes
  * DataFrame.__dataframe__() was producing incorrect data buffers
    when the column’s type was nullable boolean (GH 55332)
  * DataFrame.__dataframe__() was showing bytemask instead of
    bitmask for 'string[pyarrow]' validity buffer (GH 57762)
  * DataFrame.__dataframe__() was showing non-null validity buffer
    (instead of None) 'string[pyarrow]' without missing values (GH
    57761)
  * DataFrame.to_sql() was failing to find the right table when
    using the schema argument (GH 57539)
- Remove obsolete python39 multibuild
- Add pandas-pr58269-pyarrow16xpass.patch
  gh#pandas-dev/pandas#58269

OBS-URL: https://build.opensuse.org/request/show/1171775
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pandas?expand=0&rev=114
2024-05-06 08:07:03 +00:00
169c9e24ec Accepting request 1155222 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1155222
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pandas?expand=0&rev=63
2024-03-06 22:03:00 +00:00
38bd51831f Accepting request 1155210 from home:bnavigator:branches:devel:languages:python:numeric
- No xarrary for python 3.9 anymore: Remove from pandas[all] and
  exclude pandas[computation]. Reenable testing to check it.
  It will be skipped automatically when python39 is dropped from
  Tumbleweed globally.
- Fix 15.x build: requires newer compiler
- Fix 15.x test skips: sle15_python_module_pythons needs to be
  declared earlier

OBS-URL: https://build.opensuse.org/request/show/1155210
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pandas?expand=0&rev=112
2024-03-05 14:09:14 +00:00
d5a9405122 Accepting request 1152290 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1152290
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pandas?expand=0&rev=62
2024-02-28 18:45:15 +00:00
1983426e6e Accepting request 1152058 from home:bnavigator:branches:science
- Update to 2.2.1
  ## Enhancements
  * Added pyarrow pip extra so users can install pandas and pyarrow
    with pip with pip install pandas[pyarrow] (#54466)
  ## Fixed regressions
  * Fixed memory leak in `read_csv` (#57039)
  * Fixed performance regression in `Series.combine_first` (#55845)
  * Fixed regression causing overflow for near-minimum timestamps
    (#57150)
  * Fixed regression in `concat` changing long-standing behavior
    that always sorted the non-concatenation axis when the axis was
    a `DatetimeIndex` (#57006)
  * Fixed regression in `merge_ordered` raising TypeError for
    fill_method="ffill" and how="left" (#57010)
  * Fixed regression in `pandas.testing.assert_series_equal`
    defaulting to check_exact=True when checking the `Index`
    (#57067)
  * Fixed regression in `read_json` where an `Index` would be
    returned instead of a `RangeIndex` (#57429)
  * Fixed regression in `wide_to_long` raising an AttributeError
    for string columns (#57066)
  * Fixed regression in `.DataFrameGroupBy.idxmin`,
    `.DataFrameGroupBy.idxmax`, `.SeriesGroupBy.idxmin`,
    `.SeriesGroupBy.idxmax` ignoring the skipna argument (#57040)
  * Fixed regression in `.DataFrameGroupBy.idxmin`,
    `.DataFrameGroupBy.idxmax`, `.SeriesGroupBy.idxmin`,
    `.SeriesGroupBy.idxmax` where values containing the minimum or
    maximum value for the dtype could produce incorrect results
    (#57040)
  * Fixed regression in `CategoricalIndex.difference` raising
    KeyError when other contains null values other than NaN
    (#57318)
  * Fixed regression in `DataFrame.groupby` raising ValueError when
    grouping by a `Series` in some cases (#57276)
  * Fixed regression in `DataFrame.loc` raising IndexError for
    non-unique, masked dtype indexes where result has more than
    10,000 rows (#57027)
  * Fixed regression in `DataFrame.loc` which was unnecessarily
    throwing "incompatible dtype warning" when expanding with
    partial row indexer and multiple columns (see PDEP6) (#56503)
  * Fixed regression in `DataFrame.map` with na_action="ignore" not
    being respected for NumPy nullable and `ArrowDtypes` (#57316)
  * Fixed regression in `DataFrame.merge` raising ValueError for
    certain types of 3rd-party extension arrays (#57316)
  * Fixed regression in `DataFrame.query` with all NaT column with
    object dtype (#57068)
  * Fixed regression in `DataFrame.shift` raising AssertionError
    for axis=1 and empty `DataFrame` (#57301)
  * Fixed regression in `DataFrame.sort_index` not producing a
    stable sort for a index with duplicates (#57151)
  * Fixed regression in `DataFrame.to_dict` with orient='list' and
    datetime or timedelta types returning integers (#54824)
  * Fixed regression in `DataFrame.to_json` converting nullable
    integers to floats (#57224)
  * Fixed regression in `DataFrame.to_sql` when method="multi" is
    passed and the dialect type is not Oracle (#57310)
  * Fixed regression in `DataFrame.transpose` with nullable
    extension dtypes not having F-contiguous data potentially
    causing exceptions when used (#57315)
  * Fixed regression in `DataFrame.update` emitting incorrect
    warnings about downcasting (#57124)
  * Fixed regression in `DataFrameGroupBy.idxmin`,
    `DataFrameGroupBy.idxmax`, `SeriesGroupBy.idxmin`,
    `SeriesGroupBy.idxmax` ignoring the skipna argument (#57040)
  * Fixed regression in `DataFrameGroupBy.idxmin`,
    `DataFrameGroupBy.idxmax`, `SeriesGroupBy.idxmin`,
    `SeriesGroupBy.idxmax` where values containing the minimum or
    maximum value for the dtype could produce incorrect results
    (#57040)
  * Fixed regression in `ExtensionArray.to_numpy` raising for
    non-numeric masked dtypes (#56991)
  * Fixed regression in `Index.join` raising TypeError when joining
    an empty index to a non-empty index containing mixed dtype
    values (#57048)
  * Fixed regression in `Series.astype` introducing decimals when
    converting from integer with missing values to string dtype
    (#57418)
  * Fixed regression in `Series.pct_change` raising a ValueError
    for an empty `Series` (#57056)
  * Fixed regression in `Series.to_numpy` when dtype is given as
    float and the data contains NaNs (#57121)
  * Fixed regression in addition or subtraction of `DateOffset`
    objects with millisecond components to datetime64 `Index`,
    `Series`, or `DataFrame` (#57529)
  ## Bug fixes
  * Fixed bug in `pandas.api.interchange.from_dataframe` which was
    raising for Nullable integers (#55069)
  * Fixed bug in `pandas.api.interchange.from_dataframe` which was
    raising for empty inputs (#56700)
  * Fixed bug in `pandas.api.interchange.from_dataframe` which
    wasn't converting columns names to strings (#55069)
  * Fixed bug in `DataFrame.__getitem__` for empty `DataFrame` with
    Copy-on-Write enabled (#57130)
  * Fixed bug in `PeriodIndex.asfreq` which was silently converting
    frequencies which are not supported as period frequencies
    instead of raising an error (#56945)
  ## Note
  * The DeprecationWarning that was raised when pandas was imported
    without PyArrow being installed has been removed. This decision
    was made because the warning was too noisy for too many users
    and a lot of feedback was collected about the decision to make
    PyArrow a required dependency. Pandas is currently considering
    the decision whether or not PyArrow should be added as a hard
    dependency in 3.0. Interested users can follow the discussion
    here.
  * Added the argument skipna to `DataFrameGroupBy.first`,
    `DataFrameGroupBy.last`, `SeriesGroupBy.first`, and
    `SeriesGroupBy.last`; achieving skipna=False used to be
    available via `DataFrameGroupBy.nth`, but the behavior was
    changed in pandas 2.0.0 (#57019)
  * Added the argument skipna to `Resampler.first`,
    `Resampler.last` (#57019)
- Release notes for 2.2.0
  * For full changelog see
    https://github.com/pandas-dev/pandas/blob/main/doc/source/whatsnew/v2.2.0.rst
  ## Enhancements
  * ADBC Driver support in to_sql and read_sql
  * Create a pandas Series based on one or more conditions
  * to_numpy for NumPy nullable and Arrow types converts to
    suitable NumPy dtype
  * Series.struct accessor for PyArrow structured data
  * Series.list accessor for PyArrow list data
  * Calamine engine for `read_excel`
  ## Notable bug fixes
  * `merge` and `DataFrame.join` now consistently follow documented
    sort behavior
  * `merge` and `DataFrame.join` no longer reorder levels when
    levels differ
  * Increased minimum versions for dependencies
  ## Deprecations
  * Chained assignment
  * Deprecate aliases M, Q, Y, etc. in favour of ME, QE, YE, etc.
    for offsets
  * Deprecated automatic downcasting
- Simplify flavor test setup: obs can evaluate %{shrink:} now

OBS-URL: https://build.opensuse.org/request/show/1152058
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pandas?expand=0&rev=110
2024-02-27 13:46:02 +00:00
9f8369fd5a Accepting request 1144848 from devel:languages:python:numeric
- enable py312 testing, remove py39 testing

OBS-URL: https://build.opensuse.org/request/show/1144848
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pandas?expand=0&rev=61
2024-02-08 18:01:34 +00:00
bde8bf822e - enable py312 testing, remove py39 testing
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pandas?expand=0&rev=108
2024-02-06 09:00:08 +00:00
10 changed files with 717 additions and 122 deletions

View File

@@ -1,5 +1,5 @@
<multibuild>
<package>test-py39</package>
<package>test-py310</package>
<package>test-py311</package>
<package>test-py312</package>
</multibuild>

View File

@@ -2,7 +2,7 @@
<service name="tar_scm" mode="disabled">
<param name="url">https://github.com/pandas-dev/pandas.git</param>
<param name="scm">git</param>
<param name="revision">v2.1.4</param>
<param name="revision">v2.2.2</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="filename">pandas</param>

BIN
pandas-2.1.4.tar.gz (Stored with Git LFS)

Binary file not shown.

3
pandas-2.2.2.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8f044538e419c7d5c03434c96b1439cbd88701dcd02d6a79b08947fbb656c2f4
size 50782448

View File

@@ -0,0 +1,40 @@
From 1828b62ee913da44ec4402642ef7baaafeb65677 Mon Sep 17 00:00:00 2001
From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
Date: Mon, 15 Apr 2024 09:47:31 -1000
Subject: [PATCH] Backport PR #58268: CI/TST: Unxfail
test_slice_locs_negative_step Pyarrow test
---
pandas/tests/indexes/object/test_indexing.py | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/pandas/tests/indexes/object/test_indexing.py b/pandas/tests/indexes/object/test_indexing.py
index 443cacf94d239..ebf9dac715f8d 100644
--- a/pandas/tests/indexes/object/test_indexing.py
+++ b/pandas/tests/indexes/object/test_indexing.py
@@ -7,7 +7,6 @@
NA,
is_matching_na,
)
-from pandas.compat import pa_version_under16p0
import pandas.util._test_decorators as td
import pandas as pd
@@ -201,16 +200,7 @@ class TestSliceLocs:
(pd.IndexSlice["m":"m":-1], ""), # type: ignore[misc]
],
)
- def test_slice_locs_negative_step(self, in_slice, expected, dtype, request):
- if (
- not pa_version_under16p0
- and dtype == "string[pyarrow_numpy]"
- and in_slice == slice("a", "a", -1)
- ):
- request.applymarker(
- pytest.mark.xfail(reason="https://github.com/apache/arrow/issues/40642")
- )
-
+ def test_slice_locs_negative_step(self, in_slice, expected, dtype):
index = Index(list("bcdxy"), dtype=dtype)
s_start, s_stop = index.slice_locs(in_slice.start, in_slice.stop, in_slice.step)

View File

@@ -0,0 +1,71 @@
From 0cab756077f5291f8d6a7fcfacaf374f62b866a0 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Mon, 29 Apr 2024 23:11:21 -0400
Subject: [PATCH 1/2] Remove deprecated plot_date calls
These were deprecated in Matplotlib 3.9.
---
pandas/tests/plotting/test_datetimelike.py | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/pandas/tests/plotting/test_datetimelike.py b/pandas/tests/plotting/test_datetimelike.py
index 6b709522bab70..b91bde41bf4c4 100644
--- a/pandas/tests/plotting/test_datetimelike.py
+++ b/pandas/tests/plotting/test_datetimelike.py
@@ -1432,13 +1432,11 @@ def test_mpl_nopandas(self):
values1 = np.arange(10.0, 11.0, 0.5)
values2 = np.arange(11.0, 12.0, 0.5)
- kw = {"fmt": "-", "lw": 4}
-
_, ax = mpl.pyplot.subplots()
- ax.plot_date([x.toordinal() for x in dates], values1, **kw)
- ax.plot_date([x.toordinal() for x in dates], values2, **kw)
-
- line1, line2 = ax.get_lines()
+ line1, line2, = ax.plot(
+ [x.toordinal() for x in dates], values1, "-",
+ [x.toordinal() for x in dates], values2, "-",
+ linewidth=4)
exp = np.array([x.toordinal() for x in dates], dtype=np.float64)
tm.assert_numpy_array_equal(line1.get_xydata()[:, 0], exp)
From 6d6574c4e71e3bab91503f85c8aa80c927785865 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Tue, 30 Apr 2024 16:47:26 +0000
Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---
pandas/tests/plotting/test_datetimelike.py | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/pandas/tests/plotting/test_datetimelike.py b/pandas/tests/plotting/test_datetimelike.py
index b91bde41bf4c4..4b4eeada58366 100644
--- a/pandas/tests/plotting/test_datetimelike.py
+++ b/pandas/tests/plotting/test_datetimelike.py
@@ -1433,10 +1433,18 @@ def test_mpl_nopandas(self):
values2 = np.arange(11.0, 12.0, 0.5)
_, ax = mpl.pyplot.subplots()
- line1, line2, = ax.plot(
- [x.toordinal() for x in dates], values1, "-",
- [x.toordinal() for x in dates], values2, "-",
- linewidth=4)
+ (
+ line1,
+ line2,
+ ) = ax.plot(
+ [x.toordinal() for x in dates],
+ values1,
+ "-",
+ [x.toordinal() for x in dates],
+ values2,
+ "-",
+ linewidth=4,
+ )
exp = np.array([x.toordinal() for x in dates], dtype=np.float64)
tm.assert_numpy_array_equal(line1.get_xydata()[:, 0], exp)

View File

@@ -0,0 +1,29 @@
From d4e803caf7aabd464f6fb1d43ef39903911a3cec Mon Sep 17 00:00:00 2001
From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
Date: Wed, 3 Jul 2024 06:45:24 -1000
Subject: [PATCH] Backport PR #59168: TST: Address UserWarning in matplotlib
test
---
pandas/plotting/_matplotlib/core.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/pandas/plotting/_matplotlib/core.py b/pandas/plotting/_matplotlib/core.py
index 2979903edf360..52382d9f7d572 100644
--- a/pandas/plotting/_matplotlib/core.py
+++ b/pandas/plotting/_matplotlib/core.py
@@ -893,7 +893,13 @@ def _make_legend(self) -> None:
elif self.subplots and self.legend:
for ax in self.axes:
if ax.get_visible():
- ax.legend(loc="best")
+ with warnings.catch_warnings():
+ warnings.filterwarnings(
+ "ignore",
+ "No artists with labels found to put in legend.",
+ UserWarning,
+ )
+ ax.legend(loc="best")
@final
@staticmethod

View File

@@ -0,0 +1,174 @@
diff --git a/pandas/_testing/__init__.py b/pandas/_testing/__init__.py
index 361998db8e..87d419e2db 100644
--- a/pandas/_testing/__init__.py
+++ b/pandas/_testing/__init__.py
@@ -111,6 +111,7 @@ ALL_FLOAT_DTYPES: list[Dtype] = [*FLOAT_NUMPY_DTYPES, *FLOAT_EA_DTYPES]
COMPLEX_DTYPES: list[Dtype] = [complex, "complex64", "complex128"]
STRING_DTYPES: list[Dtype] = [str, "str", "U"]
+COMPLEX_FLOAT_DTYPES: list[Dtype] = [*COMPLEX_DTYPES, *FLOAT_NUMPY_DTYPES]
DATETIME64_DTYPES: list[Dtype] = ["datetime64[ns]", "M8[ns]"]
TIMEDELTA64_DTYPES: list[Dtype] = ["timedelta64[ns]", "m8[ns]"]
diff --git a/pandas/conftest.py b/pandas/conftest.py
index 7c35dfdde9..10134c90f8 100644
--- a/pandas/conftest.py
+++ b/pandas/conftest.py
@@ -1403,6 +1403,21 @@ def complex_dtype(request):
return request.param
+@pytest.fixture(params=tm.COMPLEX_FLOAT_DTYPES)
+def complex_or_float_dtype(request):
+ """
+ Parameterized fixture for complex and numpy float dtypes.
+
+ * complex
+ * 'complex64'
+ * 'complex128'
+ * float
+ * 'float32'
+ * 'float64'
+ """
+ return request.param
+
+
@pytest.fixture(params=tm.SIGNED_INT_NUMPY_DTYPES)
def any_signed_int_numpy_dtype(request):
"""
diff --git a/pandas/core/computation/expr.py b/pandas/core/computation/expr.py
index b5861fbaeb..d642c37cea 100644
--- a/pandas/core/computation/expr.py
+++ b/pandas/core/computation/expr.py
@@ -31,7 +31,6 @@ from pandas.core.computation.ops import (
UNARY_OPS_SYMS,
BinOp,
Constant,
- Div,
FuncNode,
Op,
Term,
@@ -370,7 +369,7 @@ class BaseExprVisitor(ast.NodeVisitor):
"Add",
"Sub",
"Mult",
- None,
+ "Div",
"Pow",
"FloorDiv",
"Mod",
@@ -533,9 +532,6 @@ class BaseExprVisitor(ast.NodeVisitor):
left, right = self._maybe_downcast_constants(left, right)
return self._maybe_evaluate_binop(op, op_class, left, right)
- def visit_Div(self, node, **kwargs):
- return lambda lhs, rhs: Div(lhs, rhs)
-
def visit_UnaryOp(self, node, **kwargs):
op = self.visit(node.op)
operand = self.visit(node.operand)
diff --git a/pandas/core/computation/ops.py b/pandas/core/computation/ops.py
index 95ac20ba39..ea8b1c0457 100644
--- a/pandas/core/computation/ops.py
+++ b/pandas/core/computation/ops.py
@@ -332,31 +332,6 @@ for d in (_cmp_ops_dict, _bool_ops_dict, _arith_ops_dict):
_binary_ops_dict.update(d)
-def _cast_inplace(terms, acceptable_dtypes, dtype) -> None:
- """
- Cast an expression inplace.
-
- Parameters
- ----------
- terms : Op
- The expression that should cast.
- acceptable_dtypes : list of acceptable numpy.dtype
- Will not cast if term's dtype in this list.
- dtype : str or numpy.dtype
- The dtype to cast to.
- """
- dt = np.dtype(dtype)
- for term in terms:
- if term.type in acceptable_dtypes:
- continue
-
- try:
- new_value = term.value.astype(dt)
- except AttributeError:
- new_value = dt.type(term.value)
- term.update(new_value)
-
-
def is_term(obj) -> bool:
return isinstance(obj, Term)
@@ -516,31 +491,6 @@ class BinOp(Op):
def isnumeric(dtype) -> bool:
return issubclass(np.dtype(dtype).type, np.number)
-
-class Div(BinOp):
- """
- Div operator to special case casting.
-
- Parameters
- ----------
- lhs, rhs : Term or Op
- The Terms or Ops in the ``/`` expression.
- """
-
- def __init__(self, lhs, rhs) -> None:
- super().__init__("/", lhs, rhs)
-
- if not isnumeric(lhs.return_type) or not isnumeric(rhs.return_type):
- raise TypeError(
- f"unsupported operand type(s) for {self.op}: "
- f"'{lhs.return_type}' and '{rhs.return_type}'"
- )
-
- # do not upcast float32s to float64 un-necessarily
- acceptable_dtypes = [np.float32, np.float64]
- _cast_inplace(com.flatten(self), acceptable_dtypes, np.float64)
-
-
UNARY_OPS_SYMS = ("+", "-", "~", "not")
_unary_ops_funcs = (operator.pos, operator.neg, operator.invert, operator.invert)
_unary_ops_dict = dict(zip(UNARY_OPS_SYMS, _unary_ops_funcs))
diff --git a/pandas/tests/computation/test_eval.py b/pandas/tests/computation/test_eval.py
index 17630f14b0..e8fad6b8cb 100644
--- a/pandas/tests/computation/test_eval.py
+++ b/pandas/tests/computation/test_eval.py
@@ -747,16 +747,26 @@ class TestTypeCasting:
@pytest.mark.parametrize("op", ["+", "-", "*", "**", "/"])
# maybe someday... numexpr has too many upcasting rules now
# chain(*(np.core.sctypes[x] for x in ['uint', 'int', 'float']))
- @pytest.mark.parametrize("dt", [np.float32, np.float64])
@pytest.mark.parametrize("left_right", [("df", "3"), ("3", "df")])
- def test_binop_typecasting(self, engine, parser, op, dt, left_right):
- df = DataFrame(np.random.default_rng(2).standard_normal((5, 3)), dtype=dt)
+ def test_binop_typecasting(
+ self, engine, parser, op, complex_or_float_dtype, left_right, request
+ ):
+ # GH#21374
+ dtype = complex_or_float_dtype
+ df = DataFrame(np.random.default_rng(2).standard_normal((5, 3)), dtype=dtype)
left, right = left_right
s = f"{left} {op} {right}"
res = pd.eval(s, engine=engine, parser=parser)
- assert df.values.dtype == dt
- assert res.values.dtype == dt
- tm.assert_frame_equal(res, eval(s))
+ if dtype == "complex64" and engine == "numexpr":
+ mark = pytest.mark.xfail(
+ reason="numexpr issue with complex that are upcast "
+ "to complex 128 "
+ "https://github.com/pydata/numexpr/issues/492"
+ )
+ request.applymarker(mark)
+ assert df.values.dtype == dtype
+ assert res.values.dtype == dtype
+ tm.assert_frame_equal(res, eval(s), check_exact=False)
# -------------------------------------

View File

@@ -1,3 +1,236 @@
-------------------------------------------------------------------
Sun Sep 8 10:02:47 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Drop pandas-pr58720-xarray-dp.patch: It does no longer xfail
-------------------------------------------------------------------
Wed Aug 28 13:53:55 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Skip overflowing tests on 32-bit
-------------------------------------------------------------------
Sun Aug 25 21:22:36 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Add pandas-pr59353-np2eval.patch
* gh#pandas-dev/pandas#59353
* gh#pandas-dev/pandas#58548
-------------------------------------------------------------------
Thu Jul 11 09:51:36 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Add pandas-pr59175-matplotlib.patch -- gh#pandas-dev/pandas#59175
-------------------------------------------------------------------
Sun May 12 17:57:39 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Add pandas-pr58269-pyarrow16xpass.patch
(gh#pandas-dev/pandas!58269)
- Add pandas-pr58720-xarray-dp.patch
(gh#pandas-dev/pandas!58720), which makes pandas compatible
with the modern xarray
- Add pandas-pr58484-matplotlib.patch
(gh#pandas-dev/pandas!58484), which makes pandas compatible
with the modern matplotlib
- Skip also test_plot_scatter_shape (gh#pandas-dev/pandas#58851)
-------------------------------------------------------------------
Thu May 9 23:44:42 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Skip build on Python 3.10 ... too many dependencies are missing.
-------------------------------------------------------------------
Tue Apr 30 18:08:56 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Update to 2.2.2
* Pandas 2.2.2 is now compatible with numpy 2.0
* Pandas 2.2.2 is the first version of pandas that is generally
compatible with the upcoming numpy 2.0 release, and wheels for
pandas 2.2.2 will work with both numpy 1.x and 2.x. One major
caveat is that arrays created with numpy 2.0s new StringDtype
will convert to object dtyped arrays upon Series/DataFrame
creation. Full support for numpy 2.0s StringDtype is expected
to land in pandas 3.0.
* As usual please report any bugs discovered to our issue tracker
## Fixed regressions
* DataFrame.__dataframe__() was producing incorrect data buffers
when the a columns type was a pandas nullable on with missing
values (GH 56702)
* DataFrame.__dataframe__() was producing incorrect data buffers
when the a columns type was a pyarrow nullable on with missing
values (GH 57664)
* Avoid issuing a spurious DeprecationWarning when a custom
DataFrame or Series subclass method is called (GH 57553)
* Fixed regression in precision of to_datetime() with string and
unit input (GH 57051)
## Bug fixes
* DataFrame.__dataframe__() was producing incorrect data buffers
when the columns type was nullable boolean (GH 55332)
* DataFrame.__dataframe__() was showing bytemask instead of
bitmask for 'string[pyarrow]' validity buffer (GH 57762)
* DataFrame.__dataframe__() was showing non-null validity buffer
(instead of None) 'string[pyarrow]' without missing values (GH
57761)
* DataFrame.to_sql() was failing to find the right table when
using the schema argument (GH 57539)
- Remove obsolete python39 multibuild
- Add pandas-pr58269-pyarrow16xpass.patch
gh#pandas-dev/pandas#58269
-------------------------------------------------------------------
Mon Mar 4 20:44:10 UTC 2024 - Ben Greiner <code@bnavigator.de>
- No xarrary for python 3.9 anymore: Remove from pandas[all] and
exclude pandas[computation]. Reenable testing to check it.
It will be skipped automatically when python39 is dropped from
Tumbleweed globally.
- Fix 15.x build: requires newer compiler
- Fix 15.x test skips: sle15_python_module_pythons needs to be
declared earlier
-------------------------------------------------------------------
Fri Feb 23 20:04:59 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Update to 2.2.1
## Enhancements
* Added pyarrow pip extra so users can install pandas and pyarrow
with pip with pip install pandas[pyarrow] (#54466)
## Fixed regressions
* Fixed memory leak in `read_csv` (#57039)
* Fixed performance regression in `Series.combine_first` (#55845)
* Fixed regression causing overflow for near-minimum timestamps
(#57150)
* Fixed regression in `concat` changing long-standing behavior
that always sorted the non-concatenation axis when the axis was
a `DatetimeIndex` (#57006)
* Fixed regression in `merge_ordered` raising TypeError for
fill_method="ffill" and how="left" (#57010)
* Fixed regression in `pandas.testing.assert_series_equal`
defaulting to check_exact=True when checking the `Index`
(#57067)
* Fixed regression in `read_json` where an `Index` would be
returned instead of a `RangeIndex` (#57429)
* Fixed regression in `wide_to_long` raising an AttributeError
for string columns (#57066)
* Fixed regression in `.DataFrameGroupBy.idxmin`,
`.DataFrameGroupBy.idxmax`, `.SeriesGroupBy.idxmin`,
`.SeriesGroupBy.idxmax` ignoring the skipna argument (#57040)
* Fixed regression in `.DataFrameGroupBy.idxmin`,
`.DataFrameGroupBy.idxmax`, `.SeriesGroupBy.idxmin`,
`.SeriesGroupBy.idxmax` where values containing the minimum or
maximum value for the dtype could produce incorrect results
(#57040)
* Fixed regression in `CategoricalIndex.difference` raising
KeyError when other contains null values other than NaN
(#57318)
* Fixed regression in `DataFrame.groupby` raising ValueError when
grouping by a `Series` in some cases (#57276)
* Fixed regression in `DataFrame.loc` raising IndexError for
non-unique, masked dtype indexes where result has more than
10,000 rows (#57027)
* Fixed regression in `DataFrame.loc` which was unnecessarily
throwing "incompatible dtype warning" when expanding with
partial row indexer and multiple columns (see PDEP6) (#56503)
* Fixed regression in `DataFrame.map` with na_action="ignore" not
being respected for NumPy nullable and `ArrowDtypes` (#57316)
* Fixed regression in `DataFrame.merge` raising ValueError for
certain types of 3rd-party extension arrays (#57316)
* Fixed regression in `DataFrame.query` with all NaT column with
object dtype (#57068)
* Fixed regression in `DataFrame.shift` raising AssertionError
for axis=1 and empty `DataFrame` (#57301)
* Fixed regression in `DataFrame.sort_index` not producing a
stable sort for a index with duplicates (#57151)
* Fixed regression in `DataFrame.to_dict` with orient='list' and
datetime or timedelta types returning integers (#54824)
* Fixed regression in `DataFrame.to_json` converting nullable
integers to floats (#57224)
* Fixed regression in `DataFrame.to_sql` when method="multi" is
passed and the dialect type is not Oracle (#57310)
* Fixed regression in `DataFrame.transpose` with nullable
extension dtypes not having F-contiguous data potentially
causing exceptions when used (#57315)
* Fixed regression in `DataFrame.update` emitting incorrect
warnings about downcasting (#57124)
* Fixed regression in `DataFrameGroupBy.idxmin`,
`DataFrameGroupBy.idxmax`, `SeriesGroupBy.idxmin`,
`SeriesGroupBy.idxmax` ignoring the skipna argument (#57040)
* Fixed regression in `DataFrameGroupBy.idxmin`,
`DataFrameGroupBy.idxmax`, `SeriesGroupBy.idxmin`,
`SeriesGroupBy.idxmax` where values containing the minimum or
maximum value for the dtype could produce incorrect results
(#57040)
* Fixed regression in `ExtensionArray.to_numpy` raising for
non-numeric masked dtypes (#56991)
* Fixed regression in `Index.join` raising TypeError when joining
an empty index to a non-empty index containing mixed dtype
values (#57048)
* Fixed regression in `Series.astype` introducing decimals when
converting from integer with missing values to string dtype
(#57418)
* Fixed regression in `Series.pct_change` raising a ValueError
for an empty `Series` (#57056)
* Fixed regression in `Series.to_numpy` when dtype is given as
float and the data contains NaNs (#57121)
* Fixed regression in addition or subtraction of `DateOffset`
objects with millisecond components to datetime64 `Index`,
`Series`, or `DataFrame` (#57529)
## Bug fixes
* Fixed bug in `pandas.api.interchange.from_dataframe` which was
raising for Nullable integers (#55069)
* Fixed bug in `pandas.api.interchange.from_dataframe` which was
raising for empty inputs (#56700)
* Fixed bug in `pandas.api.interchange.from_dataframe` which
wasn't converting columns names to strings (#55069)
* Fixed bug in `DataFrame.__getitem__` for empty `DataFrame` with
Copy-on-Write enabled (#57130)
* Fixed bug in `PeriodIndex.asfreq` which was silently converting
frequencies which are not supported as period frequencies
instead of raising an error (#56945)
## Note
* The DeprecationWarning that was raised when pandas was imported
without PyArrow being installed has been removed. This decision
was made because the warning was too noisy for too many users
and a lot of feedback was collected about the decision to make
PyArrow a required dependency. Pandas is currently considering
the decision whether or not PyArrow should be added as a hard
dependency in 3.0. Interested users can follow the discussion
here.
* Added the argument skipna to `DataFrameGroupBy.first`,
`DataFrameGroupBy.last`, `SeriesGroupBy.first`, and
`SeriesGroupBy.last`; achieving skipna=False used to be
available via `DataFrameGroupBy.nth`, but the behavior was
changed in pandas 2.0.0 (#57019)
* Added the argument skipna to `Resampler.first`,
`Resampler.last` (#57019)
- Release notes for 2.2.0
* For full changelog see
https://github.com/pandas-dev/pandas/blob/main/doc/source/whatsnew/v2.2.0.rst
## Enhancements
* ADBC Driver support in to_sql and read_sql
* Create a pandas Series based on one or more conditions
* to_numpy for NumPy nullable and Arrow types converts to
suitable NumPy dtype
* Series.struct accessor for PyArrow structured data
* Series.list accessor for PyArrow list data
* Calamine engine for `read_excel`
## Notable bug fixes
* `merge` and `DataFrame.join` now consistently follow documented
sort behavior
* `merge` and `DataFrame.join` no longer reorder levels when
levels differ
* Increased minimum versions for dependencies
## Deprecations
* Chained assignment
* Deprecate aliases M, Q, Y, etc. in favour of ME, QE, YE, etc.
for offsets
* Deprecated automatic downcasting
- Simplify flavor test setup: obs can evaluate %{shrink:} now
-------------------------------------------------------------------
Tue Feb 6 08:59:26 UTC 2024 - Dirk Müller <dmueller@suse.com>
- enable py312 testing, remove py39 testing
-------------------------------------------------------------------
Fri Jan 12 11:18:40 UTC 2024 - pgajdos@suse.com

View File

@@ -1,5 +1,5 @@
#
# spec file
# spec file for package python-pandas
#
# Copyright (c) 2024 SUSE LLC
#
@@ -17,37 +17,28 @@
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test-py39"
%define psuffix -test-py39
%define skip_python310 1
%define skip_python311 1
%define skip_python312 1
%bcond_without test
%endif
%if "%{flavor}" == "test-py310"
%define psuffix -test-py310
%define skip_python39 1
%define skip_python311 1
%define skip_python312 1
%bcond_without test
%endif
%if "%{flavor}" == "test-py311"
%define psuffix -test-py311
%define skip_python39 1
%define skip_python310 1
%define skip_python312 1
%bcond_without test
%endif
%if "%{flavor}" == "test-py312"
%define psuffix -test-py312
%define skip_python39 1
%define skip_python310 1
%define skip_python311 1
%bcond_without test
%endif
%{?sle15_python_module_pythons}
%if "%{flavor}" == ""
%define psuffix %{nil}
%bcond_with test
%else
%define psuffix -%{flavor}
%bcond_without test
%if "%{flavor}" != "test-py310"
%define skip_python310 1
%endif
%if "%{flavor}" != "test-py311"
%define skip_python311 1
%endif
%if "%{flavor}" != "test-py312"
%define skip_python312 1
%endif
# Skip empty buildsets, last one is for sle15_python_module_pythons
%if "%{shrink:%{pythons}}" == "" || ("%pythons" == "python311" && 0%{?skip_python311})
ExclusiveArch: donotbuild
%define python_module() %flavor-not-enabled-in-buildset-for-suse-%{?suse_version}
%endif
%endif
# Only test the core functionality in Ring1 (Lettered Staging)
@@ -59,13 +50,18 @@
# xlsb not available
%bcond_with xslb
%bcond_with consortium_standard
%bcond_with calamine
%bcond_with adbc
# depend/not depend on python-pyarrow and apache-arrow [bsc#1218592]
%bcond_without have_pyarrow
%bcond_without pyarrow
%{?sle15_python_module_pythons}
%if %{suse_version} <= 1500
# requires __has_builtin with keywords
%define gccver 13
%endif
Name: python-pandas%{psuffix}
# Set version through _service
Version: 2.1.4
Version: 2.2.2
Release: 0
Summary: Python data structures for data analysis, time series, and statistics
License: BSD-3-Clause
@@ -73,30 +69,45 @@ URL: https://pandas.pydata.org/
# 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
Source0: pandas-%{version}.tar.gz
BuildRequires: %{python_module Cython >= 0.29.33 with %python-Cython < 3}
# PATCH-FIX-UPSTREAM pandas-pr58269-pyarrow16xpass.patch -- gh#pandas-dev/pandas#58269
Patch0: pandas-pr58269-pyarrow16xpass.patch
# PATCH-FIX-UPSTREAM pandas-pr58484-matplotlib.patch -- gh#pandas-dev/pandas#58484 mcepl@suse.com, make pandas compatible with the modern matplotlib
Patch2: pandas-pr58484-matplotlib.patch
# PATCH-FIX-UPSTREAM pandas-pr59175-matplotlib.patch -- gh#pandas-dev/pandas#59175
Patch3: https://github.com/pandas-dev/pandas/pull/59175.patch#/pandas-pr59175-matplotlib.patch
# PATCH-FIX-UPSTREAM pandas-pr59353-np2eval.patch -- gh#pandas-dev/pandas#59144 backported to 2.2, no new tests, see gh#pandas-dev/pandas#58548, gh#pandas-dev/pandas#59353
Patch4: pandas-pr59353-np2eval.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.23.2 if %python-base < 3.12 else %python-numpy-devel >= 1.26}
BuildRequires: %{python_module numpy-devel >= 1.26}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module versioneer-toml}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: gcc%{?gccver}-c++
BuildRequires: git-core
BuildRequires: meson >= 1.2.1
%endif
BuildRequires: python-rpm-macros
Requires: python-python-dateutil >= 2.8.2
Requires: python-pytz >= 2020.1
Requires: timezone >= 2022a
Obsoletes: python-pandas-doc < %{version}
Provides: python-pandas-doc = %{version}
%if 0%{python_version_nodots} < 312
%if 0%{python_version_nodots} < 311
Requires: python-numpy >= 1.22.4
%else
%if 0%{python_version_nodots} == 311
Requires: python-numpy >= 1.23.2
%else
Requires: python-numpy >= 1.26
%endif
%endif
# SECTION extras
Recommends: python-pandas-performance
Recommends: python-pandas-pyarrow
Suggests: python-pandas-all
Suggests: python-pandas-clipboard
Suggests: python-pandas-compression
@@ -113,10 +124,10 @@ Suggests: python-pandas-spss
Suggests: python-pandas-sql-other
Suggests: python-pandas-test
Suggests: python-pandas-xml
%{?_with_aws:Suggests: python-pandas-aws}
%{?_with_gcp:Suggests: python-pandas-gcp}
%{?_with_have_pyarrow:Suggests: python-pandas-parquet}
%{?_with_have_pyarrow:Suggests: python-pandas-feather}
%{?with_aws:Suggests: python-pandas-aws}
%{?with_gcp:Suggests: python-pandas-gcp}
%{?with_pyarrow:Suggests: python-pandas-parquet}
%{?with_pyarrow:Suggests: python-pandas-feather}
# /SECTION
%if %{with test}
# required for sqlite3 tests
@@ -133,27 +144,24 @@ BuildRequires: %{python_module pandas-clipboard = %{version}}
BuildRequires: %{python_module pandas-compression = %{version}}
BuildRequires: %{python_module pandas-computation = %{version}}
BuildRequires: %{python_module pandas-excel = %{version}}
%if %{with have_pyarrow}
BuildRequires: %{python_module pandas-feather = %{version}}
%endif
%{?with_pyarrow:BuildRequires: %{python_module pandas-feather = %{version}}}
BuildRequires: %{python_module pandas-fss = %{version}}
BuildRequires: %{python_module pandas-hdf5 = %{version}}
BuildRequires: %{python_module pandas-html = %{version}}
BuildRequires: %{python_module pandas-mysql = %{version}}
BuildRequires: %{python_module pandas-output_formatting = %{version}}
%if %{with have_pyarrow}
BuildRequires: %{python_module pandas-parquet = %{version}}
%endif
%{?with_pyarrow:BuildRequires: %{python_module pandas-parquet = %{version}}}
BuildRequires: %{python_module pandas-performance = %{version}}
BuildRequires: %{python_module pandas-plot = %{version}}
BuildRequires: %{python_module pandas-postgresql = %{version}}
%{?with_pyarrow:BuildRequires: %{python_module pandas-pyarrow = %{version}}}
BuildRequires: %{python_module pandas-spss = %{version}}
BuildRequires: %{python_module pandas-sql-other = %{version}}
BuildRequires: %{python_module pandas-xml = %{version}}
BuildRequires: xclip
%{?_with_aws:BuildRequires: %{python_module pandas-aws = %{version}}}
%{?_with_gcp:BuildRequires: %{python_module pandas-gcp = %{version}}}
%{?_with_consortium_standard:BuildRequires: %{python_module pandas-consortium-standard = %{version}}}
%{?with_aws:BuildRequires: %{python_module pandas-aws = %{version}}}
%{?with_gcp:BuildRequires: %{python_module pandas-gcp = %{version}}}
%{?with_consortium_standard:BuildRequires: %{python_module pandas-consortium-standard = %{version}}}
%endif
%endif
%python_subpackages
@@ -169,18 +177,26 @@ Summary: The python pandas[test] extra
Requires: python-hypothesis >= 6.46.1
Requires: python-pandas = %{version}
Requires: python-pytest >= 7.3.2
Requires: python-pytest-asyncio >= 0.17.0
Requires: python-pytest-xdist >= 2.2.0
BuildArch: noarch
%description test
This package provides the [test] extra for python-pandas
%package pyarrow
Summary: The python pandas[pyarrow] extra
Requires: python-pandas = %{version}
Requires: python-pyarrow >= 10.0.1
BuildArch: noarch
%description pyarrow
This package provides the [pyarrow] extra for python-pandas
%package performance
Summary: The python pandas[performance] extra
Requires: python-Bottleneck >= 1.3.4
Requires: python-numba >= 0.55.2
Requires: python-numexpr >= 2.8.0
Requires: python-Bottleneck >= 1.3.6
Requires: python-numba >= 0.56.4
Requires: python-numexpr >= 2.8.4
Requires: python-pandas = %{version}
BuildArch: noarch
@@ -193,8 +209,8 @@ 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.8.1
Requires: python-xarray >= 2022.03
Requires: python-scipy >= 1.10.0
Requires: python-xarray >= 2022.12.0
BuildArch: noarch
%description computation
@@ -202,7 +218,7 @@ This package provides the [computation] extra for python-pandas
%package fss
Summary: The python pandas[fss] extra
Requires: python-fsspec >= 2022.05
Requires: python-fsspec >= 2022.11
Requires: python-pandas = %{version}
BuildArch: noarch
@@ -212,7 +228,7 @@ This package provides the [fss] extra for python-pandas
%package aws
Summary: The python pandas[aws] extra
Requires: python-pandas = %{version}
Requires: python-s3fs >= 2022.05.0
Requires: python-s3fs >= 2022.11
BuildArch: noarch
%description aws
@@ -220,9 +236,9 @@ This package provides the [aws] extra for python-pandas
%package gcp
Summary: The python pandas[gcp] extra
Requires: python-gcsfs >= 2022.05.0
Requires: python-gcsfs >= 2022.11
Requires: python-pandas = %{version}
Requires: python-pandas-gbq >= 0.17.5
Requires: python-pandas-gbq >= 0.19.0
BuildArch: noarch
%description gcp
@@ -231,21 +247,22 @@ This package provides the [gcp] extra for python-pandas
%package excel
Summary: The python pandas[excel] extra
Requires: python-odfpy >= 1.4.1
Requires: python-openpyxl >= 3.0.10
Requires: python-openpyxl >= 3.1.0
Requires: python-pandas = %{version}
%{?_with_xlsb:Requires: python-pyxlsb >= 1.0.9}
Requires: python-XlsxWriter >= 3.0.3
%{?with_xlsb:Requires: python-pyxlsb >= 1.0.10}
Requires: python-XlsxWriter >= 3.0.5
Requires: python-xlrd >= 2.0.1
%{?with_calamine:Requires: python-calamine >= 0.1.7}
BuildArch: noarch
%description excel
This package provides the [excel] extra for python-pandas.
(Except for pyxlsb, which is not available as openSUSE rpm package)
(Except for pyxlsb and calamine which are not available as openSUSE rpm package)
%package parquet
Summary: The python pandas[parquet] extra
Requires: python-pandas = %{version}
Requires: python-pyarrow >= 7.0.0
Requires: python-pyarrow >= 10.0.1
BuildArch: noarch
%description parquet
@@ -254,7 +271,7 @@ This package provides the [parquet] extra for python-pandas
%package feather
Summary: The python pandas[feather] extra
Requires: python-pandas = %{version}
Requires: python-pyarrow >= 7.0.0
Requires: python-pyarrow >= 10.0.1
BuildArch: noarch
%description feather
@@ -264,7 +281,7 @@ This package provides the [feather] extra for python-pandas
Summary: The python pandas[hdf5] extra
Requires: python-blosc
Requires: python-pandas = %{version}
Requires: python-tables >= 3.7.0
Requires: python-tables >= 3.8.0
BuildArch: noarch
%description hdf5
@@ -273,7 +290,7 @@ This package provides the [hdf5] extra for python-pandas
%package spss
Summary: The python pandas[spss] extra
Requires: python-pandas = %{version}
Requires: python-pyreadstat >= 1.1.5
Requires: python-pyreadstat >= 1.2.0
BuildArch: noarch
%description spss
@@ -281,9 +298,10 @@ This package provides the [spss] extra for python-pandas
%package postgresql
Summary: The python pandas[postgresql] extra
Requires: python-SQLAlchemy >= 1.4.36
Requires: python-SQLAlchemy >= 2.0.0
Requires: python-pandas = %{version}
Requires: python-psycopg2 >= 2.9.3
Requires: python-psycopg2 >= 2.9.6
%{?with_adbc:Requires: python-adbc-driver-postgresql >= 0.8}
BuildArch: noarch
%description postgresql
@@ -292,7 +310,7 @@ This package provides the [postgresql] extra for python-pandas
%package mysql
Summary: The python pandas[mysql] extra
Requires: python-PyMySQL >= 1.0.2
Requires: python-SQLAlchemy >= 1.4.36
Requires: python-SQLAlchemy >= 2.0.0
Requires: python-pandas = %{version}
BuildArch: noarch
@@ -301,7 +319,9 @@ This package provides the [mysql] extra for python-pandas
%package sql-other
Summary: The python pandas[sql-other] extra
Requires: python-SQLAlchemy >= 1.4.36
Requires: python-SQLAlchemy >= 2.0.0
%{?with_adbc:Requires: python-adbc-driver-postgresql >= 0.8}
%{?with_adbc:Requires: python-adbc-driver-sqlite >= 0.8}
Requires: python-pandas = %{version}
BuildArch: noarch
@@ -310,9 +330,9 @@ This package provides the [sql-other] extra for python-pandas
%package html
Summary: The python pandas[html] extra
Requires: python-beautifulsoup4 >= 4.11.1
Requires: python-beautifulsoup4 >= 4.11.2
Requires: python-html5lib >= 1.1
Requires: python-lxml >= 4.8.0
Requires: python-lxml >= 4.9.2
Requires: python-pandas = %{version}
BuildArch: noarch
@@ -321,7 +341,7 @@ This package provides the [html] extra for python-pandas
%package xml
Summary: The python pandas[xml] extra
Requires: python-lxml >= 4.8.0
Requires: python-lxml >= 4.9.2
Requires: python-pandas = %{version}
BuildArch: noarch
@@ -330,7 +350,7 @@ This package provides the [xml] extra for python-pandas
%package plot
Summary: The python pandas[plot] extra
Requires: python-matplotlib >= 3.6.1
Requires: python-matplotlib >= 3.6.3
Requires: python-pandas = %{version}
BuildArch: noarch
@@ -341,7 +361,7 @@ This package provides the [plot] extra for python-pandas
Summary: The python pandas[output_formatting] extra
Requires: python-Jinja2 >= 3.1.2
Requires: python-pandas = %{version}
Requires: python-tabulate >= 0.8.10
Requires: python-tabulate >= 0.9.0
BuildArch: noarch
%description output_formatting
@@ -349,8 +369,8 @@ This package provides the [output_formatting] extra for python-pandas
%package clipboard
Summary: The python pandas[clipboard] extra
Requires: python-PyQt5 >= 5.15.6
Requires: python-QtPy >= 2.2.0
Requires: python-PyQt5 >= 5.15.9
Requires: python-QtPy >= 2.3.0
Requires: python-pandas = %{version}
BuildArch: noarch
@@ -360,7 +380,7 @@ This package provides the [clipboard] extra for python-pandas
%package compression
Summary: The python pandas[compression] extra
Requires: python-pandas = %{version}
Requires: python-zstandard >= 0.17.0
Requires: python-zstandard >= 0.19.0
BuildArch: noarch
%description compression
@@ -377,47 +397,45 @@ This package provides the [consortium-standard] extra for python-pandas
%package all
Summary: The python pandas[all] extra
Requires: python-Bottleneck >= 1.3.4
Requires: python-Bottleneck >= 1.3.6
Requires: python-Jinja2 >= 3.1.2
Requires: python-PyMySQL >= 1.0.2
Requires: python-PyQt5 >= 5.15.6
Requires: python-QtPy >= 2.2.0
Requires: python-SQLAlchemy >= 1.4.36
Requires: python-XlsxWriter >= 3.0.3
Requires: python-beautifulsoup4 >= 4.9.3
Requires: python-PyQt5 >= 5.15.9
Requires: python-QtPy >= 2.3.0
Requires: python-SQLAlchemy >= 2
Requires: python-XlsxWriter >= 3.0.5
Requires: python-beautifulsoup4 >= 4.11.2
%{?with_adbc:Requires: python-adbc-driver-postgresql >= 0.8}
%{?with_adbc:Requires: python-adbc-driver-sqlite >= 0.8}
Requires: python-blosc
%if %{with have_pyarrow}
Requires: python-fastparquet >= 0.8
%endif
Requires: python-fsspec >= 2022.05
Requires: python-gcsfs >= 2022.05
%{?with_calamine:Requires: python-calamine >= 0.1.7}
%{?with_pyarrow:Requires: python-fastparquet >= 2022.12}
Requires: python-fsspec >= 2022.11
Requires: python-gcsfs >= 2022.11
Requires: python-html5lib >= 1.1
Requires: python-hypothesis >= 6.46.1
Requires: python-lxml >= 4.8.0
Requires: python-matplotlib >= 3.6.1
Requires: python-numba >= 0.55.2
Requires: python-numexpr >= 2.8.0
Requires: python-lxml >= 4.9.2
Requires: python-matplotlib >= 3.6.3
Requires: python-numba >= 0.56.4
Requires: python-numexpr >= 2.8.4
Requires: python-odfpy >= 1.4.1
Requires: python-openpyxl >= 3.0.10
Requires: python-openpyxl >= 3.1.0
Requires: python-pandas = %{version}
Requires: python-psycopg2 >= 2.9.3
%if %{with have_pyarrow}
Requires: python-pyarrow >= 7.0.0
%endif
Requires: python-pyreadstat >= 1.1.5
Requires: python-psycopg2 >= 2.9.6
%{?with_pyarrow:Requires: python-pyarrow >= 10.0.1}
Requires: python-pyreadstat >= 1.2.0
Requires: python-pytest >= 7.3.2
Requires: python-pytest-asyncio >= 0.17.0
Requires: python-pytest-xdist >= 2.2.0
Requires: python-scipy >= 1.8.1
Requires: python-tables >= 3.7.0
Requires: python-tabulate >= 0.8.10
Requires: python-xarray >= 2022.03
Requires: python-scipy >= 1.10.0
Requires: python-tables >= 3.8.0
Requires: python-tabulate >= 0.9
Requires: python-xarray >= 2022.12
Requires: python-xlrd >= 2.0.1
Requires: python-zstandard >= 0.17.0
%{?_with_aws:Requires: python-s3fs >= 2022.05.0}
%{?_with_gcp:Requires: python-pandas-gbq >= 0.17.5}
%{?_with_xslb:Requires: python-pyxlsb >= 1.0.9}
%{?_with_consortium_standard: Requires: python-dataframe-api-compat >= 0.1.7}
Requires: python-zstandard >= 0.19.0
%{?with_aws:Requires: python-s3fs >= 2022.05.0}
%{?with_gcp:Requires: python-pandas-gbq >= 0.19}
%{?with_xslb:Requires: python-pyxlsb >= 1.0.10}
%{?with_consortium_standard: Requires: python-dataframe-api-compat >= 0.1.7}
BuildArch: noarch
%description all
@@ -430,23 +448,29 @@ because they are not available as openSUSE RPM packages:
* pyxlsb
* s3fs
* dataframe-api-compat
* adbc-driver-postgresql
* adbc-driver-sqlite
* calamine
You can install them directly through `pip3 install --user`, if needed.
You can install them directly through `pip%{python_bin_suffix} install --user`, if needed.
%prep
# ATTENTION: unpack and generate _version_meson.py before any patches and modifications for a clean version
%setup -q -n pandas-%{version}
%if !%{with test}
# any installed python3 will do (SLE15 python module pythons does note guarantee /usr/bin/python3)
firstpython3=$(find %{_bindir} -regex '.*/python3[.0-9]*' -print -quit)
${firstpython3} generate_version.py -o _version_meson.py
sed -i "s|'python', 'generate_version.py',|'${firstpython3}', 'generate_version.py',|" meson.build
# use the last one from the buildset: need versioneer installed
%python_expand genpython="%__$python"
${genpython} generate_version.py -o _version_meson.py
sed -i "s|'generate_version.py',|'${genpython}', 'generate_version.py',|" meson.build
# don't require the PyPI data only tzdata package, we use the timezone RPM package
sed -i '/dependencies = \[/,/\]/ {/tzdata.*>=/d}' pyproject.toml
%endif
%autopatch -p1
%build
%if !%{with test}
%{?gccver:export CXX=g++-%{gccver}}
%{?gccver:export CC=gcc-%{gccver}}
export CFLAGS="%{optflags} -fno-strict-aliasing"
%pyproject_wheel
%endif
@@ -486,8 +510,16 @@ SKIP_MARKERS+=" or single_cpu"
SKIP_TESTS="test_pivot_number_of_levels_larger_than_int32"
# no locally running database server
SKIP_TESTS+=" or psycopg2_engine or psycopg2_conn or pymysql_engine or pymysql_conn"
SKIP_TESTS+=" or test_psycopg2_schema_support"
SKIP_TESTS+=" or test_self_join_date_columns"
# expects a dirty git revision from git repo
SKIP_TESTS+=" or test_git_version"
%if "%{flavor}" == "test-py312"
# https://github.com/pandas-dev/pandas/pull/57391, proposed change is not necessarily the right one
SKIP_TESTS+=" or (test_scalar_unary and numexpr-pandas)"
%endif
# Numpy2: unexpected 'np.str_(...)' in error message
SKIP_TESTS+=" or test_group_subplot_invalid_column_name"
%ifarch %{ix86} %{arm32}
# https://github.com/pandas-dev/pandas/issues/31856
@@ -496,6 +528,14 @@ SKIP_TESTS+=" or test_maybe_promote_int_with_int"
SKIP_TESTS+=" or (test_rolling_quantile_interpolation_options and data1 and linear and 0.1)"
# overflow
SKIP_TESTS+=" or test_large_string_pyarrow"
SKIP_TESTS+=" or test_pandas_nullable_with_missing_values"
SKIP_TESTS+=" or test_pandas_nullable_without_missing_values"
SKIP_TESTS+=" or (test_to_datetime and TestOrigin and test_epoch)"
SKIP_TESTS+=" or test_td_mul_numeric_ndarray_0d"
SKIP_TESTS+=" or test_get_indexer_non_unique_wrong_dtype"
# pyarrow read-only errors
SKIP_TESTS+=" or test_left_join_multi_index"
SKIP_TESTS+=" or test_join_on_single_col_dup_on_right"
# dtype mismatch
SKIP_TESTS+=" or test_frame_setitem_dask_array_into_new_col"
SKIP_TESTS+=" or test_get_indexer_arrow_dictionary_target"
@@ -505,6 +545,8 @@ SKIP_TESTS+=" or numba"
%ifarch %{ix86}
# overflows on i586
SKIP_TESTS+=" or test_encode_non_c_locale"
# intp != int32 (still numpy 1)?
SKIP_TESTS+=" or test_ensure_platform_int"
# fails on i586 (was gcc10-skip-one-test.patch)
SKIP_TESTS+=" or test_merge_on_ints_floats_warning"
%endif
@@ -556,13 +598,19 @@ xvfb-run pytest-%{$python_bin_suffix} -v -n %{jobs} -rsfE --dist=loadfile \
%doc README.md
%if !%{with ringdisabled}
%files %{python_files pyarrow}
%license LICENSE
%doc README.md
%files %{python_files performance}
%license LICENSE
%doc README.md
%if 0%{python_version_nodots} >= 310
%files %{python_files computation}
%license LICENSE
%doc README.md
%endif
%files %{python_files fss}
%license LICENSE
@@ -584,13 +632,13 @@ xvfb-run pytest-%{$python_bin_suffix} -v -n %{jobs} -rsfE --dist=loadfile \
%license LICENSE
%doc README.md
%if %{with have_pyarrow}
%if %{with pyarrow}
%files %{python_files parquet}
%license LICENSE
%doc README.md
%endif
%if %{with have_pyarrow}
%if %{with pyarrow}
%files %{python_files feather}
%license LICENSE
%doc README.md