From f7b061d8b425599c891c5b5da7bb2a703bbfbfd9 Mon Sep 17 00:00:00 2001 From: VirosaLi <2EkF8qUgpNkj> Date: Fri, 20 Nov 2020 16:58:17 -0600 Subject: [PATCH 1/4] CLN: remove panel compat shim --- doc/source/reference/panel.rst | 10 ---------- pandas/__init__.py | 17 +---------------- pandas/tests/test_downstream.py | 1 - scripts/validate_rst_title_capitalization.py | 1 - 4 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 doc/source/reference/panel.rst diff --git a/doc/source/reference/panel.rst b/doc/source/reference/panel.rst deleted file mode 100644 index 37d48c2dadf2e..0000000000000 --- a/doc/source/reference/panel.rst +++ /dev/null @@ -1,10 +0,0 @@ -{{ header }} - -.. _api.panel: - -===== -Panel -===== -.. currentmodule:: pandas - -``Panel`` was removed in 0.25.0. For prior documentation, see the `0.24 documentation `_ diff --git a/pandas/__init__.py b/pandas/__init__.py index cf7ae2505b72d..fb53e55531687 100644 --- a/pandas/__init__.py +++ b/pandas/__init__.py @@ -189,25 +189,10 @@ # GH 27101 -# TODO: remove Panel compat in 1.0 def __getattr__(name): import warnings - if name == "Panel": - - warnings.warn( - "The Panel class is removed from pandas. Accessing it " - "from the top-level namespace will also be removed in the next version", - FutureWarning, - stacklevel=2, - ) - - class Panel: - pass - - return Panel - - elif name == "datetime": + if name == "datetime": warnings.warn( "The pandas.datetime class is deprecated " "and will be removed from pandas in a future version. " diff --git a/pandas/tests/test_downstream.py b/pandas/tests/test_downstream.py index 392be699b6fc0..83016a08de90b 100644 --- a/pandas/tests/test_downstream.py +++ b/pandas/tests/test_downstream.py @@ -41,7 +41,6 @@ def test_dask(df): assert ddf.compute() is not None -@pytest.mark.filterwarnings("ignore:Panel class is removed") def test_xarray(df): xarray = import_module("xarray") # noqa diff --git a/scripts/validate_rst_title_capitalization.py b/scripts/validate_rst_title_capitalization.py index b8839c83d00b9..d521f2ee421be 100755 --- a/scripts/validate_rst_title_capitalization.py +++ b/scripts/validate_rst_title_capitalization.py @@ -138,7 +138,6 @@ "Google", "CategoricalDtype", "UTC", - "Panel", "False", "Styler", "os", From 55e3502b575a9c143ae662fdead7ae458e9920a5 Mon Sep 17 00:00:00 2001 From: VirosaLi <2EkF8qUgpNkj> Date: Fri, 20 Nov 2020 18:06:27 -0600 Subject: [PATCH 2/4] CLN: remove panel compat shim --- doc/source/reference/index.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/source/reference/index.rst b/doc/source/reference/index.rst index 9d5649c37e92f..f7c5eaf242b34 100644 --- a/doc/source/reference/index.rst +++ b/doc/source/reference/index.rst @@ -30,7 +30,6 @@ public functions related to data types in pandas. series frame arrays - panel indexing offset_frequency window From ec88e4928fba27b0202cd2d93e6ebdb40e9e08ac Mon Sep 17 00:00:00 2001 From: VirosaLi <2EkF8qUgpNkj> Date: Fri, 20 Nov 2020 20:39:24 -0600 Subject: [PATCH 3/4] bump min xarray version to 0.12.3 --- ci/deps/travis-37-locale.yaml | 2 +- doc/source/getting_started/install.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/deps/travis-37-locale.yaml b/ci/deps/travis-37-locale.yaml index e93a86910bf34..4e442b10482a7 100644 --- a/ci/deps/travis-37-locale.yaml +++ b/ci/deps/travis-37-locale.yaml @@ -34,7 +34,7 @@ dependencies: - pyarrow>=0.17 - pytables>=3.5.1 - scipy - - xarray=0.12.0 + - xarray=0.12.3 - xlrd - xlsxwriter - xlwt diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst index df481e8c986f7..c823ad01f10bf 100644 --- a/doc/source/getting_started/install.rst +++ b/doc/source/getting_started/install.rst @@ -284,7 +284,7 @@ pyxlsb 1.0.6 Reading for xlsb files qtpy Clipboard I/O s3fs 0.4.0 Amazon S3 access tabulate 0.8.3 Printing in Markdown-friendly format (see `tabulate`_) -xarray 0.12.0 pandas-like API for N-dimensional data +xarray 0.12.3 pandas-like API for N-dimensional data xclip Clipboard I/O on linux xlrd 1.2.0 Excel reading xlwt 1.3.0 Excel writing From 8a38555e35770510bc8295b2bc6008f33002a8be Mon Sep 17 00:00:00 2001 From: VirosaLi <2EkF8qUgpNkj> Date: Sat, 21 Nov 2020 10:55:20 -0600 Subject: [PATCH 4/4] whatsnew doc --- doc/source/whatsnew/v1.2.0.rst | 1 + pandas/compat/_optional.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst index bc5229d4b4296..08e379ad2b413 100644 --- a/doc/source/whatsnew/v1.2.0.rst +++ b/doc/source/whatsnew/v1.2.0.rst @@ -657,6 +657,7 @@ I/O - Parse missing values using :func:`read_json` with ``dtype=False`` to ``NaN`` instead of ``None`` (:issue:`28501`) - :meth:`read_fwf` was inferring compression with ``compression=None`` which was not consistent with the other :meth:``read_*`` functions (:issue:`37909`) - :meth:`DataFrame.to_html` was ignoring ``formatters`` argument for ``ExtensionDtype`` columns (:issue:`36525`) +- Bumped minimum xarray version to 0.12.3 to avoid reference to the removed ``Panel`` class (:issue:`27101`) Period ^^^^^^ diff --git a/pandas/compat/_optional.py b/pandas/compat/_optional.py index d3c7888cac704..533e67acfa2f4 100644 --- a/pandas/compat/_optional.py +++ b/pandas/compat/_optional.py @@ -25,7 +25,7 @@ "sqlalchemy": "1.2.8", "tables": "3.5.1", "tabulate": "0.8.3", - "xarray": "0.12.0", + "xarray": "0.12.3", "xlrd": "1.2.0", "xlwt": "1.3.0", "xlsxwriter": "1.0.2",