diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index 2a40be680c681..bc3ee2e500d22 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -25,8 +25,8 @@ jobs: strategy: matrix: settings: [ - [actions-38-db-min.yaml, "((not slow and not network and not clipboard) or (single and db))", "", "", "", "", ""], - [actions-38-db.yaml, "((not slow and not network and not clipboard) or (single and db))", "", "", "", "", ""], + [actions-38-downstream_compat.yaml, "not slow and not network and not clipboard", "", "", "", "", ""], + [actions-38-minimum_versions.yaml, "slow", "", "", "", "", ""], [actions-38-minimum_versions.yaml, "not slow and not network and not clipboard", "", "", "", "", ""], [actions-38-locale_slow.yaml, "slow", "language-pack-it xsel", "it_IT.utf8", "it_IT.utf8", "", ""], [actions-38.yaml, "not slow and not clipboard", "", "", "", "", ""], diff --git a/ci/deps/actions-38-db-min.yaml b/ci/deps/actions-38-db-min.yaml deleted file mode 100644 index f2b5a49ebfa97..0000000000000 --- a/ci/deps/actions-38-db-min.yaml +++ /dev/null @@ -1,45 +0,0 @@ -name: pandas-dev -channels: - - conda-forge -dependencies: - - python=3.8 - - # tools - - cython>=0.29.24 - - pytest>=6.0 - - pytest-cov - - pytest-xdist>=1.31 - - hypothesis>=5.5.3 - - # required - - numpy<1.20 # GH#39541 compat for pyarrow<3 - - python-dateutil - - pytz - - # optional - - beautifulsoup4 - - blosc=1.20.1 - - python-blosc - - fastparquet=0.4.0 - - html5lib - - ipython - - jinja2 - - lxml=4.5.0 - - matplotlib - - nomkl - - numexpr - - openpyxl - - pandas-gbq - - protobuf>=3.12.4 - - pyarrow=1.0.1 - - pytables>=3.6.1 - - scipy - - xarray=0.15.1 - - xlrd - - xlsxwriter - - xlwt - - # sql - - psycopg2=2.8.4 - - pymysql=0.10.1 - - sqlalchemy=1.4.0 diff --git a/ci/deps/actions-38-db.yaml b/ci/deps/actions-38-downstream_compat.yaml similarity index 74% rename from ci/deps/actions-38-db.yaml rename to ci/deps/actions-38-downstream_compat.yaml index ced15bbc8d7cb..af4f7dee851d5 100644 --- a/ci/deps/actions-38-db.yaml +++ b/ci/deps/actions-38-downstream_compat.yaml @@ -1,3 +1,4 @@ +# Non-dependencies that pandas utilizes or has compatibility with pandas objects name: pandas-dev channels: - conda-forge @@ -5,28 +6,30 @@ dependencies: - python=3.8 - pip - # tools + # test dependencies - cython>=0.29.24 - pytest>=6.0 - pytest-xdist>=1.31 - hypothesis>=5.5.3 - pytest-cov>=2.10.1 # this is only needed in the coverage build, ref: GH 35737 + - nomkl - # pandas dependencies - - aiobotocore<2.0.0 # GH#44311 pinned to fix docbuild + # required dependencies + - numpy + - python-dateutil + - pytz + + # optional dependencies - beautifulsoup4 - - boto3 - - botocore>=1.11 - - dask + - blosc - fastparquet>=0.4.0 - fsspec>=0.7.4 - - gcsfs>=0.6.0 - - geopandas + - gcsfs - html5lib + - jinja2 + - lxml - matplotlib - - nomkl - numexpr - - numpy=1.18 - odfpy - openpyxl - pandas-gbq @@ -34,21 +37,30 @@ dependencies: - pyarrow>=1.0.1 - pymysql - pytables - - python-snappy - - python-dateutil - - pytz + - pyxlsb - s3fs>=0.4.0 - - scikit-learn - scipy - sqlalchemy - - statsmodels - xarray - xlrd - xlsxwriter - xlwt + + # downstream packages + - aiobotocore<2.0.0 # GH#44311 pinned to fix docbuild + - boto3 + - botocore>=1.11 + - dask + - ipython + - geopandas + - python-snappy + - seaborn + - scikit-learn + - statsmodels - brotlipy - coverage - pandas-datareader - - pyxlsb + - pyyaml + - py - pip: - torch diff --git a/ci/deps/actions-38-locale.yaml b/ci/deps/actions-38-locale.yaml index b9157a1e74b1c..ef2288e2a24a6 100644 --- a/ci/deps/actions-38-locale.yaml +++ b/ci/deps/actions-38-locale.yaml @@ -19,7 +19,7 @@ dependencies: - jinja2 - jedi - lxml - - matplotlib<3.3.0 + - matplotlib - nomkl - numexpr - numpy<1.20 # GH#39541 compat with pyarrow<3 diff --git a/ci/deps/actions-38-locale_slow.yaml b/ci/deps/actions-38-locale_slow.yaml index e90acafa8bb2b..b16153398163b 100644 --- a/ci/deps/actions-38-locale_slow.yaml +++ b/ci/deps/actions-38-locale_slow.yaml @@ -13,18 +13,18 @@ dependencies: - hypothesis>=5.5.3 # pandas dependencies - - beautifulsoup4=4.8.2 - - bottleneck=1.3.1 + - beautifulsoup4 + - bottleneck - lxml - - matplotlib=3.3.2 - - numpy=1.18 - - openpyxl=3.0.2 + - matplotlib + - numpy + - openpyxl - python-dateutil - python-blosc - pytz=2020.1 - scipy - - sqlalchemy=1.4.0 - - xlrd=2.0.1 - - xlsxwriter=1.2.2 - - xlwt=1.3.0 - - html5lib=1.1 + - sqlalchemy + - xlrd + - xlsxwriter + - xlwt + - html5lib diff --git a/ci/deps/actions-38-minimum_versions.yaml b/ci/deps/actions-38-minimum_versions.yaml index cc1fd022ad24c..8505dad542239 100644 --- a/ci/deps/actions-38-minimum_versions.yaml +++ b/ci/deps/actions-38-minimum_versions.yaml @@ -1,10 +1,12 @@ +# Minimum version of required + optional dependencies +# Aligned with getting_started/install.rst and compat/_optional.py name: pandas-dev channels: - conda-forge dependencies: - python=3.8.0 - # tools + # test dependencies - cython=0.29.24 - pytest>=6.0 - pytest-cov @@ -12,20 +14,39 @@ dependencies: - hypothesis>=5.5.3 - psutil - # pandas dependencies + # required dependencies + - python-dateutil=2.8.1 + - numpy=1.18.5 + - pytz=2020.1 + + # optional dependencies - beautifulsoup4=4.8.2 + - blosc=1.20.1 - bottleneck=1.3.1 + - fastparquet=0.4.0 + - fsspec=0.7.4 + - html5lib=1.1 + - gcsfs=0.6.0 - jinja2=2.11 + - lxml=4.5.0 + - matplotlib=3.3.2 - numba=0.50.1 - numexpr=2.7.1 - - numpy=1.18.5 - - openpyxl=3.0.2 + - openpyxl=3.0.3 + - odfpy=1.4.1 + - pandas-gbq=0.14.0 + - psycopg2=2.8.4 + - pymysql=0.10.1 - pytables=3.6.1 - - python-dateutil=2.8.1 - - pytz=2020.1 - pyarrow=1.0.1 + - pyreadstat + - pyxlsb=1.0.6 + - s3fs=0.4.0 - scipy=1.4.1 + - sqlalchemy=1.4.0 + - tabulate=0.8.7 + - xarray=0.15.1 - xlrd=2.0.1 - xlsxwriter=1.2.2 - xlwt=1.3.0 - - html5lib=1.1 + - zstandard=0.15.2 diff --git a/ci/deps/actions-38.yaml b/ci/deps/actions-38.yaml index 899913d6e8c70..2ad31ce82b855 100644 --- a/ci/deps/actions-38.yaml +++ b/ci/deps/actions-38.yaml @@ -17,4 +17,4 @@ dependencies: - python-dateutil - nomkl - pytz - - tabulate==0.8.7 + - tabulate diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst index 28b9da137e86d..05c47d5cdf4f7 100644 --- a/doc/source/getting_started/install.rst +++ b/doc/source/getting_started/install.rst @@ -291,7 +291,7 @@ Dependency Minimum Version Notes xlrd 2.0.1 Reading Excel xlwt 1.3.0 Writing Excel xlsxwriter 1.2.2 Writing Excel -openpyxl 3.0.2 Reading / writing for xlsx files +openpyxl 3.0.3 Reading / writing for xlsx files pyxlsb 1.0.6 Reading for xlsb files ========================= ================== ============================================================= diff --git a/doc/source/whatsnew/v1.4.0.rst b/doc/source/whatsnew/v1.4.0.rst index 7c03e10c86bd4..26f0aa38ee66d 100644 --- a/doc/source/whatsnew/v1.4.0.rst +++ b/doc/source/whatsnew/v1.4.0.rst @@ -430,7 +430,7 @@ Optional libraries below the lowest tested version may still work, but are not c +-----------------+-----------------+---------+ | numba | 0.50.1 | X | +-----------------+-----------------+---------+ -| openpyxl | 3.0.2 | X | +| openpyxl | 3.0.3 | X | +-----------------+-----------------+---------+ | pyarrow | 1.0.1 | X | +-----------------+-----------------+---------+ diff --git a/pandas/compat/_optional.py b/pandas/compat/_optional.py index c3b7cfa3e0026..a2be663504abe 100644 --- a/pandas/compat/_optional.py +++ b/pandas/compat/_optional.py @@ -19,7 +19,7 @@ "matplotlib": "3.3.2", "numexpr": "2.7.1", "odfpy": "1.4.1", - "openpyxl": "3.0.2", + "openpyxl": "3.0.3", "pandas_gbq": "0.14.0", "pyarrow": "1.0.1", "pytest": "6.0", diff --git a/pandas/tests/io/test_fsspec.py b/pandas/tests/io/test_fsspec.py index bbfed852d8b38..e3e8358aa6340 100644 --- a/pandas/tests/io/test_fsspec.py +++ b/pandas/tests/io/test_fsspec.py @@ -3,6 +3,8 @@ import numpy as np import pytest +from pandas.compat._optional import VERSIONS + from pandas import ( DataFrame, date_range, @@ -289,7 +291,21 @@ def test_stata_options(fsspectest): @td.skip_if_no("tabulate") -def test_markdown_options(fsspectest): +def test_markdown_options(request, fsspectest): + import fsspec + + # error: Library stubs not installed for "tabulate" + # (or incompatible with Python 3.8) + import tabulate # type: ignore[import] + + request.node.add_marker( + pytest.mark.xfail( + fsspec.__version__ == VERSIONS["fsspec"] + and tabulate.__version__ == VERSIONS["tabulate"], + reason="Fails on the min version build", + raises=FileNotFoundError, + ) + ) df = DataFrame({"a": [0]}) df.to_markdown("testmem://afile", storage_options={"test": "md_write"}) assert fsspectest.test[0] == "md_write" diff --git a/pandas/tests/series/methods/test_reindex.py b/pandas/tests/series/methods/test_reindex.py index 4350a5d9ac989..a500252a44e07 100644 --- a/pandas/tests/series/methods/test_reindex.py +++ b/pandas/tests/series/methods/test_reindex.py @@ -171,10 +171,6 @@ def test_reindex_nearest(): tm.assert_series_equal(expected, result) -def test_reindex_backfill(): - pass - - def test_reindex_int(datetime_series): ts = datetime_series[::2] int_ts = Series(np.zeros(len(ts), dtype=int), index=ts.index)