diff --git a/49913.patch b/49913.patch deleted file mode 100644 index 266ea00144ba801b866b3a3b949499291b6c4c95..0000000000000000000000000000000000000000 --- a/49913.patch +++ /dev/null @@ -1,70 +0,0 @@ -From a7a17abcd9f03651ae07a0aa138668fd49287466 Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Fri, 25 Nov 2022 09:06:56 -0500 -Subject: [PATCH] TST: Fix some little-endian assumptions - -See previous PR#46681. ---- - pandas/tests/arrays/floating/test_arithmetic.py | 2 +- - pandas/tests/frame/methods/test_to_records.py | 14 ++++++++++++-- - pandas/tests/scalar/timedelta/test_arithmetic.py | 2 +- - 3 files changed, 14 insertions(+), 4 deletions(-) - -diff --git a/pandas/tests/arrays/floating/test_arithmetic.py b/pandas/tests/arrays/floating/test_arithmetic.py -index ec7419d6346a8..fdf2b00bdbac1 100644 ---- a/pandas/tests/arrays/floating/test_arithmetic.py -+++ b/pandas/tests/arrays/floating/test_arithmetic.py -@@ -162,7 +162,7 @@ def test_error_invalid_values(data, all_arithmetic_operators): - "not all arguments converted during string formatting", - "can't multiply sequence by non-int of type 'float'", - "ufunc 'subtract' cannot use operands with types dtype", -- r"ufunc 'add' cannot use operands with types dtype\(' -Date: Thu, 23 Mar 2023 20:13:55 -0400 -Subject: [PATCH 1/3] FIX: skip Axes not in subplot layouts - -As of mpl 3.7 all Axes now report as being instances of Subplots, however -ax.get_subplotspec() may now return None if the Axes is not actually in -gridspec. ---- - pandas/plotting/_matplotlib/core.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/pandas/plotting/_matplotlib/core.py b/pandas/plotting/_matplotlib/core.py -index 49b92e0984713..dd6b419c9a56b 100644 ---- a/pandas/plotting/_matplotlib/core.py -+++ b/pandas/plotting/_matplotlib/core.py -@@ -1112,7 +1112,9 @@ def _get_subplots(self): - from matplotlib.axes import Subplot - - return [ -- ax for ax in self.axes[0].get_figure().get_axes() if isinstance(ax, Subplot) -+ ax -+ for ax in self.axes[0].get_figure().get_axes() -+ if (isinstance(ax, Subplot) and ax.get_subplotspec() is not None) - ] - - def _get_axes_layout(self) -> tuple[int, int]: - -From 3e66bcb4985540b97306523a6827b6951b0e436c Mon Sep 17 00:00:00 2001 -From: Thomas A Caswell -Date: Thu, 23 Mar 2023 20:15:43 -0400 -Subject: [PATCH 2/3] MNT: avoid unneeded indirection - -The MPLPlot instance already holds a reference to the Figure, use that -instead of walking up from the first Axes. ---- - pandas/plotting/_matplotlib/core.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pandas/plotting/_matplotlib/core.py b/pandas/plotting/_matplotlib/core.py -index dd6b419c9a56b..54bd1c843da79 100644 ---- a/pandas/plotting/_matplotlib/core.py -+++ b/pandas/plotting/_matplotlib/core.py -@@ -1113,7 +1113,7 @@ def _get_subplots(self): - - return [ - ax -- for ax in self.axes[0].get_figure().get_axes() -+ for ax in self.fig.get_axes() - if (isinstance(ax, Subplot) and ax.get_subplotspec() is not None) - ] - - -From 67113f9560040d42e3b7b2fd099f0671537e241e Mon Sep 17 00:00:00 2001 -From: Thomas A Caswell -Date: Thu, 23 Mar 2023 20:20:38 -0400 -Subject: [PATCH 3/3] TST: add test of trying to layout a colorbar - ---- - pandas/tests/plotting/test_common.py | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git a/pandas/tests/plotting/test_common.py b/pandas/tests/plotting/test_common.py -index d4624cfc74872..faf8278675566 100644 ---- a/pandas/tests/plotting/test_common.py -+++ b/pandas/tests/plotting/test_common.py -@@ -40,3 +40,22 @@ def test__gen_two_subplots_with_ax(self): - subplot_geometry = list(axes[0].get_subplotspec().get_geometry()[:-1]) - subplot_geometry[-1] += 1 - assert subplot_geometry == [2, 1, 2] -+ -+ def test_colorbar_layout(self): -+ fig = self.plt.figure() -+ -+ axes = fig.subplot_mosaic( -+ """ -+ AB -+ CC -+ """ -+ ) -+ -+ x = [1, 2, 3] -+ y = [1, 2, 3] -+ -+ cs0 = axes["A"].scatter(x, y) -+ axes["B"].scatter(x, y) -+ -+ fig.colorbar(cs0, ax=[axes["A"], axes["B"]], location="right") -+ DataFrame(x).plot(ax=axes["C"]) diff --git a/e73d4d29203dab20e001beb1090d07683de583d6.patch b/e73d4d29203dab20e001beb1090d07683de583d6.patch deleted file mode 100644 index 544bc875dcea3bd22a76292c602916242b897ab0..0000000000000000000000000000000000000000 --- a/e73d4d29203dab20e001beb1090d07683de583d6.patch +++ /dev/null @@ -1,97 +0,0 @@ -From e73d4d29203dab20e001beb1090d07683de583d6 Mon Sep 17 00:00:00 2001 -From: Patrick Hoefler <61934744+phofl@users.noreply.github.com> -Date: Sat, 28 Jan 2023 08:37:26 -0500 -Subject: [PATCH] Backport PR #50925 on branch 1.5.x (TST: Remove fsspec - internals from tests) (#51038) - -TST: Remove fsspec internals from tests (#50925) - -Co-authored-by: Thomas Li <47963215+lithomas1@users.noreply.github.com> ---- - pandas/tests/io/test_fsspec.py | 2 -- - pandas/tests/io/test_gcs.py | 24 +++++------------------- - 2 files changed, 5 insertions(+), 21 deletions(-) - -diff --git a/pandas/tests/io/test_fsspec.py b/pandas/tests/io/test_fsspec.py -index 4f033fd63f978..fd1b30eca449e 100644 ---- a/pandas/tests/io/test_fsspec.py -+++ b/pandas/tests/io/test_fsspec.py -@@ -50,10 +50,8 @@ def test_read_csv(cleared_fs, df1): - - - def test_reasonable_error(monkeypatch, cleared_fs): -- from fsspec import registry - from fsspec.registry import known_implementations - -- registry.target.clear() - with pytest.raises(ValueError, match="nosuchprotocol"): - read_csv("nosuchprotocol://test/test.csv") - err_msg = "test error message" -diff --git a/pandas/tests/io/test_gcs.py b/pandas/tests/io/test_gcs.py -index 6907d8978e603..538969b7e226c 100644 ---- a/pandas/tests/io/test_gcs.py -+++ b/pandas/tests/io/test_gcs.py -@@ -22,17 +22,12 @@ - @pytest.fixture - def gcs_buffer(monkeypatch): - """Emulate GCS using a binary buffer.""" -- from fsspec import ( -- AbstractFileSystem, -- registry, -- ) -- -- registry.target.clear() # remove state -+ import fsspec - - gcs_buffer = BytesIO() - gcs_buffer.close = lambda: True - -- class MockGCSFileSystem(AbstractFileSystem): -+ class MockGCSFileSystem(fsspec.AbstractFileSystem): - def open(*args, **kwargs): - gcs_buffer.seek(0) - return gcs_buffer -@@ -41,7 +36,8 @@ def ls(self, path, **kwargs): - # needed for pyarrow - return [{"name": path, "type": "file"}] - -- monkeypatch.setattr("gcsfs.GCSFileSystem", MockGCSFileSystem) -+ # Overwrites the default implementation from gcsfs to our mock class -+ fsspec.register_implementation("gs", MockGCSFileSystem, clobber=True) - - return gcs_buffer - -@@ -54,9 +50,6 @@ def test_to_read_gcs(gcs_buffer, format): - - GH 33987 - """ -- from fsspec import registry -- -- registry.target.clear() # remove state - - df1 = DataFrame( - { -@@ -131,9 +124,6 @@ def test_to_csv_compression_encoding_gcs(gcs_buffer, compression_only, encoding) - GH 35677 (to_csv, compression), GH 26124 (to_csv, encoding), and - GH 32392 (read_csv, encoding) - """ -- from fsspec import registry -- -- registry.target.clear() # remove state - df = tm.makeDataFrame() - - # reference of compressed and encoded file -@@ -173,12 +163,8 @@ def test_to_csv_compression_encoding_gcs(gcs_buffer, compression_only, encoding) - @td.skip_if_no("gcsfs") - def test_to_parquet_gcs_new_file(monkeypatch, tmpdir): - """Regression test for writing to a not-yet-existent GCS Parquet file.""" -- from fsspec import ( -- AbstractFileSystem, -- registry, -- ) -+ from fsspec import AbstractFileSystem - -- registry.target.clear() # remove state - df1 = DataFrame( - { - "int": [1, 3], diff --git a/pandas-1.5.3-pyarrow-10-11.patch b/pandas-1.5.3-pyarrow-10-11.patch deleted file mode 100644 index 80ff651517e012dccfac3e1c2edf3d02da0b25f5..0000000000000000000000000000000000000000 --- a/pandas-1.5.3-pyarrow-10-11.patch +++ /dev/null @@ -1,335 +0,0 @@ -From 43d4450e7e7386eb3aebb286b6101889c32ba52c Mon Sep 17 00:00:00 2001 -From: Patrick Hoefler <61934744+phofl@users.noreply.github.com> -Date: Sat, 24 Dec 2022 20:49:35 +0100 -Subject: [PATCH 1/3] CI: Unpin pyarrow<10 (#50314) - -* CI: Unpin pyarrow<10 - -* Skip test ---- - .github/actions/setup-conda/action.yml | 2 +- - .github/workflows/ubuntu.yml | 2 +- - ci/deps/actions-310.yaml | 2 +- - ci/deps/actions-38-downstream_compat.yaml | 2 +- - ci/deps/actions-38.yaml | 2 +- - ci/deps/actions-39.yaml | 2 +- - ci/deps/circle-38-arm64.yaml | 2 +- - environment.yml | 2 +- - pandas/compat/pyarrow.py | 2 ++ - pandas/tests/arrays/interval/test_interval.py | 2 +- - pandas/tests/arrays/period/test_arrow_compat.py | 3 +++ - requirements-dev.txt | 2 +- - 12 files changed, 15 insertions(+), 10 deletions(-) - -diff --git a/.github/actions/setup-conda/action.yml b/.github/actions/setup-conda/action.yml -index 7d1e54052f..002d0020c2 100644 ---- a/.github/actions/setup-conda/action.yml -+++ b/.github/actions/setup-conda/action.yml -@@ -18,7 +18,7 @@ runs: - - name: Set Arrow version in ${{ inputs.environment-file }} to ${{ inputs.pyarrow-version }} - run: | - grep -q ' - pyarrow' ${{ inputs.environment-file }} -- sed -i"" -e "s/ - pyarrow<10/ - pyarrow=${{ inputs.pyarrow-version }}/" ${{ inputs.environment-file }} -+ sed -i"" -e "s/ - pyarrow/ - pyarrow=${{ inputs.pyarrow-version }}/" ${{ inputs.environment-file }} - cat ${{ inputs.environment-file }} - shell: bash - if: ${{ inputs.pyarrow-version }} -diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml -index 4602d12d85..8fd69a4851 100644 ---- a/.github/workflows/ubuntu.yml -+++ b/.github/workflows/ubuntu.yml -@@ -31,7 +31,7 @@ jobs: - pattern: ["not single_cpu", "single_cpu"] - # Don't test pyarrow v2/3: Causes timeouts in read_csv engine - # even if tests are skipped/xfailed -- pyarrow_version: ["5", "6", "7"] -+ pyarrow_version: ["5", "6", "7", "8", "9", "10"] - include: - - name: "Downstream Compat" - env_file: actions-38-downstream_compat.yaml -diff --git a/ci/deps/actions-310.yaml b/ci/deps/actions-310.yaml -index deb23d435b..6050a28e11 100644 ---- a/ci/deps/actions-310.yaml -+++ b/ci/deps/actions-310.yaml -@@ -39,7 +39,7 @@ dependencies: - - psycopg2 - - pymysql - - pytables -- - pyarrow<10 -+ - pyarrow - - pyreadstat - - python-snappy - - pyxlsb -diff --git a/ci/deps/actions-38-downstream_compat.yaml b/ci/deps/actions-38-downstream_compat.yaml -index 06ffafeb70..988eacdd0c 100644 ---- a/ci/deps/actions-38-downstream_compat.yaml -+++ b/ci/deps/actions-38-downstream_compat.yaml -@@ -38,7 +38,7 @@ dependencies: - - odfpy - - pandas-gbq - - psycopg2 -- - pyarrow<10 -+ - pyarrow - - pymysql - - pyreadstat - - pytables -diff --git a/ci/deps/actions-38.yaml b/ci/deps/actions-38.yaml -index 222da40ea9..131e2d1882 100644 ---- a/ci/deps/actions-38.yaml -+++ b/ci/deps/actions-38.yaml -@@ -37,7 +37,7 @@ dependencies: - - odfpy - - pandas-gbq - - psycopg2 -- - pyarrow<10 -+ - pyarrow - - pymysql - - pyreadstat - - pytables -diff --git a/ci/deps/actions-39.yaml b/ci/deps/actions-39.yaml -index 1c60e8ad6d..62e7397757 100644 ---- a/ci/deps/actions-39.yaml -+++ b/ci/deps/actions-39.yaml -@@ -38,7 +38,7 @@ dependencies: - - pandas-gbq - - psycopg2 - - pymysql -- - pyarrow<10 -+ - pyarrow - - pyreadstat - - pytables - - python-snappy -diff --git a/ci/deps/circle-38-arm64.yaml b/ci/deps/circle-38-arm64.yaml -index 263521fb74..512c47f0a6 100644 ---- a/ci/deps/circle-38-arm64.yaml -+++ b/ci/deps/circle-38-arm64.yaml -@@ -37,7 +37,7 @@ dependencies: - - odfpy - - pandas-gbq - - psycopg2 -- - pyarrow<10 -+ - pyarrow - - pymysql - # Not provided on ARM - #- pyreadstat -diff --git a/environment.yml b/environment.yml -index 20f839db9a..1620bad9b0 100644 ---- a/environment.yml -+++ b/environment.yml -@@ -38,7 +38,7 @@ dependencies: - - odfpy - - pandas-gbq - - psycopg2 -- - pyarrow<10 -+ - pyarrow - - pymysql - - pyreadstat - - pytables -diff --git a/pandas/compat/pyarrow.py b/pandas/compat/pyarrow.py -index 6965865acb..887ae49c3d 100644 ---- a/pandas/compat/pyarrow.py -+++ b/pandas/compat/pyarrow.py -@@ -18,6 +18,7 @@ try: - pa_version_under7p0 = _palv < Version("7.0.0") - pa_version_under8p0 = _palv < Version("8.0.0") - pa_version_under9p0 = _palv < Version("9.0.0") -+ pa_version_under10p0 = _palv < Version("10.0.0") - except ImportError: - pa_version_under1p01 = True - pa_version_under2p0 = True -@@ -28,3 +29,4 @@ except ImportError: - pa_version_under7p0 = True - pa_version_under8p0 = True - pa_version_under9p0 = True -+ pa_version_under10p0 = True -diff --git a/pandas/tests/arrays/interval/test_interval.py b/pandas/tests/arrays/interval/test_interval.py -index 2a6bea3255..0667082784 100644 ---- a/pandas/tests/arrays/interval/test_interval.py -+++ b/pandas/tests/arrays/interval/test_interval.py -@@ -287,7 +287,7 @@ def test_arrow_array(): - with pytest.raises(TypeError, match="Not supported to convert IntervalArray"): - pa.array(intervals, type="float64") - -- with pytest.raises(TypeError, match="different 'subtype'"): -+ with pytest.raises(TypeError, match="different 'subtype'|to convert IntervalArray"): - pa.array(intervals, type=ArrowIntervalType(pa.float64(), "left")) - - -diff --git a/pandas/tests/arrays/period/test_arrow_compat.py b/pandas/tests/arrays/period/test_arrow_compat.py -index 03fd146572..01a97d07a7 100644 ---- a/pandas/tests/arrays/period/test_arrow_compat.py -+++ b/pandas/tests/arrays/period/test_arrow_compat.py -@@ -1,5 +1,7 @@ - import pytest - -+from pandas.compat.pyarrow import pa_version_under10p0 -+ - from pandas.core.dtypes.dtypes import PeriodDtype - - import pandas as pd -@@ -26,6 +28,7 @@ def test_arrow_extension_type(): - assert not hash(p1) == hash(p3) - - -+@pytest.mark.xfail(not pa_version_under10p0, reason="Wrong behavior with pyarrow 10") - @pytest.mark.parametrize( - "data, freq", - [ -diff --git a/requirements-dev.txt b/requirements-dev.txt -index 95291e4ab5..1c7a011e5f 100644 ---- a/requirements-dev.txt -+++ b/requirements-dev.txt -@@ -29,7 +29,7 @@ openpyxl - odfpy - pandas-gbq - psycopg2 --pyarrow<10 -+pyarrow - pymysql - pyreadstat - tables --- -2.39.2 - - -From 5c2ced8f67fb248d6e5166b5dfdb03909de3123b Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Wed, 19 Apr 2023 11:36:21 -0400 -Subject: [PATCH 2/3] Add pandas.compat.pa_version_under11p0 - -Partial backport of #50998 / 52306d9 ---- - pandas/compat/__init__.py | 2 ++ - pandas/compat/pyarrow.py | 2 ++ - 2 files changed, 4 insertions(+) - -diff --git a/pandas/compat/__init__.py b/pandas/compat/__init__.py -index 80f66c945b..68f2495d0d 100644 ---- a/pandas/compat/__init__.py -+++ b/pandas/compat/__init__.py -@@ -29,6 +29,7 @@ from pandas.compat.pyarrow import ( - pa_version_under7p0, - pa_version_under8p0, - pa_version_under9p0, -+ pa_version_under11p0, - ) - - if TYPE_CHECKING: -@@ -163,4 +164,5 @@ __all__ = [ - "pa_version_under7p0", - "pa_version_under8p0", - "pa_version_under9p0", -+ "pa_version_under11p0", - ] -diff --git a/pandas/compat/pyarrow.py b/pandas/compat/pyarrow.py -index 887ae49c3d..ca51d74828 100644 ---- a/pandas/compat/pyarrow.py -+++ b/pandas/compat/pyarrow.py -@@ -19,6 +19,7 @@ try: - pa_version_under8p0 = _palv < Version("8.0.0") - pa_version_under9p0 = _palv < Version("9.0.0") - pa_version_under10p0 = _palv < Version("10.0.0") -+ pa_version_under11p0 = _palv < Version("11.0.0") - except ImportError: - pa_version_under1p01 = True - pa_version_under2p0 = True -@@ -30,3 +31,4 @@ except ImportError: - pa_version_under8p0 = True - pa_version_under9p0 = True - pa_version_under10p0 = True -+ pa_version_under11p0 = True --- -2.39.2 - - -From 8549bbe4e1144e2429612fa17e082ab9c1cba23f Mon Sep 17 00:00:00 2001 -From: Luke Manley -Date: Fri, 10 Feb 2023 13:15:08 -0500 -Subject: [PATCH 3/3] CI: unpin pyarrow, fix failing test (#51175) - -* unpin pyarrow, fix failing test - -* cleanup - -* handle NaT/NaN ---- - pandas/core/arrays/arrow/array.py | 12 ++++++++++++ - pandas/core/tools/timedeltas.py | 4 +++- - pandas/tests/extension/test_arrow.py | 12 +++++++++++- - 3 files changed, 26 insertions(+), 2 deletions(-) - -diff --git a/pandas/core/arrays/arrow/array.py b/pandas/core/arrays/arrow/array.py -index 4dfd8942c2..7031f4d80d 100644 ---- a/pandas/core/arrays/arrow/array.py -+++ b/pandas/core/arrays/arrow/array.py -@@ -259,6 +259,18 @@ class ArrowExtensionArray(OpsMixin, ExtensionArray): - from pandas.core.tools.timedeltas import to_timedelta - - scalars = to_timedelta(strings, errors="raise") -+ if pa_type.unit != "ns": -+ # GH51175: test_from_sequence_of_strings_pa_array -+ # attempt to parse as int64 reflecting pyarrow's -+ # duration to string casting behavior -+ mask = isna(scalars) -+ if not isinstance(strings, (pa.Array, pa.ChunkedArray)): -+ strings = pa.array(strings, type=pa.string(), from_pandas=True) -+ strings = pc.if_else(mask, None, strings) -+ try: -+ scalars = strings.cast(pa.int64()) -+ except pa.ArrowInvalid: -+ pass - elif pa.types.is_time(pa_type): - from pandas.core.tools.times import to_time - -diff --git a/pandas/core/tools/timedeltas.py b/pandas/core/tools/timedeltas.py -index 5026c97c0b..67ba7818d1 100644 ---- a/pandas/core/tools/timedeltas.py -+++ b/pandas/core/tools/timedeltas.py -@@ -236,7 +236,9 @@ def _convert_listlike(arg, unit=None, errors="raise", name=None): - # returning arg (errors == "ignore"), and where the input is a - # generator, we return a useful list-like instead of a - # used-up generator -- arg = np.array(list(arg), dtype=object) -+ if not hasattr(arg, "__array__"): -+ arg = list(arg) -+ arg = np.array(arg, dtype=object) - - try: - td64arr = sequence_to_td64ns(arg, unit=unit, errors=errors, copy=False)[0] -diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py -index b7ddb1f248..689bd29dfd 100644 ---- a/pandas/tests/extension/test_arrow.py -+++ b/pandas/tests/extension/test_arrow.py -@@ -30,6 +30,7 @@ from pandas.compat import ( - pa_version_under7p0, - pa_version_under8p0, - pa_version_under9p0, -+ pa_version_under11p0, - ) - from pandas.errors import PerformanceWarning - -@@ -272,7 +273,7 @@ class TestConstructors(base.BaseConstructorsTests): - reason="Nanosecond time parsing not supported.", - ) - ) -- elif pa.types.is_duration(pa_dtype): -+ elif pa_version_under11p0 and pa.types.is_duration(pa_dtype): - request.node.add_marker( - pytest.mark.xfail( - raises=pa.ArrowNotImplementedError, -@@ -1707,3 +1708,12 @@ def test_mode(data_for_grouping, dropna, take_idx, exp_idx, request): - result = ser.mode(dropna=dropna) - expected = pd.Series(data_for_grouping.take(exp_idx)) - tm.assert_series_equal(result, expected) -+ -+@pytest.mark.parametrize("unit", ["ns", "us", "ms", "s"]) -+def test_duration_from_strings_with_nat(unit): -+ # GH51175 -+ strings = ["1000", "NaT"] -+ pa_type = pa.duration(unit) -+ result = ArrowExtensionArray._from_sequence_of_strings(strings, dtype=pa_type) -+ expected = ArrowExtensionArray(pa.array([1000, None], type=pa_type)) -+ tm.assert_extension_array_equal(result, expected) --- -2.39.2 - diff --git a/pandas-1.5.3.tar.gz b/pandas-1.5.3.tar.gz deleted file mode 100644 index 0ab722c5fceb439e09365ec41d8c250abd10af63..0000000000000000000000000000000000000000 Binary files a/pandas-1.5.3.tar.gz and /dev/null differ diff --git a/pandas-2.1.4.tar.gz b/pandas-2.1.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e38386aaffa29f3a1dbcfc17accd8add4fce746d Binary files /dev/null and b/pandas-2.1.4.tar.gz differ diff --git a/python-pandas.spec b/python-pandas.spec index 2b52d456b2bad4812aa0ee8402a6874c9d75c506..71c33aba06997530b9e4adb34ce2bf1fe62a035e 100644 --- a/python-pandas.spec +++ b/python-pandas.spec @@ -1,4 +1,4 @@ -%define anolis_release 3 +%define anolis_release 1 # We need to break some cycles with optional dependencies for bootstrapping; # given that a conditional is needed, we take the opportunity to omit as many # optional dependencies as possible for bootstrapping. @@ -13,7 +13,7 @@ %bcond_without single_tests Name: python-pandas -Version: 1.5.3 +Version: 2.1.4 Release: %{anolis_release}%{?dist} Summary: Python library providing high-performance data analysis tools @@ -75,65 +75,7 @@ URL: https://pandas.pydata.org/ # The GitHub archive contains tests; the PyPI sdist does not. Source0: https://github.com/pandas-dev/pandas/archive/v%{version}/pandas-%{version}.tar.gz -# Fix some little-endian assumptions in the tests -# https://github.com/pandas-dev/pandas/pull/49913 -Patch: https://github.com/pandas-dev/pandas/pull/49913.patch - -# [PATCH] Backport PR #50925 on branch 1.5.x (TST: Remove fsspec internals from -# tests) (#51038) -# -# TST: Remove fsspec internals from tests (#50925) -# https://github.com/pandas-dev/pandas/commit/e73d4d29203dab20e001beb1090d07683de583d6 -# fixes: -# ERROR at setup of test_to_read_gcs[…] -Patch: https://github.com/pandas-dev/pandas/commit/e73d4d29203dab20e001beb1090d07683de583d6.patch - -# Fix/mpl37 compat -# https://github.com/pandas-dev/pandas/pull/52150 -# Fixes: -# python-pandas: FTBFS in Fedora rawhide/f38 -# https://bugzilla.redhat.com/show_bug.cgi?id=2171682 -Patch: https://github.com/pandas-dev/pandas/pull/52150.patch - -# CI: Unpin pyarrow<10 -# https://github.com/pandas-dev/pandas/pull/50314 -# -# Merged upstream as 4878dfe551da2fa8e2bc33e774b595f099bfa74e: -# CI: Unpin pyarrow<10 (#50314) -# * CI: Unpin pyarrow<10 -# * Skip test -# -# ---- -# -# Add pandas.compat.pa_version_under11p0, required for pyarrow 11 support, from -# the following PR/commit, but without the other associated changes: -# -# ENH: support reductions for pyarrow temporal types (#50998) -# https://github.com/pandas-dev/pandas/pull/50998 -# -# Merged upstream as 52306d957cb77a3823624679bb9606e244e7faa8: -# ENH: support reductions for pyarrow temporal types -# * unit check -# * lint fixup -# -# ---- -# -# CI: unpin pyarrow, fix failing test -# https://github.com/pandas-dev/pandas/pull/51175 -# -# Merged upstream as 5f584bd29be7203db64bdf8619991927e29c74bc: -# CI: unpin pyarrow, fix failing test (#51175) -# * unpin pyarrow, fix failing test -# * cleanup -# * handle NaT/NaN -# -# ---- -# -# All commits cherry-picked to tag v1.5.3 and combined into a single patch. -Patch: pandas-1.5.3-pyarrow-10-11.patch - %global _description %{expand: -pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language.} @@ -268,10 +210,17 @@ BuildRequires: gcc-c++ BuildRequires: python3-devel -# Since numpy is imported in setup.py, we need it to generate BR’s. This only -# becomes obvious during bootstrapping, in which the many optional dependencies -# that indirectly require numpy are removed. -BuildRequires: python3dist(numpy) +# Runtime dependencies +BuildRequires: python3dist(numpy) >= 1.26 +BuildRequires: python3dist(python-dateutil) >= 2.8.2 +BuildRequires: python3dist(pytz) >= 2020.1 + +%if %{with tests} +# From the [test] extra +BuildRequires: python3dist(hypothesis) +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(pytest-xdist) +%endif %if %{without bootstrap} @@ -436,8 +385,6 @@ Recommends: python3dist(flask) # Already covered by “test” extra # BuildRequires: python3dist(pytest) >= 5.0.1 # Requires: python3dist(pytest) >= 5.0.1 -# BuildRequires: python3dist(pytest-cov) -# Recommends: python3dist(pytest-cov) # Already covered by “test” extra # BuildRequires: python3dist(pytest-xdist) >= 1.21 # Requires: python3dist(pytest-xdist) >= 1.21 @@ -499,16 +446,29 @@ These are the tests for python3-pandas. This package: %prep %autosetup -n pandas-%{version} -p1 +# Let versioneer know what version this is +echo '__version__="%{version}"' > _version_meson.py + # Ensure Cython-generated sources are re-generated rm -vf $(grep -rl '/\* Generated by Cython') # We just want to build with the numpy in Fedora: sed -r -i '/\boldest-supported-numpy\b/d' pyproject.toml +# We don't need the python tzdata package because we have the system tzdata package +sed -i '/tzdata>=2022.1/d' pyproject.toml -%generate_buildrequires -%pyproject_buildrequires -r %{?with_tests:-x test} +# Unpin meson +sed -i 's/meson-python==0.13.1/meson-python>=0.13.1/' pyproject.toml +sed -i 's/meson==1.2.1/meson>=1.2.1/' pyproject.toml +# Unpin Cython +sed -i 's/Cython>=0.29.33,<3/Cython>=0.29.33/' pyproject.toml + +%generate_buildrequires +# the build is expensive, so we don't use -w +# we list the runtime and test BuildRequires manually +%pyproject_buildrequires -R %build %pyproject_wheel @@ -598,9 +558,7 @@ export PYTHONHASHSEED="$( %constrain_build -c 1 %pytest -v '%{buildroot}%{python3_sitearch}/pandas' \ - %{?!with_slow_tests:--skip-slow} \ - --skip-network \ - --skip-db \ + --no-strict-data-files \ -m "${m-}" \ -k "${k-}" \ -n %{_smp_build_ncpus} \ @@ -626,7 +584,6 @@ export PYTHONHASHSEED="$( # the package without the overall license file in it. %license LICENSE LICENSES/ %doc README.md -%doc RELEASE.md %exclude %{python3_sitearch}/pandas/tests @@ -636,6 +593,9 @@ export PYTHONHASHSEED="$( %changelog +* Thu Jun 19 2025 yangcheng - 2.1.4-1 +- Update to 2.1.4 adapt to the cython version + * Thu Jul 25 2024 Wenlong Zhang - 1.5.3-3 - rebuild for loongarch64