Skip to content

Commit e788b63

Browse files
mceplbmwiedemann
authored andcommitted
Update python-pandas to version 2.2.2 / rev 66 via SR 1179390
https://build.opensuse.org/request/show/1179390 by user mcepl + anag+factory - 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)
1 parent 7e750e0 commit e788b63

File tree

6 files changed

+146
-2
lines changed

6 files changed

+146
-2
lines changed

packages/p/python-pandas/.files

137 Bytes
Binary file not shown.

packages/p/python-pandas/.rev

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,4 +685,20 @@ All packages broken by this update should be fixed now.</comment>
685685
- Skip build on Python 3.10 ... too many dependencies are missing.</comment>
686686
<requestid>1173512</requestid>
687687
</revision>
688+
<revision rev="66" vrev="3">
689+
<srcmd5>89813156252b79b8812270d3d2eb1cd2</srcmd5>
690+
<version>2.2.2</version>
691+
<time>1717957123</time>
692+
<user>anag+factory</user>
693+
<comment>- Add pandas-pr58269-pyarrow16xpass.patch
694+
(gh#pandas-dev/pandas!58269)
695+
- Add pandas-pr58720-xarray-dp.patch
696+
(gh#pandas-dev/pandas!58720), which makes pandas compatible
697+
with the modern xarray
698+
- Add pandas-pr58484-matplotlib.patch
699+
(gh#pandas-dev/pandas!58484), which makes pandas compatible
700+
with the modern matplotlib
701+
- Skip also test_plot_scatter_shape (gh#pandas-dev/pandas#58851)</comment>
702+
<requestid>1179390</requestid>
703+
</revision>
688704
</revisionlist>
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
From 0cab756077f5291f8d6a7fcfacaf374f62b866a0 Mon Sep 17 00:00:00 2001
2+
From: Elliott Sales de Andrade <[email protected]>
3+
Date: Mon, 29 Apr 2024 23:11:21 -0400
4+
Subject: [PATCH 1/2] Remove deprecated plot_date calls
5+
6+
These were deprecated in Matplotlib 3.9.
7+
---
8+
pandas/tests/plotting/test_datetimelike.py | 10 ++++------
9+
1 file changed, 4 insertions(+), 6 deletions(-)
10+
11+
diff --git a/pandas/tests/plotting/test_datetimelike.py b/pandas/tests/plotting/test_datetimelike.py
12+
index 6b709522bab70..b91bde41bf4c4 100644
13+
--- a/pandas/tests/plotting/test_datetimelike.py
14+
+++ b/pandas/tests/plotting/test_datetimelike.py
15+
@@ -1432,13 +1432,11 @@ def test_mpl_nopandas(self):
16+
values1 = np.arange(10.0, 11.0, 0.5)
17+
values2 = np.arange(11.0, 12.0, 0.5)
18+
19+
- kw = {"fmt": "-", "lw": 4}
20+
-
21+
_, ax = mpl.pyplot.subplots()
22+
- ax.plot_date([x.toordinal() for x in dates], values1, **kw)
23+
- ax.plot_date([x.toordinal() for x in dates], values2, **kw)
24+
-
25+
- line1, line2 = ax.get_lines()
26+
+ line1, line2, = ax.plot(
27+
+ [x.toordinal() for x in dates], values1, "-",
28+
+ [x.toordinal() for x in dates], values2, "-",
29+
+ linewidth=4)
30+
31+
exp = np.array([x.toordinal() for x in dates], dtype=np.float64)
32+
tm.assert_numpy_array_equal(line1.get_xydata()[:, 0], exp)
33+
34+
From 6d6574c4e71e3bab91503f85c8aa80c927785865 Mon Sep 17 00:00:00 2001
35+
From: "pre-commit-ci[bot]"
36+
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
37+
Date: Tue, 30 Apr 2024 16:47:26 +0000
38+
Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks
39+
40+
for more information, see https://pre-commit.ci
41+
---
42+
pandas/tests/plotting/test_datetimelike.py | 16 ++++++++++++----
43+
1 file changed, 12 insertions(+), 4 deletions(-)
44+
45+
diff --git a/pandas/tests/plotting/test_datetimelike.py b/pandas/tests/plotting/test_datetimelike.py
46+
index b91bde41bf4c4..4b4eeada58366 100644
47+
--- a/pandas/tests/plotting/test_datetimelike.py
48+
+++ b/pandas/tests/plotting/test_datetimelike.py
49+
@@ -1433,10 +1433,18 @@ def test_mpl_nopandas(self):
50+
values2 = np.arange(11.0, 12.0, 0.5)
51+
52+
_, ax = mpl.pyplot.subplots()
53+
- line1, line2, = ax.plot(
54+
- [x.toordinal() for x in dates], values1, "-",
55+
- [x.toordinal() for x in dates], values2, "-",
56+
- linewidth=4)
57+
+ (
58+
+ line1,
59+
+ line2,
60+
+ ) = ax.plot(
61+
+ [x.toordinal() for x in dates],
62+
+ values1,
63+
+ "-",
64+
+ [x.toordinal() for x in dates],
65+
+ values2,
66+
+ "-",
67+
+ linewidth=4,
68+
+ )
69+
70+
exp = np.array([x.toordinal() for x in dates], dtype=np.float64)
71+
tm.assert_numpy_array_equal(line1.get_xydata()[:, 0], exp)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
From d36f6dac81b577504386b53357270d9f05a9bc89 Mon Sep 17 00:00:00 2001
2+
From: Matthew Roeschke <[email protected]>
3+
Date: Tue, 14 May 2024 09:04:20 -1000
4+
Subject: [PATCH] Backport PR #58719: CI: xfail test_to_xarray_index_types due
5+
to new 2024.5 release
6+
7+
---
8+
pandas/tests/generic/test_to_xarray.py | 9 ++++++++-
9+
1 file changed, 8 insertions(+), 1 deletion(-)
10+
11+
diff --git a/pandas/tests/generic/test_to_xarray.py b/pandas/tests/generic/test_to_xarray.py
12+
index d8401a8b2ae3f..491f621783a76 100644
13+
--- a/pandas/tests/generic/test_to_xarray.py
14+
+++ b/pandas/tests/generic/test_to_xarray.py
15+
@@ -9,6 +9,7 @@
16+
date_range,
17+
)
18+
import pandas._testing as tm
19+
+from pandas.util.version import Version
20+
21+
pytest.importorskip("xarray")
22+
23+
@@ -29,11 +30,17 @@ def df(self):
24+
}
25+
)
26+
27+
- def test_to_xarray_index_types(self, index_flat, df, using_infer_string):
28+
+ def test_to_xarray_index_types(self, index_flat, df, using_infer_string, request):
29+
index = index_flat
30+
# MultiIndex is tested in test_to_xarray_with_multiindex
31+
if len(index) == 0:
32+
pytest.skip("Test doesn't make sense for empty index")
33+
+ import xarray
34+
+
35+
+ if Version(xarray.__version__) >= Version("2024.5"):
36+
+ request.applymarker(
37+
+ pytest.mark.xfail(reason="https://github.com/pydata/xarray/issues/9026")
38+
+ )
39+
40+
from xarray import Dataset
41+

packages/p/python-pandas/python-pandas.changes

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
-------------------------------------------------------------------
22
Sun May 12 17:57:39 UTC 2024 - Matej Cepl <[email protected]>
33

4-
- Reverting, apparently it was a bad idea.
4+
- Add pandas-pr58269-pyarrow16xpass.patch
5+
(gh#pandas-dev/pandas!58269)
6+
- Add pandas-pr58720-xarray-dp.patch
7+
(gh#pandas-dev/pandas!58720), which makes pandas compatible
8+
with the modern xarray
9+
- Add pandas-pr58484-matplotlib.patch
10+
(gh#pandas-dev/pandas!58484), which makes pandas compatible
11+
with the modern matplotlib
12+
- Skip also test_plot_scatter_shape (gh#pandas-dev/pandas#58851)
513

614
-------------------------------------------------------------------
715
Thu May 9 23:44:42 UTC 2024 - Matej Cepl <[email protected]>

packages/p/python-pandas/python-pandas.spec

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,13 @@ URL: https://pandas.pydata.org/
7070
# Must be created by cloning through `osc service runall`: gh#pandas-dev/pandas#54903, gh#pandas-dev/pandas#54907
7171
Source0: pandas-%{version}.tar.gz
7272
# PATCH-FIX-UPSTREAM pandas-pr58269-pyarrow16xpass.patch -- gh#pandas-dev/pandas#58269
73-
Patch0: https://github.com/pandas-dev/pandas/pull/58269.patch#/pandas-pr58269-pyarrow16xpass.patch
73+
Patch0: pandas-pr58269-pyarrow16xpass.patch
74+
# PATCH-FIX-UPSTREAM pandas-pr58720-xarray-dp.patch gh#pandas-dev/pandas!58720 [email protected]
75+
# make pandas compatible with the modern xarray
76+
Patch1: pandas-pr58720-xarray-dp.patch
77+
# PATCH-FIX-UPSTREAM pandas-pr58484-matplotlib.patch gh#pandas-dev/pandas!58484 [email protected]
78+
# make pandas compatible with the modern matplotlib
79+
Patch2: pandas-pr58484-matplotlib.patch
7480
%if !%{with test}
7581
BuildRequires: %{python_module Cython >= 3.0.5}
7682
BuildRequires: %{python_module devel >= 3.9}
@@ -508,6 +514,8 @@ SKIP_TESTS+=" or test_psycopg2_schema_support"
508514
SKIP_TESTS+=" or test_self_join_date_columns"
509515
# expects a dirty git revision from git repo
510516
SKIP_TESTS+=" or test_git_version"
517+
# gh#pandas-dev/pandas#58851 conflict with matplotlib 3.9.0
518+
SKIP_TESTS+=" or test_plot_scatter_shape"
511519
%if "%{flavor}" == "test-py312"
512520
# https://github.com/pandas-dev/pandas/pull/57391, proposed change is not necessary the right one
513521
SKIP_TESTS+=" or (test_scalar_unary and numexpr-pandas)"

0 commit comments

Comments
 (0)