diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e583c2a1a..90eff77c2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -81,6 +81,10 @@ jobs: "os": ["ubuntu-latest", "macos-latest", "windows-latest"], "environment": ["test-310", "test-313", "test-314"], "include": [ + { + "environment": "test-pandas3", + "os": "ubuntu-latest" + }, { "environment": "test-311", "os": "ubuntu-latest" diff --git a/doc/conftest.py b/doc/conftest.py index 8adeb6b0a..864f3e27a 100644 --- a/doc/conftest.py +++ b/doc/conftest.py @@ -7,6 +7,7 @@ from packaging.version import Version, parse from bokeh.io.webdriver import webdriver_control +from hvplot.util import _PD_GE_3_0_0 # Examples that are slow to run and/or download large files. SLOW_EXAMPLES = [ @@ -56,6 +57,9 @@ 'ref/plotting_options/streaming.ipynb', ] +if _PD_GE_3_0_0: + # Because of fugue + collect_ignore_glob += ['ref/data_libraries.ipynb'] try: import ibis diff --git a/hvplot/tests/testfugue.py b/hvplot/tests/testfugue.py index 7f72d4269..865f0613e 100644 --- a/hvplot/tests/testfugue.py +++ b/hvplot/tests/testfugue.py @@ -4,6 +4,8 @@ import pandas as pd import pytest +from hvplot.util import _PD_GE_3_0_0 + # Patch required before importing hvplot.fugue hvplot.util._fugue_ipython = True @@ -27,6 +29,7 @@ def table(): return df +@pytest.mark.skipif(_PD_GE_3_0_0, reason='breaks with Pandas 3') def test_fugure_ipython_line(table, capsys): """hvplot works with Fugue""" fa.fugue_sql( diff --git a/hvplot/tests/testinteractive.py b/hvplot/tests/testinteractive.py index cf61d9cf7..b457fd4cb 100644 --- a/hvplot/tests/testinteractive.py +++ b/hvplot/tests/testinteractive.py @@ -156,13 +156,13 @@ def sel_col(col): dfi = Interactive(bind(sel_col, select)) assert type(dfi) is Interactive - assert dfi._obj is df.A + pd.testing.assert_series_equal(dfi._obj, df.A) assert isinstance(dfi._fn, pn.param.ParamFunction) assert dfi._transform == dim('*') assert dfi._method is None select.value = 'B' - assert dfi._obj is df.B + pd.testing.assert_series_equal(dfi._obj, df.B) def test_interactive_xarray_function(dataset): diff --git a/hvplot/util.py b/hvplot/util.py index 2f199befb..d22f3a7f2 100644 --- a/hvplot/util.py +++ b/hvplot/util.py @@ -37,6 +37,7 @@ _HV_VERSION = hv_version.release _HV_GE_1_21_0 = _HV_VERSION >= (1, 21, 0) +_PD_GE_3_0_0 = Version(pd.__version__).release >= (3, 0, 0) _fugue_ipython = None # To be set to True in tests to mock ipython diff --git a/pixi.toml b/pixi.toml index 7a16fcb45..2d59870fa 100644 --- a/pixi.toml +++ b/pixi.toml @@ -37,6 +37,10 @@ no-default-feature = true features = ["py314", "required", "test-core", "test", "example", "geo", "graphviz", "test-example"] no-default-feature = true +[environments.test-pandas3] +features = ["py313", "required", "test-core", "test", "example", "geo", "graphviz", "test-example", "pandas3"] +no-default-feature = true + [environments.test-core] features = ["py314", "required", "test-core"] no-default-feature = true @@ -270,3 +274,11 @@ pre-commit = "*" [feature.lint.tasks] lint = 'pre-commit run --all-files' lint-install = 'pre-commit install' + +# ================== SPECIAL ==================== + +[feature.pandas3] +channels = ["conda-forge/label/pandas_rc"] + +[feature.pandas3.dependencies] +pandas = { version = ">=3.0.0rc0,<3.0.0", channel = "conda-forge/label/pandas_rc" } diff --git a/pyproject.toml b/pyproject.toml index 0b2d1fd3c..62242a647 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -209,6 +209,8 @@ filterwarnings = [ "ignore:'_UnionGenericAlias' is deprecated and slated for removal in Python 3.17", # OK # 2025-12 "ignore:pkg_resources is deprecated as an API:UserWarning:fugue_sql_antlr.parser", + # 2025-12 + "ignore:The 'shapely.geos' module is deprecated:DeprecationWarning:geopandas._compat", ] [tool.codespell]