From a8133dd892fe709b2005701d26924ba3c466474f Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Sun, 13 Jun 2021 17:18:55 -0500 Subject: [PATCH 01/29] DEPS: drop Python 3.7 and NumPy 1.17 --- ci/deps/actions-37-locale_slow.yaml | 30 ------------------ ci/deps/actions-37-minimum_versions.yaml | 31 ------------------- ci/deps/actions-37.yaml | 28 ----------------- ...-37-db-min.yaml => actions-38-db-min.yaml} | 18 +++++------ ...{actions-37-db.yaml => actions-38-db.yaml} | 6 ++-- ci/deps/actions-38-locale.yaml | 6 ++-- ci/deps/actions-38-locale_slow.yaml | 30 ++++++++++++++++++ ci/deps/actions-38-minimum_versions.yaml | 31 +++++++++++++++++++ ci/deps/actions-38-slow.yaml | 6 ++-- ci/deps/actions-38.yaml | 6 ++-- ...numpydev.yaml => actions-39-numpydev.yaml} | 6 ++-- ...ions-37-slow.yaml => actions-39-slow.yaml} | 7 ++--- ci/deps/actions-39.yaml | 6 ++-- ...zure-macos-37.yaml => azure-macos-38.yaml} | 12 +++---- ci/deps/azure-windows-38.yaml | 10 +++--- ...-windows-37.yaml => azure-windows-39.yaml} | 12 +++---- ...cle-37-arm64.yaml => circle-38-arm64.yaml} | 6 ++-- environment.yml | 23 +++++++------- pandas/__init__.py | 5 +-- pandas/compat/__init__.py | 3 -- pandas/compat/numpy/__init__.py | 3 +- pandas/core/common.py | 3 +- pandas/tests/api/test_api.py | 1 - pandas/tests/arrays/test_datetimelike.py | 16 ++-------- pandas/tests/computation/test_eval.py | 11 ++----- pandas/tests/frame/methods/test_sample.py | 14 ++------- .../tests/indexes/period/test_searchsorted.py | 9 +----- pandas/tests/indexes/test_numpy_compat.py | 9 +----- pandas/tests/io/json/test_pandas.py | 3 +- pandas/tests/io/test_parquet.py | 7 ++--- pandas/tests/io/test_pickle.py | 2 -- pandas/tests/io/xml/test_to_xml.py | 17 ---------- pandas/tests/io/xml/test_xml.py | 5 --- pandas/tests/scalar/test_nat.py | 14 +-------- .../scalar/timestamp/test_constructors.py | 5 --- pandas/tests/test_common.py | 19 +++++------- pyproject.toml | 3 +- requirements-dev.txt | 23 +++++++------- setup.cfg | 13 ++++---- 39 files changed, 164 insertions(+), 295 deletions(-) delete mode 100644 ci/deps/actions-37-locale_slow.yaml delete mode 100644 ci/deps/actions-37-minimum_versions.yaml delete mode 100644 ci/deps/actions-37.yaml rename ci/deps/{actions-37-db-min.yaml => actions-38-db-min.yaml} (77%) rename ci/deps/{actions-37-db.yaml => actions-38-db.yaml} (92%) create mode 100644 ci/deps/actions-38-locale_slow.yaml create mode 100644 ci/deps/actions-38-minimum_versions.yaml rename ci/deps/{actions-38-numpydev.yaml => actions-39-numpydev.yaml} (84%) rename ci/deps/{actions-37-slow.yaml => actions-39-slow.yaml} (86%) rename ci/deps/{azure-macos-37.yaml => azure-macos-38.yaml} (76%) rename ci/deps/{azure-windows-37.yaml => azure-windows-39.yaml} (80%) rename ci/deps/{circle-37-arm64.yaml => circle-38-arm64.yaml} (78%) diff --git a/ci/deps/actions-37-locale_slow.yaml b/ci/deps/actions-37-locale_slow.yaml deleted file mode 100644 index c6eb3b00a63ac..0000000000000 --- a/ci/deps/actions-37-locale_slow.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: pandas-dev -channels: - - defaults - - conda-forge -dependencies: - - python=3.7.* - - # tools - - cython>=0.29.21 - - pytest>=6.0 - - pytest-cov - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 - - # pandas dependencies - - beautifulsoup4=4.6.0 - - bottleneck=1.2.* - - lxml - - matplotlib=3.0.0 - - numpy=1.17.* - - openpyxl=3.0.0 - - python-dateutil - - python-blosc - - pytz=2017.3 - - scipy - - sqlalchemy=1.3.0 - - xlrd=1.2.0 - - xlsxwriter=1.0.2 - - xlwt=1.3.0 - - html5lib=1.0.1 diff --git a/ci/deps/actions-37-minimum_versions.yaml b/ci/deps/actions-37-minimum_versions.yaml deleted file mode 100644 index b97601d18917c..0000000000000 --- a/ci/deps/actions-37-minimum_versions.yaml +++ /dev/null @@ -1,31 +0,0 @@ -name: pandas-dev -channels: - - conda-forge -dependencies: - - python=3.7.1 - - # tools - - cython=0.29.21 - - pytest>=6.0 - - pytest-cov - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 - - psutil - - # pandas dependencies - - beautifulsoup4=4.6.0 - - bottleneck=1.2.1 - - jinja2=2.10 - - numba=0.46.0 - - numexpr=2.7.0 - - numpy=1.17.3 - - openpyxl=3.0.0 - - pytables=3.5.1 - - python-dateutil=2.7.3 - - pytz=2017.3 - - pyarrow=0.17.0 - - scipy=1.2 - - xlrd=1.2.0 - - xlsxwriter=1.0.2 - - xlwt=1.3.0 - - html5lib=1.0.1 diff --git a/ci/deps/actions-37.yaml b/ci/deps/actions-37.yaml deleted file mode 100644 index 0effe6f80df86..0000000000000 --- a/ci/deps/actions-37.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: pandas-dev -channels: - - defaults - - conda-forge -dependencies: - - python=3.7.* - - # tools - - cython>=0.29.21 - - pytest>=6.0 - - pytest-cov - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 - - # pandas dependencies - - botocore>=1.11 - - fsspec>=0.7.4 - - numpy=1.19 - - python-dateutil - - nomkl - - pyarrow - - pytz - - s3fs>=0.4.0 - - moto>=1.3.14 - - flask - - tabulate - - pyreadstat - - pip diff --git a/ci/deps/actions-37-db-min.yaml b/ci/deps/actions-38-db-min.yaml similarity index 77% rename from ci/deps/actions-37-db-min.yaml rename to ci/deps/actions-38-db-min.yaml index cae4361ca37a7..a7daadd7ffe1e 100644 --- a/ci/deps/actions-37-db-min.yaml +++ b/ci/deps/actions-38-db-min.yaml @@ -2,14 +2,14 @@ name: pandas-dev channels: - conda-forge dependencies: - - python=3.7.* + - python=3.8 # tools - cython>=0.29.21 - pytest>=6.0 - pytest-cov - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 + - pytest-xdist>=1.31 + - hypothesis>=5.5.3 # required - numpy<1.20 # GH#39541 compat for pyarrow<3 @@ -18,13 +18,13 @@ dependencies: # optional - beautifulsoup4 - - blosc=1.17.0 + - blosc=1.20.1 - python-blosc - fastparquet=0.4.0 - html5lib - ipython - jinja2 - - lxml=4.3.0 + - lxml=4.5.0 - matplotlib - nomkl - numexpr @@ -35,7 +35,7 @@ dependencies: - pyarrow=0.17.1 # GH 38803 - pytables>=3.5.1 - scipy - - xarray=0.12.3 + - xarray=0.15.1 - xlrd<2.0 - xlsxwriter - xlwt @@ -43,6 +43,6 @@ dependencies: - flask # sql - - psycopg2=2.7 - - pymysql=0.8.1 - - sqlalchemy=1.3.0 + - psycopg2=2.8.4 + - pymysql=0.10.1 + - sqlalchemy=1.3.11 diff --git a/ci/deps/actions-37-db.yaml b/ci/deps/actions-38-db.yaml similarity index 92% rename from ci/deps/actions-37-db.yaml rename to ci/deps/actions-38-db.yaml index e568f8615a8df..d1a8ce03e9333 100644 --- a/ci/deps/actions-37-db.yaml +++ b/ci/deps/actions-38-db.yaml @@ -2,13 +2,13 @@ name: pandas-dev channels: - conda-forge dependencies: - - python=3.7.* + - python=3.8 # tools - cython>=0.29.21 - pytest>=6.0 - - pytest-xdist>=1.21 - - hypothesis>=3.58.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 # pandas dependencies diff --git a/ci/deps/actions-38-locale.yaml b/ci/deps/actions-38-locale.yaml index 34a6860936550..24c9e5eaa7cbb 100644 --- a/ci/deps/actions-38-locale.yaml +++ b/ci/deps/actions-38-locale.yaml @@ -2,15 +2,15 @@ name: pandas-dev channels: - conda-forge dependencies: - - python=3.8.* + - python=3.8 # tools - cython>=0.29.21 - pytest>=6.0 - pytest-cov - - pytest-xdist>=1.21 + - pytest-xdist>=1.31 - pytest-asyncio>=0.12.0 - - hypothesis>=3.58.0 + - hypothesis>=5.5.3 # pandas dependencies - beautifulsoup4 diff --git a/ci/deps/actions-38-locale_slow.yaml b/ci/deps/actions-38-locale_slow.yaml new file mode 100644 index 0000000000000..d29a416a3cd7c --- /dev/null +++ b/ci/deps/actions-38-locale_slow.yaml @@ -0,0 +1,30 @@ +name: pandas-dev +channels: + - defaults + - conda-forge +dependencies: + - python=3.8.* + + # tools + - cython>=0.29.21 + - pytest>=6.0 + - pytest-cov + - pytest-xdist>=1.31 + - hypothesis>=5.5.3 + + # pandas dependencies + - beautifulsoup4=4.8.2 + - bottleneck=1.3.1 + - lxml + - matplotlib=3.1.3 + - numpy=1.18.* + - openpyxl=3.0.2 + - python-dateutil + - python-blosc + - pytz=2020.1 + - scipy + - sqlalchemy=1.3.11 + - xlrd=2.0.1 + - xlsxwriter=1.2.2 + - xlwt=1.3.0 + - html5lib=1.1 diff --git a/ci/deps/actions-38-minimum_versions.yaml b/ci/deps/actions-38-minimum_versions.yaml new file mode 100644 index 0000000000000..3bf6e098b32b3 --- /dev/null +++ b/ci/deps/actions-38-minimum_versions.yaml @@ -0,0 +1,31 @@ +name: pandas-dev +channels: + - conda-forge +dependencies: + - python=3.8.0 + + # tools + - cython=0.29.21 + - pytest>=6.0 + - pytest-cov + - pytest-xdist>=1.31 + - hypothesis>=5.5.3 + - psutil + + # pandas dependencies + - beautifulsoup4=4.8.2 + - bottleneck=1.3.1 + - jinja2=2.11 + - numba=0.48.0 + - numexpr=2.7.1 + - numpy=1.18.3 + - openpyxl=3.0.2 + - pytables=3.6.1 + - python-dateutil=2.8.1 + - pytz=2020.1 + - pyarrow=0.17.0 + - scipy=1.4.1 + - xlrd=2.0.1 + - xlsxwriter=1.2.2 + - xlwt=1.3.0 + - html5lib=1.1 diff --git a/ci/deps/actions-38-slow.yaml b/ci/deps/actions-38-slow.yaml index afba60e451b90..da779dd9b6ac0 100644 --- a/ci/deps/actions-38-slow.yaml +++ b/ci/deps/actions-38-slow.yaml @@ -2,14 +2,14 @@ name: pandas-dev channels: - conda-forge dependencies: - - python=3.8.* + - python=3.8 # tools - cython>=0.29.21 - pytest>=6.0 - pytest-cov - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 + - pytest-xdist>=1.31 + - hypothesis>=5.5.3 # pandas dependencies - beautifulsoup4 diff --git a/ci/deps/actions-38.yaml b/ci/deps/actions-38.yaml index 11daa92046eb4..86b038ff7d4b6 100644 --- a/ci/deps/actions-38.yaml +++ b/ci/deps/actions-38.yaml @@ -3,14 +3,14 @@ channels: - defaults - conda-forge dependencies: - - python=3.8.* + - python=3.8 # tools - cython>=0.29.21 - pytest>=6.0 - pytest-cov - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 + - pytest-xdist>=1.31 + - hypothesis>=5.5.3 # pandas dependencies - numpy diff --git a/ci/deps/actions-38-numpydev.yaml b/ci/deps/actions-39-numpydev.yaml similarity index 84% rename from ci/deps/actions-38-numpydev.yaml rename to ci/deps/actions-39-numpydev.yaml index 6eed2daac0c3b..466ca6215f46a 100644 --- a/ci/deps/actions-38-numpydev.yaml +++ b/ci/deps/actions-39-numpydev.yaml @@ -2,13 +2,13 @@ name: pandas-dev channels: - defaults dependencies: - - python=3.8.* + - python=3.9 # tools - pytest>=6.0 - pytest-cov - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 + - pytest-xdist>=1.31 + - hypothesis>=5.5.3 # pandas dependencies - pytz diff --git a/ci/deps/actions-37-slow.yaml b/ci/deps/actions-39-slow.yaml similarity index 86% rename from ci/deps/actions-37-slow.yaml rename to ci/deps/actions-39-slow.yaml index 166f2237dcad3..42ab34c5b484f 100644 --- a/ci/deps/actions-37-slow.yaml +++ b/ci/deps/actions-39-slow.yaml @@ -3,14 +3,14 @@ channels: - defaults - conda-forge dependencies: - - python=3.7.* + - python=3.9 # tools - cython>=0.29.21 - pytest>=6.0 - pytest-cov - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 + - pytest-xdist>=1.31 + - hypothesis>=5.5.3 # pandas dependencies - beautifulsoup4 @@ -33,7 +33,6 @@ dependencies: - sqlalchemy - xlrd<2.0 - xlsxwriter - - xlwt - moto - flask - numba diff --git a/ci/deps/actions-39.yaml b/ci/deps/actions-39.yaml index b74f1af8ee0f6..2d6d58b59ba3c 100644 --- a/ci/deps/actions-39.yaml +++ b/ci/deps/actions-39.yaml @@ -2,14 +2,14 @@ name: pandas-dev channels: - conda-forge dependencies: - - python=3.9.* + - python=3.9 # tools - cython>=0.29.21 - pytest>=6.0 - pytest-cov - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 + - pytest-xdist>=1.31 + - hypothesis>=5.5.3 # pandas dependencies - numpy diff --git a/ci/deps/azure-macos-37.yaml b/ci/deps/azure-macos-38.yaml similarity index 76% rename from ci/deps/azure-macos-37.yaml rename to ci/deps/azure-macos-38.yaml index 43e1055347f17..7cda719dc1a15 100644 --- a/ci/deps/azure-macos-37.yaml +++ b/ci/deps/azure-macos-38.yaml @@ -3,12 +3,12 @@ channels: - defaults - conda-forge dependencies: - - python=3.7.* + - python=3.8 # tools - pytest>=6.0 - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 + - pytest-xdist>=1.31 + - hypothesis>=5.5.3 - pytest-azurepipelines # pandas dependencies @@ -17,14 +17,14 @@ dependencies: - html5lib - jinja2 - lxml - - matplotlib=2.2.3 + - matplotlib=3.1.3 - nomkl - numexpr - - numpy=1.17.3 + - numpy=1.18.3 - openpyxl - pyarrow=0.17 - pytables - - python-dateutil==2.7.3 + - python-dateutil==2.8.1 - pytz - xarray - xlrd<2.0 diff --git a/ci/deps/azure-windows-38.yaml b/ci/deps/azure-windows-38.yaml index 7fdecae626f9d..680c1bfa3bfdb 100644 --- a/ci/deps/azure-windows-38.yaml +++ b/ci/deps/azure-windows-38.yaml @@ -3,13 +3,13 @@ channels: - conda-forge - defaults dependencies: - - python=3.8.* + - python=3.8 # tools - cython>=0.29.21 - pytest>=6.0 - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 + - pytest-xdist>=1.31 + - hypothesis>=5.5.3 - pytest-azurepipelines # pandas dependencies @@ -22,10 +22,10 @@ dependencies: - moto>=1.3.14 - numba - numexpr - - numpy=1.18.* + - numpy=1.18.3 - openpyxl - jinja2 - - pyarrow>=0.17.0 + - pyarrow=0.17.0 - pytables - python-dateutil - pytz diff --git a/ci/deps/azure-windows-37.yaml b/ci/deps/azure-windows-39.yaml similarity index 80% rename from ci/deps/azure-windows-37.yaml rename to ci/deps/azure-windows-39.yaml index 5cbc029f8c03d..9aad5f34e47d8 100644 --- a/ci/deps/azure-windows-37.yaml +++ b/ci/deps/azure-windows-39.yaml @@ -3,13 +3,13 @@ channels: - defaults - conda-forge dependencies: - - python=3.7.* + - python=3.9 # tools - cython>=0.29.21 - pytest>=6.0 - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 + - pytest-xdist>=1.31 + - hypothesis>=5.5.3 - pytest-azurepipelines # pandas dependencies @@ -20,13 +20,13 @@ dependencies: - html5lib - jinja2 - lxml - - matplotlib=2.2.* + - matplotlib - moto>=1.3.14 - flask - numexpr - - numpy=1.17.* + - numpy - openpyxl - - pyarrow=0.17.0 + - pyarrow - pytables - python-dateutil - pytz diff --git a/ci/deps/circle-37-arm64.yaml b/ci/deps/circle-38-arm64.yaml similarity index 78% rename from ci/deps/circle-37-arm64.yaml rename to ci/deps/circle-38-arm64.yaml index 995ebda1f97e7..17fe5b4b7b77b 100644 --- a/ci/deps/circle-37-arm64.yaml +++ b/ci/deps/circle-38-arm64.yaml @@ -2,13 +2,13 @@ name: pandas-dev channels: - conda-forge dependencies: - - python=3.7.* + - python=3.8 # tools - cython>=0.29.21 - pytest>=6.0 - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 + - pytest-xdist>=1.31 + - hypothesis>=5.5.3 # pandas dependencies - botocore>=1.11 diff --git a/environment.yml b/environment.yml index 788b88ef16ad6..26bb634a2112f 100644 --- a/environment.yml +++ b/environment.yml @@ -3,9 +3,9 @@ channels: - conda-forge dependencies: # required - - numpy>=1.17.3 + - numpy>=1.18.3 - python=3.8 - - python-dateutil>=2.7.3 + - python-dateutil>=2.8.1 - pytz # benchmarks @@ -55,10 +55,10 @@ dependencies: # testing - boto3 - botocore>=1.11 - - hypothesis>=3.82 + - hypothesis>=5.5.3 - moto # mock S3 - flask - - pytest>=5.0.1 + - pytest>=6.0 - pytest-cov - pytest-xdist>=1.21 - pytest-asyncio @@ -80,15 +80,15 @@ dependencies: - ipykernel - ipython>=7.11.1 - jinja2 # pandas.Styler - - matplotlib>=2.2.2 # pandas.plotting, Series.plot, DataFrame.plot - - numexpr>=2.7.0 - - scipy>=1.2 - - numba>=0.46.0 + - matplotlib>=3.1.3 # pandas.plotting, Series.plot, DataFrame.plot + - numexpr>=2.7.1 + - scipy>=1.4.1 + - numba>=0.48.0 # optional for io # --------------- # pd.read_html - - beautifulsoup4>=4.6.0 + - beautifulsoup4>=4.8.2 - html5lib - lxml @@ -99,12 +99,11 @@ dependencies: - xlwt - odfpy - - fastparquet>=0.3.2 # pandas.read_parquet, DataFrame.to_parquet + - fastparquet>=0.4.0 # pandas.read_parquet, DataFrame.to_parquet - pyarrow>=0.17.0 # pandas.read_parquet, DataFrame.to_parquet, pandas.read_feather, DataFrame.to_feather - python-snappy # required by pyarrow - - pyqt>=5.9.2 # pandas.read_clipboard - - pytables>=3.5.1 # pandas.read_hdf, DataFrame.to_hdf + - pytables>=3.6.1 # pandas.read_hdf, DataFrame.to_hdf - s3fs>=0.4.0 # file IO when using 's3://...' path - fsspec>=0.7.4 # for generic remote file operations - gcsfs>=0.6.0 # file IO when using 'gcs://...' path diff --git a/pandas/__init__.py b/pandas/__init__.py index db4043686bcbb..43f05617584cc 100644 --- a/pandas/__init__.py +++ b/pandas/__init__.py @@ -19,10 +19,7 @@ del hard_dependencies, dependency, missing_dependencies # numpy compat -from pandas.compat import ( - np_version_under1p18 as _np_version_under1p18, - is_numpy_dev as _is_numpy_dev, -) +from pandas.compat import is_numpy_dev as _is_numpy_dev try: from pandas._libs import hashtable as _hashtable, lib as _lib, tslib as _tslib diff --git a/pandas/compat/__init__.py b/pandas/compat/__init__.py index 369832e9bc05c..3233de8e3b6d1 100644 --- a/pandas/compat/__init__.py +++ b/pandas/compat/__init__.py @@ -16,7 +16,6 @@ is_numpy_dev, np_array_datetime64_compat, np_datetime64_compat, - np_version_under1p18, np_version_under1p19, np_version_under1p20, ) @@ -27,7 +26,6 @@ pa_version_under4p0, ) -PY38 = sys.version_info >= (3, 8) PY39 = sys.version_info >= (3, 9) PY310 = sys.version_info >= (3, 10) PYPY = platform.python_implementation() == "PyPy" @@ -151,7 +149,6 @@ def get_lzma_file(lzma): "is_numpy_dev", "np_array_datetime64_compat", "np_datetime64_compat", - "np_version_under1p18", "np_version_under1p19", "np_version_under1p20", "pa_version_under1p0", diff --git a/pandas/compat/numpy/__init__.py b/pandas/compat/numpy/__init__.py index 619713f28ee2d..ce65c42633408 100644 --- a/pandas/compat/numpy/__init__.py +++ b/pandas/compat/numpy/__init__.py @@ -9,11 +9,10 @@ # numpy versioning _np_version = np.__version__ _nlv = Version(_np_version) -np_version_under1p18 = _nlv < Version("1.18") np_version_under1p19 = _nlv < Version("1.19") np_version_under1p20 = _nlv < Version("1.20") is_numpy_dev = _nlv.dev is not None -_min_numpy_ver = "1.17.3" +_min_numpy_ver = "1.18.3" if _nlv < Version(_min_numpy_ver): diff --git a/pandas/core/common.py b/pandas/core/common.py index 183607ebb489d..5c1673983b1de 100644 --- a/pandas/core/common.py +++ b/pandas/core/common.py @@ -33,7 +33,6 @@ Scalar, T, ) -from pandas.compat import np_version_under1p18 from pandas.core.dtypes.cast import construct_1d_object_array_from_listlike from pandas.core.dtypes.common import ( @@ -416,7 +415,7 @@ def random_state(state=None): if ( is_integer(state) or is_array_like(state) - or (not np_version_under1p18 and isinstance(state, np.random.BitGenerator)) + or isinstance(state, np.random.BitGenerator) ): return np.random.RandomState(state) elif isinstance(state, np.random.RandomState): diff --git a/pandas/tests/api/test_api.py b/pandas/tests/api/test_api.py index 38984238ecf65..95dc1d82cb286 100644 --- a/pandas/tests/api/test_api.py +++ b/pandas/tests/api/test_api.py @@ -193,7 +193,6 @@ class TestPDApi(Base): "_hashtable", "_lib", "_libs", - "_np_version_under1p18", "_is_numpy_dev", "_testing", "_tslib", diff --git a/pandas/tests/arrays/test_datetimelike.py b/pandas/tests/arrays/test_datetimelike.py index 3f3f3a5ee8d18..1e150f1b431c7 100644 --- a/pandas/tests/arrays/test_datetimelike.py +++ b/pandas/tests/arrays/test_datetimelike.py @@ -10,7 +10,6 @@ OutOfBoundsDatetime, Timestamp, ) -from pandas.compat import np_version_under1p18 import pandas.util._test_decorators as td import pandas as pd @@ -288,12 +287,7 @@ def test_searchsorted(self): # GH#29884 match numpy convention on whether NaT goes # at the end or the beginning result = arr.searchsorted(NaT) - if np_version_under1p18: - # Following numpy convention, NaT goes at the beginning - # (unlike NaN which goes at the end) - assert result == 0 - else: - assert result == 10 + assert result == 10 @pytest.mark.parametrize("box", [None, "index", "series"]) def test_searchsorted_castable_strings(self, arr1d, box, request, string_storage): @@ -1244,17 +1238,11 @@ def test_invalid_nat_setitem_array(arr, non_casting_nats): ], ) def test_to_numpy_extra(arr): - if np_version_under1p18: - # np.isnan(NaT) raises, so use pandas' - isnan = pd.isna - else: - isnan = np.isnan - arr[0] = NaT original = arr.copy() result = arr.to_numpy() - assert isnan(result[0]) + assert np.isnan(result[0]) result = arr.to_numpy(dtype="int64") assert result[0] == -9223372036854775808 diff --git a/pandas/tests/computation/test_eval.py b/pandas/tests/computation/test_eval.py index 7cf319e1d134c..b6c6baf6cc7e4 100644 --- a/pandas/tests/computation/test_eval.py +++ b/pandas/tests/computation/test_eval.py @@ -21,7 +21,6 @@ from pandas import ( DataFrame, Series, - compat, date_range, ) import pandas._testing as tm @@ -1283,10 +1282,8 @@ def test_assignment_column(self): msg = "left hand side of an assignment must be a single name" with pytest.raises(SyntaxError, match=msg): df.eval("d,c = a + b") - if compat.PY38: - msg = "cannot assign to function call" - else: - msg = "can't assign to function call" + + msg = "cannot assign to function call" with pytest.raises(SyntaxError, match=msg): df.eval('Timestamp("20131001") = a + b') @@ -1971,9 +1968,7 @@ def test_bool_ops_fails_on_scalars(lhs, cmp, rhs, engine, parser): "other", [ "'x'", - pytest.param( - "...", marks=pytest.mark.xfail(not compat.PY38, reason="GH-28116") - ), + "...", ], ) def test_equals_various(other): diff --git a/pandas/tests/frame/methods/test_sample.py b/pandas/tests/frame/methods/test_sample.py index 55ef665c55241..1d10d702aad2e 100644 --- a/pandas/tests/frame/methods/test_sample.py +++ b/pandas/tests/frame/methods/test_sample.py @@ -1,8 +1,6 @@ import numpy as np import pytest -from pandas.compat import np_version_under1p18 - from pandas import ( DataFrame, Series, @@ -155,16 +153,8 @@ def test_sample_none_weights(self, obj): "func_str,arg", [ ("np.array", [2, 3, 1, 0]), - pytest.param( - "np.random.MT19937", - 3, - marks=pytest.mark.skipif(np_version_under1p18, reason="NumPy<1.18"), - ), - pytest.param( - "np.random.PCG64", - 11, - marks=pytest.mark.skipif(np_version_under1p18, reason="NumPy<1.18"), - ), + ("np.random.MT19937", 3), + ("np.random.PCG64", 11), ], ) def test_sample_random_state(self, func_str, arg, frame_or_series): diff --git a/pandas/tests/indexes/period/test_searchsorted.py b/pandas/tests/indexes/period/test_searchsorted.py index af243eeccc7a4..27e998284c189 100644 --- a/pandas/tests/indexes/period/test_searchsorted.py +++ b/pandas/tests/indexes/period/test_searchsorted.py @@ -2,7 +2,6 @@ import pytest from pandas._libs.tslibs import IncompatibleFrequency -from pandas.compat import np_version_under1p18 from pandas import ( NaT, @@ -28,13 +27,7 @@ def test_searchsorted(self, freq): p2 = Period("2014-01-04", freq=freq) assert pidx.searchsorted(p2) == 3 - if np_version_under1p18: - # GH#36254 - # Following numpy convention, NaT goes at the beginning - # (unlike NaN which goes at the end) - assert pidx.searchsorted(NaT) == 0 - else: - assert pidx.searchsorted(NaT) == 5 + assert pidx.searchsorted(NaT) == 5 msg = "Input has different freq=H from PeriodArray" with pytest.raises(IncompatibleFrequency, match=msg): diff --git a/pandas/tests/indexes/test_numpy_compat.py b/pandas/tests/indexes/test_numpy_compat.py index f2ed96d0b65b8..cb3106b9f49e5 100644 --- a/pandas/tests/indexes/test_numpy_compat.py +++ b/pandas/tests/indexes/test_numpy_compat.py @@ -1,8 +1,6 @@ import numpy as np import pytest -from pandas.compat import np_version_under1p18 - from pandas import ( DatetimeIndex, Float64Index, @@ -82,21 +80,16 @@ def test_numpy_ufuncs_other(index, func, request): isinstance(index, DatetimeIndex) and index.tz is not None and func in [np.isfinite, np.isnan, np.isinf] - and ( - not np_version_under1p18 - or (np_version_under1p18 and func is np.isfinite) - ) ): mark = pytest.mark.xfail(reason="__array_ufunc__ is not defined") request.node.add_marker(mark) - if not np_version_under1p18 and func in [np.isfinite, np.isinf, np.isnan]: + if func in [np.isfinite, np.isinf, np.isnan]: # numpy 1.18(dev) changed isinf and isnan to not raise on dt64/tfd64 result = func(index) assert isinstance(result, np.ndarray) elif func is np.isfinite: - # ok under numpy >= 1.17 # Results in bool array result = func(index) assert isinstance(result, np.ndarray) diff --git a/pandas/tests/io/json/test_pandas.py b/pandas/tests/io/json/test_pandas.py index 0ffc6044a5897..b3275867f9a00 100644 --- a/pandas/tests/io/json/test_pandas.py +++ b/pandas/tests/io/json/test_pandas.py @@ -11,7 +11,6 @@ from pandas.compat import ( IS64, - PY38, PY310, is_platform_windows, ) @@ -1715,7 +1714,7 @@ def test_json_multiindex(self, dataframe, expected): assert result == expected @pytest.mark.xfail( - is_platform_windows() and PY38, + is_platform_windows(), reason="localhost connection rejected", strict=False, ) diff --git a/pandas/tests/io/test_parquet.py b/pandas/tests/io/test_parquet.py index d100c584b698a..12a79f68d71c8 100644 --- a/pandas/tests/io/test_parquet.py +++ b/pandas/tests/io/test_parquet.py @@ -13,10 +13,7 @@ from pandas._config import get_option -from pandas.compat import ( - PY38, - is_platform_windows, -) +from pandas.compat import is_platform_windows from pandas.compat.pyarrow import ( pa_version_under1p0, pa_version_under2p0, @@ -651,7 +648,7 @@ def test_categorical(self, pa): check_round_trip(df, pa) @pytest.mark.xfail( - is_platform_windows() and PY38, + is_platform_windows(), reason="localhost connection rejected", strict=False, ) diff --git a/pandas/tests/io/test_pickle.py b/pandas/tests/io/test_pickle.py index 7cf9d7e9a1925..ddd5429e39e44 100644 --- a/pandas/tests/io/test_pickle.py +++ b/pandas/tests/io/test_pickle.py @@ -32,7 +32,6 @@ import pytest from pandas.compat import ( - PY38, get_lzma_file, import_lzma, is_platform_little_endian, @@ -210,7 +209,6 @@ def python_unpickler(path): pytest.param( functools.partial(pd.to_pickle, protocol=5), id="pandas_proto_5", - marks=pytest.mark.skipif(not PY38, reason="protocol 5 not supported"), ), ], ) diff --git a/pandas/tests/io/xml/test_to_xml.py b/pandas/tests/io/xml/test_to_xml.py index 1e2973075f98e..478f4c803479d 100644 --- a/pandas/tests/io/xml/test_to_xml.py +++ b/pandas/tests/io/xml/test_to_xml.py @@ -9,7 +9,6 @@ import numpy as np import pytest -from pandas.compat import PY38 import pandas.util._test_decorators as td from pandas import DataFrame @@ -364,10 +363,6 @@ def test_na_empty_elem_option(datapath, parser): # ATTR_COLS -@pytest.mark.skipif( - not PY38, - reason=("etree alpha ordered attributes < py 3.8"), -) def test_attrs_cols_nan_output(datapath, parser): expected = """\ @@ -383,10 +378,6 @@ def test_attrs_cols_nan_output(datapath, parser): assert output == expected -@pytest.mark.skipif( - not PY38, - reason=("etree alpha ordered attributes < py3.8"), -) def test_attrs_cols_prefix(datapath, parser): expected = """\ @@ -541,10 +532,6 @@ def test_hierarchical_columns(datapath, parser): assert output == expected -@pytest.mark.skipif( - not PY38, - reason=("etree alpha ordered attributes < py3.8"), -) def test_hierarchical_attrs_columns(datapath, parser): expected = """\ @@ -614,10 +601,6 @@ def test_multi_index(datapath, parser): assert output == expected -@pytest.mark.skipif( - not PY38, - reason=("etree alpha ordered attributes < py3.8"), -) def test_multi_index_attrs_cols(datapath, parser): expected = """\ diff --git a/pandas/tests/io/xml/test_xml.py b/pandas/tests/io/xml/test_xml.py index 823d155360908..d84ef65d4c691 100644 --- a/pandas/tests/io/xml/test_xml.py +++ b/pandas/tests/io/xml/test_xml.py @@ -10,7 +10,6 @@ import numpy as np import pytest -from pandas.compat import PY38 import pandas.util._test_decorators as td from pandas import DataFrame @@ -255,10 +254,6 @@ def test_parser_consistency_file(datapath): @tm.network @pytest.mark.slow @td.skip_if_no("lxml") -@pytest.mark.skipif( - not PY38, - reason=("etree alpha ordered attributes < py3.8"), -) def test_parser_consistency_url(datapath): url = ( "https://data.cityofchicago.org/api/views/" diff --git a/pandas/tests/scalar/test_nat.py b/pandas/tests/scalar/test_nat.py index 08c5ea706111a..43d61ef6f80e1 100644 --- a/pandas/tests/scalar/test_nat.py +++ b/pandas/tests/scalar/test_nat.py @@ -9,7 +9,6 @@ import pytz from pandas._libs.tslibs import iNaT -import pandas.compat as compat from pandas.core.dtypes.common import is_datetime64_any_dtype @@ -138,13 +137,7 @@ def test_round_nat(klass, method, freq): "dst", "fromordinal", "fromtimestamp", - pytest.param( - "fromisocalendar", - marks=pytest.mark.skipif( - not compat.PY38, - reason="'fromisocalendar' was added in stdlib datetime in python 3.8", - ), - ), + "fromisocalendar", "isocalendar", "strftime", "strptime", @@ -315,11 +308,6 @@ def test_overlap_public_nat_methods(klass, expected): # NaT should have *most* of the Timestamp and Timedelta methods. # In case when Timestamp, Timedelta, and NaT are overlap, the overlap # is considered to be with Timestamp and NaT, not Timedelta. - - # "fromisocalendar" was introduced in 3.8 - if klass is Timestamp and not compat.PY38: - expected.remove("fromisocalendar") - assert _get_overlap_public_nat_methods(klass) == expected diff --git a/pandas/tests/scalar/timestamp/test_constructors.py b/pandas/tests/scalar/timestamp/test_constructors.py index 16ce51a88340e..c6c475f5b87a2 100644 --- a/pandas/tests/scalar/timestamp/test_constructors.py +++ b/pandas/tests/scalar/timestamp/test_constructors.py @@ -17,7 +17,6 @@ Period, Timedelta, Timestamp, - compat, ) import pandas._testing as tm @@ -569,10 +568,6 @@ class SubDatetime(datetime): expected = Timestamp(2000, 1, 1) assert result == expected - @pytest.mark.skipif( - not compat.PY38, - reason="datetime.fromisocalendar was added in Python version 3.8", - ) def test_constructor_fromisocalendar(self): # GH 30395 expected_timestamp = Timestamp("2000-01-03 00:00:00") diff --git a/pandas/tests/test_common.py b/pandas/tests/test_common.py index 93c95b3004876..8ee6ae40cd406 100644 --- a/pandas/tests/test_common.py +++ b/pandas/tests/test_common.py @@ -5,8 +5,6 @@ import numpy as np import pytest -from pandas.compat import np_version_under1p18 - import pandas as pd from pandas import Series import pandas._testing as tm @@ -72,15 +70,14 @@ def test_random_state(): # Check BitGenerators # GH32503 - if not np_version_under1p18: - assert ( - com.random_state(npr.MT19937(3)).uniform() - == npr.RandomState(npr.MT19937(3)).uniform() - ) - assert ( - com.random_state(npr.PCG64(11)).uniform() - == npr.RandomState(npr.PCG64(11)).uniform() - ) + assert ( + com.random_state(npr.MT19937(3)).uniform() + == npr.RandomState(npr.MT19937(3)).uniform() + ) + assert ( + com.random_state(npr.PCG64(11)).uniform() + == npr.RandomState(npr.PCG64(11)).uniform() + ) # Error for floats or strings msg = ( diff --git a/pyproject.toml b/pyproject.toml index 3947856d94d01..5773a3624d1c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,6 @@ requires = [ "setuptools>=38.6.0", "wheel", "Cython>=0.29.21,<3", # Note: sync with setup.py - "numpy==1.17.3; python_version=='3.7'", "numpy==1.18.3; python_version=='3.8'", "numpy; python_version>='3.9'", ] @@ -14,7 +13,7 @@ requires = [ # build-backend = "setuptools.build_meta" [tool.black] -target-version = ['py37', 'py38', 'py39'] +target-version = ['py38', 'py39'] exclude = ''' ( asv_bench/env diff --git a/requirements-dev.txt b/requirements-dev.txt index 332059341df48..171eec6f7a661 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,8 +1,8 @@ # This file is auto-generated from environment.yml, do not modify. # See that file for comments about the need/usage of each dependency. -numpy>=1.17.3 -python-dateutil>=2.7.3 +numpy>=1.18.3 +python-dateutil>=2.8.1 pytz asv cython>=0.29.21 @@ -33,10 +33,10 @@ pyyaml requests boto3 botocore>=1.11 -hypothesis>=3.82 +hypothesis>=5.5.3 moto flask -pytest>=5.0.1 +pytest>=6.0 pytest-cov pytest-xdist>=1.21 pytest-asyncio @@ -52,11 +52,11 @@ bottleneck>=1.2.1 ipykernel ipython>=7.11.1 jinja2 -matplotlib>=2.2.2 -numexpr>=2.7.0 -scipy>=1.2 -numba>=0.46.0 -beautifulsoup4>=4.6.0 +matplotlib>=3.1.3 +numexpr>=2.7.1 +scipy>=1.4.1 +numba>=0.48.0 +beautifulsoup4>=4.8.2 html5lib lxml openpyxl @@ -64,11 +64,10 @@ xlrd xlsxwriter xlwt odfpy -fastparquet>=0.3.2 +fastparquet>=0.4.0 pyarrow>=0.17.0 python-snappy -pyqt5>=5.9.2 -tables>=3.5.1 +tables>=3.6.1 s3fs>=0.4.0 fsspec>=0.7.4 gcsfs>=0.6.0 diff --git a/setup.cfg b/setup.cfg index 6ce66a6f2bdbd..1045074059e2a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,6 @@ classifiers = Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Topic :: Scientific/Engineering @@ -31,10 +30,10 @@ project_urls = [options] packages = find: install_requires = - numpy>=1.17.3 - python-dateutil>=2.7.3 - pytz>=2017.3 -python_requires = >=3.7.1 + numpy>=1.18.3 + python-dateutil>=2.8.1 + pytz>=2020.1 +python_requires = >=3.8 include_package_data = True zip_safe = False @@ -44,9 +43,9 @@ pandas_plotting_backends = [options.extras_require] test = - hypothesis>=3.58 + hypothesis>=5.5.3 pytest>=6.0 - pytest-xdist + pytest-xdist>=1.31 [options.package_data] * = templates/*, _libs/**/*.dll From 6a265b647f678e623fe07138e994d6b2242dd065 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Sun, 13 Jun 2021 17:26:38 -0500 Subject: [PATCH 02/29] update CI --- .github/workflows/database.yml | 2 +- .github/workflows/posix.yml | 9 ++++----- ci/azure/posix.yml | 4 ++-- ci/azure/windows.yml | 8 ++++---- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index d2aa76a3e6110..6f887570a5317 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: - ENV_FILE: [ci/deps/actions-37-db-min.yaml, ci/deps/actions-37-db.yaml] + ENV_FILE: [ci/deps/actions-38-db-min.yaml, ci/deps/actions-38-db.yaml] fail-fast: false services: diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index fa5cf8ead57bd..747ed3a776154 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -24,14 +24,13 @@ jobs: strategy: matrix: settings: [ - [actions-37-minimum_versions.yaml, "not slow and not network and not clipboard", "", "", "", "", ""], - [actions-37.yaml, "not slow and not network and not clipboard", "", "", "", "", ""], - [actions-37-locale_slow.yaml, "slow", "language-pack-it xsel", "it_IT.utf8", "it_IT.utf8", "", ""], - [actions-37-slow.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 network and not clipboard", "", "", "", "", ""], [actions-38-slow.yaml, "slow", "", "", "", "", ""], [actions-38-locale.yaml, "not slow and not network", "language-pack-zh-hans xsel", "zh_CN.utf8", "zh_CN.utf8", "", ""], - [actions-38-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", "-W error"], + [actions-39-slow.yaml, "slow", "", "", "", "", ""], + [actions-39-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", "-W error"], [actions-39.yaml, "not slow and not network and not clipboard", "", "", "", "", ""] ] fail-fast: false diff --git a/ci/azure/posix.yml b/ci/azure/posix.yml index 2caacf3a07290..4c3e218164ae6 100644 --- a/ci/azure/posix.yml +++ b/ci/azure/posix.yml @@ -10,8 +10,8 @@ jobs: matrix: ${{ if eq(parameters.name, 'macOS') }}: py37_macos: - ENV_FILE: ci/deps/azure-macos-37.yaml - CONDA_PY: "37" + ENV_FILE: ci/deps/azure-macos-38.yaml + CONDA_PY: "38" PATTERN: "not slow and not network" steps: diff --git a/ci/azure/windows.yml b/ci/azure/windows.yml index 5644ad46714d5..f0f3f136035c8 100644 --- a/ci/azure/windows.yml +++ b/ci/azure/windows.yml @@ -9,13 +9,13 @@ jobs: strategy: matrix: py37_np17: - ENV_FILE: ci/deps/azure-windows-37.yaml - CONDA_PY: "37" + ENV_FILE: ci/deps/azure-windows-38.yaml + CONDA_PY: "38" PATTERN: "not slow and not network" py38_np18: - ENV_FILE: ci/deps/azure-windows-38.yaml - CONDA_PY: "38" + ENV_FILE: ci/deps/azure-windows-39.yaml + CONDA_PY: "39" PATTERN: "not slow and not network and not high_memory" steps: From f33fffc259c565f1ccf60cd04b91cef0a9a18b5c Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Sun, 13 Jun 2021 18:04:05 -0500 Subject: [PATCH 03/29] fix version --- azure-pipelines.yml | 6 +++--- ci/azure/posix.yml | 2 +- ci/azure/windows.yml | 4 ++-- ci/deps/azure-macos-38.yaml | 2 +- ci/deps/azure-windows-38.yaml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5ba4471c8d303..1b3f3e9422cac 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -29,7 +29,7 @@ jobs: name: Windows vmImage: vs2017-win2016 -- job: py37_32bit +- job: py38_32bit pool: vmImage: ubuntu-18.04 @@ -38,7 +38,7 @@ jobs: docker pull quay.io/pypa/manylinux2014_i686 docker run -v $(pwd):/pandas quay.io/pypa/manylinux2014_i686 \ /bin/bash -xc "cd pandas && \ - /opt/python/cp37-cp37m/bin/python -m venv ~/virtualenvs/pandas-dev && \ + /opt/python/cp38-cp38m/bin/python -m venv ~/virtualenvs/pandas-dev && \ . ~/virtualenvs/pandas-dev/bin/activate && \ python -m pip install --no-deps -U pip wheel setuptools && \ pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \ @@ -52,4 +52,4 @@ jobs: inputs: testResultsFiles: '**/test-*.xml' failTaskOnFailedTests: true - testRunTitle: 'Publish test results for Python 3.7-32 bit full Linux' + testRunTitle: 'Publish test results for Python 3.8-32 bit full Linux' diff --git a/ci/azure/posix.yml b/ci/azure/posix.yml index 4c3e218164ae6..8b0167e52b813 100644 --- a/ci/azure/posix.yml +++ b/ci/azure/posix.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: ${{ if eq(parameters.name, 'macOS') }}: - py37_macos: + py38_macos: ENV_FILE: ci/deps/azure-macos-38.yaml CONDA_PY: "38" PATTERN: "not slow and not network" diff --git a/ci/azure/windows.yml b/ci/azure/windows.yml index f0f3f136035c8..58fe69ab2d272 100644 --- a/ci/azure/windows.yml +++ b/ci/azure/windows.yml @@ -8,12 +8,12 @@ jobs: vmImage: ${{ parameters.vmImage }} strategy: matrix: - py37_np17: + py38_np18: ENV_FILE: ci/deps/azure-windows-38.yaml CONDA_PY: "38" PATTERN: "not slow and not network" - py38_np18: + py39: ENV_FILE: ci/deps/azure-windows-39.yaml CONDA_PY: "39" PATTERN: "not slow and not network and not high_memory" diff --git a/ci/deps/azure-macos-38.yaml b/ci/deps/azure-macos-38.yaml index 7cda719dc1a15..85f3070840145 100644 --- a/ci/deps/azure-macos-38.yaml +++ b/ci/deps/azure-macos-38.yaml @@ -20,7 +20,7 @@ dependencies: - matplotlib=3.1.3 - nomkl - numexpr - - numpy=1.18.3 + - numpy=1.18 - openpyxl - pyarrow=0.17 - pytables diff --git a/ci/deps/azure-windows-38.yaml b/ci/deps/azure-windows-38.yaml index 680c1bfa3bfdb..c46da43ab45b4 100644 --- a/ci/deps/azure-windows-38.yaml +++ b/ci/deps/azure-windows-38.yaml @@ -22,7 +22,7 @@ dependencies: - moto>=1.3.14 - numba - numexpr - - numpy=1.18.3 + - numpy=1.18 - openpyxl - jinja2 - pyarrow=0.17.0 From e0046e8cea142674691b24bdef57952ee9ae8909 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Sun, 13 Jun 2021 18:08:25 -0500 Subject: [PATCH 04/29] fix version --- ci/deps/actions-38-minimum_versions.yaml | 2 +- ci/deps/azure-macos-38.yaml | 2 +- ci/deps/azure-windows-38.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/deps/actions-38-minimum_versions.yaml b/ci/deps/actions-38-minimum_versions.yaml index 3bf6e098b32b3..399062cf05448 100644 --- a/ci/deps/actions-38-minimum_versions.yaml +++ b/ci/deps/actions-38-minimum_versions.yaml @@ -18,7 +18,7 @@ dependencies: - jinja2=2.11 - numba=0.48.0 - numexpr=2.7.1 - - numpy=1.18.3 + - numpy=1.18.5 - openpyxl=3.0.2 - pytables=3.6.1 - python-dateutil=2.8.1 diff --git a/ci/deps/azure-macos-38.yaml b/ci/deps/azure-macos-38.yaml index 85f3070840145..ff039657252d8 100644 --- a/ci/deps/azure-macos-38.yaml +++ b/ci/deps/azure-macos-38.yaml @@ -20,7 +20,7 @@ dependencies: - matplotlib=3.1.3 - nomkl - numexpr - - numpy=1.18 + - numpy=1.18.5 - openpyxl - pyarrow=0.17 - pytables diff --git a/ci/deps/azure-windows-38.yaml b/ci/deps/azure-windows-38.yaml index c46da43ab45b4..e20df511cc003 100644 --- a/ci/deps/azure-windows-38.yaml +++ b/ci/deps/azure-windows-38.yaml @@ -22,7 +22,7 @@ dependencies: - moto>=1.3.14 - numba - numexpr - - numpy=1.18 + - numpy=1.18.5 - openpyxl - jinja2 - pyarrow=0.17.0 From b9ddd768204816c64baf9dea4dd6433dd8683970 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Sun, 13 Jun 2021 18:17:02 -0500 Subject: [PATCH 05/29] fix 32-bit build --- azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1b3f3e9422cac..1241e3b0a1bfe 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -35,10 +35,10 @@ jobs: steps: - script: | - docker pull quay.io/pypa/manylinux2014_i686 - docker run -v $(pwd):/pandas quay.io/pypa/manylinux2014_i686 \ + docker pull quay.io/pypa/manylinux2014_aarch64 + docker run -v $(pwd):/pandas quay.io/pypa/manylinux2014_aarch64 \ /bin/bash -xc "cd pandas && \ - /opt/python/cp38-cp38m/bin/python -m venv ~/virtualenvs/pandas-dev && \ + /opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \ . ~/virtualenvs/pandas-dev/bin/activate && \ python -m pip install --no-deps -U pip wheel setuptools && \ pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \ From 7f1ff20a12ebeb1656fdce109245bc0544f6d2d4 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Sun, 13 Jun 2021 18:24:30 -0500 Subject: [PATCH 06/29] fix 32-bit build --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1241e3b0a1bfe..98a32d4e6af2c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -35,8 +35,8 @@ jobs: steps: - script: | - docker pull quay.io/pypa/manylinux2014_aarch64 - docker run -v $(pwd):/pandas quay.io/pypa/manylinux2014_aarch64 \ + docker pull quay.io/pypa/manylinux2014_i686 + docker run -v $(pwd):/pandas quay.io/pypa/manylinux2014_i686 \ /bin/bash -xc "cd pandas && \ /opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \ . ~/virtualenvs/pandas-dev/bin/activate && \ From c4ac21692b553cd10a006822bdb000e0285900ff Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Mon, 14 Jun 2021 16:27:30 -0500 Subject: [PATCH 07/29] adjust min version --- ci/deps/actions-38-locale_slow.yaml | 2 +- ci/deps/actions-38-minimum_versions.yaml | 2 +- ci/deps/azure-macos-38.yaml | 2 +- ci/deps/azure-windows-38.yaml | 2 +- setup.cfg | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/deps/actions-38-locale_slow.yaml b/ci/deps/actions-38-locale_slow.yaml index d29a416a3cd7c..43ba6e2a8d540 100644 --- a/ci/deps/actions-38-locale_slow.yaml +++ b/ci/deps/actions-38-locale_slow.yaml @@ -16,7 +16,7 @@ dependencies: - beautifulsoup4=4.8.2 - bottleneck=1.3.1 - lxml - - matplotlib=3.1.3 + - matplotlib=3.2.2 - numpy=1.18.* - openpyxl=3.0.2 - python-dateutil diff --git a/ci/deps/actions-38-minimum_versions.yaml b/ci/deps/actions-38-minimum_versions.yaml index 399062cf05448..338d630d8d974 100644 --- a/ci/deps/actions-38-minimum_versions.yaml +++ b/ci/deps/actions-38-minimum_versions.yaml @@ -16,7 +16,7 @@ dependencies: - beautifulsoup4=4.8.2 - bottleneck=1.3.1 - jinja2=2.11 - - numba=0.48.0 + - numba=0.50.0 - numexpr=2.7.1 - numpy=1.18.5 - openpyxl=3.0.2 diff --git a/ci/deps/azure-macos-38.yaml b/ci/deps/azure-macos-38.yaml index ff039657252d8..175684baa1393 100644 --- a/ci/deps/azure-macos-38.yaml +++ b/ci/deps/azure-macos-38.yaml @@ -17,7 +17,7 @@ dependencies: - html5lib - jinja2 - lxml - - matplotlib=3.1.3 + - matplotlib=3.2.2 - nomkl - numexpr - numpy=1.18.5 diff --git a/ci/deps/azure-windows-38.yaml b/ci/deps/azure-windows-38.yaml index e20df511cc003..d0bfa9de375ab 100644 --- a/ci/deps/azure-windows-38.yaml +++ b/ci/deps/azure-windows-38.yaml @@ -18,7 +18,7 @@ dependencies: - fastparquet>=0.4.0 - flask - fsspec>=0.8.0 - - matplotlib=3.1.3 + - matplotlib=3.2.2 - moto>=1.3.14 - numba - numexpr diff --git a/setup.cfg b/setup.cfg index 1045074059e2a..e7f393eded2dd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,7 +30,7 @@ project_urls = [options] packages = find: install_requires = - numpy>=1.18.3 + numpy>=1.18.5 python-dateutil>=2.8.1 pytz>=2020.1 python_requires = >=3.8 From de9005bc858143403a72961bc6a67ea95052520f Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Mon, 14 Jun 2021 20:35:55 -0500 Subject: [PATCH 08/29] adjust min versions --- ci/deps/actions-38-db-min.yaml | 4 ++-- ci/deps/actions-38-db.yaml | 2 +- ci/deps/actions-38-locale.yaml | 2 +- ci/deps/actions-38-minimum_versions.yaml | 2 +- ci/deps/actions-39-slow.yaml | 2 +- ci/deps/azure-macos-38.yaml | 2 +- ci/deps/azure-windows-38.yaml | 2 +- environment.yml | 12 +++++----- pandas/compat/_optional.py | 28 ++++++++++++------------ pandas/compat/numpy/__init__.py | 2 +- pyproject.toml | 2 +- 11 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ci/deps/actions-38-db-min.yaml b/ci/deps/actions-38-db-min.yaml index a7daadd7ffe1e..9f76c27b3d009 100644 --- a/ci/deps/actions-38-db-min.yaml +++ b/ci/deps/actions-38-db-min.yaml @@ -33,10 +33,10 @@ dependencies: - google-cloud-bigquery>=1.27.2 # GH 36436 - protobuf>=3.12.4 - pyarrow=0.17.1 # GH 38803 - - pytables>=3.5.1 + - pytables>=3.6.1 - scipy - xarray=0.15.1 - - xlrd<2.0 + - xlrd - xlsxwriter - xlwt - moto diff --git a/ci/deps/actions-38-db.yaml b/ci/deps/actions-38-db.yaml index d1a8ce03e9333..07e88c4938a77 100644 --- a/ci/deps/actions-38-db.yaml +++ b/ci/deps/actions-38-db.yaml @@ -43,7 +43,7 @@ dependencies: - sqlalchemy - statsmodels - xarray - - xlrd<2.0 + - xlrd - xlsxwriter - xlwt - pip diff --git a/ci/deps/actions-38-locale.yaml b/ci/deps/actions-38-locale.yaml index 24c9e5eaa7cbb..28584de509f34 100644 --- a/ci/deps/actions-38-locale.yaml +++ b/ci/deps/actions-38-locale.yaml @@ -31,7 +31,7 @@ dependencies: - pytz - scipy - xarray - - xlrd<2.0 + - xlrd - xlsxwriter - xlwt - moto diff --git a/ci/deps/actions-38-minimum_versions.yaml b/ci/deps/actions-38-minimum_versions.yaml index 338d630d8d974..d666bc3b555f5 100644 --- a/ci/deps/actions-38-minimum_versions.yaml +++ b/ci/deps/actions-38-minimum_versions.yaml @@ -16,7 +16,7 @@ dependencies: - beautifulsoup4=4.8.2 - bottleneck=1.3.1 - jinja2=2.11 - - numba=0.50.0 + - numba=0.50.1 - numexpr=2.7.1 - numpy=1.18.5 - openpyxl=3.0.2 diff --git a/ci/deps/actions-39-slow.yaml b/ci/deps/actions-39-slow.yaml index 42ab34c5b484f..3e28d464381fc 100644 --- a/ci/deps/actions-39-slow.yaml +++ b/ci/deps/actions-39-slow.yaml @@ -31,7 +31,7 @@ dependencies: - moto>=1.3.14 - scipy - sqlalchemy - - xlrd<2.0 + - xlrd - xlsxwriter - moto - flask diff --git a/ci/deps/azure-macos-38.yaml b/ci/deps/azure-macos-38.yaml index 175684baa1393..5c47f1dfa3140 100644 --- a/ci/deps/azure-macos-38.yaml +++ b/ci/deps/azure-macos-38.yaml @@ -27,7 +27,7 @@ dependencies: - python-dateutil==2.8.1 - pytz - xarray - - xlrd<2.0 + - xlrd - xlsxwriter - xlwt - pip diff --git a/ci/deps/azure-windows-38.yaml b/ci/deps/azure-windows-38.yaml index d0bfa9de375ab..b6fe53d1fc530 100644 --- a/ci/deps/azure-windows-38.yaml +++ b/ci/deps/azure-windows-38.yaml @@ -31,6 +31,6 @@ dependencies: - pytz - s3fs>=0.4.0 - scipy - - xlrd<2.0 + - xlrd - xlsxwriter - xlwt diff --git a/environment.yml b/environment.yml index 26bb634a2112f..925d0fa0e81bb 100644 --- a/environment.yml +++ b/environment.yml @@ -3,7 +3,7 @@ channels: - conda-forge dependencies: # required - - numpy>=1.18.3 + - numpy>=1.18.5 - python=3.8 - python-dateutil>=2.8.1 - pytz @@ -60,7 +60,7 @@ dependencies: - flask - pytest>=6.0 - pytest-cov - - pytest-xdist>=1.21 + - pytest-xdist>=1.31 - pytest-asyncio - pytest-instafail @@ -71,19 +71,19 @@ dependencies: # unused (required indirectly may be?) - ipywidgets - nbformat - - notebook>=5.7.5 + - notebook>=6.0.3 - pip # optional - blosc - - bottleneck>=1.2.1 + - bottleneck>=1.3.1 - ipykernel - ipython>=7.11.1 - jinja2 # pandas.Styler - - matplotlib>=3.1.3 # pandas.plotting, Series.plot, DataFrame.plot + - matplotlib>=3.2.2 # pandas.plotting, Series.plot, DataFrame.plot - numexpr>=2.7.1 - scipy>=1.4.1 - - numba>=0.48.0 + - numba>=0.50.1 # optional for io # --------------- diff --git a/pandas/compat/_optional.py b/pandas/compat/_optional.py index 941c59592dbbd..1d5d40f01f78b 100644 --- a/pandas/compat/_optional.py +++ b/pandas/compat/_optional.py @@ -10,30 +10,30 @@ # Update install.rst when updating versions! VERSIONS = { - "bs4": "4.6.0", - "bottleneck": "1.2.1", + "bs4": "4.8.2", + "bottleneck": "1.3.1", "fsspec": "0.7.4", "fastparquet": "0.4.0", "gcsfs": "0.6.0", - "lxml.etree": "4.3.0", - "matplotlib": "2.2.3", - "numexpr": "2.7.0", - "odfpy": "1.3.0", - "openpyxl": "3.0.0", + "lxml.etree": "4.5.0", + "matplotlib": "3.2.2", + "numexpr": "2.7.1", + "odfpy": "1.4.1", + "openpyxl": "3.0.2", "pandas_gbq": "0.12.0", "pyarrow": "0.17.0", "pytest": "6.0", "pyxlsb": "1.0.6", "s3fs": "0.4.0", - "scipy": "1.2.0", - "sqlalchemy": "1.3.0", - "tables": "3.5.1", + "scipy": "1.4.1", + "sqlalchemy": "1.3.11", + "tables": "3.6.1", "tabulate": "0.8.7", - "xarray": "0.12.3", - "xlrd": "1.2.0", + "xarray": "0.15.1", + "xlrd": "2.0.1", "xlwt": "1.3.0", - "xlsxwriter": "1.0.2", - "numba": "0.46.0", + "xlsxwriter": "1.2.2", + "numba": "0.50.1", } # A mapping from import name to package name (on PyPI) for packages where diff --git a/pandas/compat/numpy/__init__.py b/pandas/compat/numpy/__init__.py index ce65c42633408..5b87257651a2d 100644 --- a/pandas/compat/numpy/__init__.py +++ b/pandas/compat/numpy/__init__.py @@ -12,7 +12,7 @@ np_version_under1p19 = _nlv < Version("1.19") np_version_under1p20 = _nlv < Version("1.20") is_numpy_dev = _nlv.dev is not None -_min_numpy_ver = "1.18.3" +_min_numpy_ver = "1.18.5" if _nlv < Version(_min_numpy_ver): diff --git a/pyproject.toml b/pyproject.toml index 5773a3624d1c3..98e7e4904d284 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ requires = [ "setuptools>=38.6.0", "wheel", "Cython>=0.29.21,<3", # Note: sync with setup.py - "numpy==1.18.3; python_version=='3.8'", + "numpy==1.18.5; python_version=='3.8'", "numpy; python_version>='3.9'", ] # uncomment to enable pep517 after versioneer problem is fixed. From 8999a92f33e55d4eb0dd3e5790ff01f5880e49f6 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Mon, 14 Jun 2021 23:15:46 -0500 Subject: [PATCH 09/29] adjust min versions --- .github/workflows/posix.yml | 2 +- ci/deps/actions-38-locale_slow.yaml | 6 +++--- ci/deps/azure-macos-38.yaml | 2 +- ci/deps/azure-windows-38.yaml | 2 +- ci/deps/azure-windows-39.yaml | 4 ++-- environment.yml | 2 +- pandas/compat/_optional.py | 2 +- requirements-dev.txt | 12 ++++++------ 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index 747ed3a776154..4cafcca9931e3 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -30,7 +30,7 @@ jobs: [actions-38-slow.yaml, "slow", "", "", "", "", ""], [actions-38-locale.yaml, "not slow and not network", "language-pack-zh-hans xsel", "zh_CN.utf8", "zh_CN.utf8", "", ""], [actions-39-slow.yaml, "slow", "", "", "", "", ""], - [actions-39-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", "-W error"], + [actions-39-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", ""], [actions-39.yaml, "not slow and not network and not clipboard", "", "", "", "", ""] ] fail-fast: false diff --git a/ci/deps/actions-38-locale_slow.yaml b/ci/deps/actions-38-locale_slow.yaml index 43ba6e2a8d540..e7276027f2a41 100644 --- a/ci/deps/actions-38-locale_slow.yaml +++ b/ci/deps/actions-38-locale_slow.yaml @@ -3,7 +3,7 @@ channels: - defaults - conda-forge dependencies: - - python=3.8.* + - python=3.8 # tools - cython>=0.29.21 @@ -16,8 +16,8 @@ dependencies: - beautifulsoup4=4.8.2 - bottleneck=1.3.1 - lxml - - matplotlib=3.2.2 - - numpy=1.18.* + - matplotlib=3.3.2 + - numpy=1.18 - openpyxl=3.0.2 - python-dateutil - python-blosc diff --git a/ci/deps/azure-macos-38.yaml b/ci/deps/azure-macos-38.yaml index 5c47f1dfa3140..029d088362aa9 100644 --- a/ci/deps/azure-macos-38.yaml +++ b/ci/deps/azure-macos-38.yaml @@ -17,7 +17,7 @@ dependencies: - html5lib - jinja2 - lxml - - matplotlib=3.2.2 + - matplotlib=3.3.2 - nomkl - numexpr - numpy=1.18.5 diff --git a/ci/deps/azure-windows-38.yaml b/ci/deps/azure-windows-38.yaml index b6fe53d1fc530..4d224d3f840e8 100644 --- a/ci/deps/azure-windows-38.yaml +++ b/ci/deps/azure-windows-38.yaml @@ -18,7 +18,7 @@ dependencies: - fastparquet>=0.4.0 - flask - fsspec>=0.8.0 - - matplotlib=3.2.2 + - matplotlib=3.3.2 - moto>=1.3.14 - numba - numexpr diff --git a/ci/deps/azure-windows-39.yaml b/ci/deps/azure-windows-39.yaml index 9aad5f34e47d8..6d70cb0a222d4 100644 --- a/ci/deps/azure-windows-39.yaml +++ b/ci/deps/azure-windows-39.yaml @@ -26,14 +26,14 @@ dependencies: - numexpr - numpy - openpyxl - - pyarrow + # - pyarrow - pytables - python-dateutil - pytz - s3fs>=0.4.2 - scipy - sqlalchemy - - xlrd>=2.0 + - xlrd - xlsxwriter - xlwt - pyreadstat diff --git a/environment.yml b/environment.yml index 925d0fa0e81bb..57db87a40e994 100644 --- a/environment.yml +++ b/environment.yml @@ -80,7 +80,7 @@ dependencies: - ipykernel - ipython>=7.11.1 - jinja2 # pandas.Styler - - matplotlib>=3.2.2 # pandas.plotting, Series.plot, DataFrame.plot + - matplotlib>=3.3.2 # pandas.plotting, Series.plot, DataFrame.plot - numexpr>=2.7.1 - scipy>=1.4.1 - numba>=0.50.1 diff --git a/pandas/compat/_optional.py b/pandas/compat/_optional.py index 1d5d40f01f78b..11492fe7aaad1 100644 --- a/pandas/compat/_optional.py +++ b/pandas/compat/_optional.py @@ -16,7 +16,7 @@ "fastparquet": "0.4.0", "gcsfs": "0.6.0", "lxml.etree": "4.5.0", - "matplotlib": "3.2.2", + "matplotlib": "3.3.2", "numexpr": "2.7.1", "odfpy": "1.4.1", "openpyxl": "3.0.2", diff --git a/requirements-dev.txt b/requirements-dev.txt index 171eec6f7a661..cd42df8bfb217 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,7 @@ # This file is auto-generated from environment.yml, do not modify. # See that file for comments about the need/usage of each dependency. -numpy>=1.18.3 +numpy>=1.18.5 python-dateutil>=2.8.1 pytz asv @@ -38,24 +38,24 @@ moto flask pytest>=6.0 pytest-cov -pytest-xdist>=1.21 +pytest-xdist>=1.31 pytest-asyncio pytest-instafail seaborn statsmodels ipywidgets nbformat -notebook>=5.7.5 +notebook>=6.0.3 pip blosc -bottleneck>=1.2.1 +bottleneck>=1.3.1 ipykernel ipython>=7.11.1 jinja2 -matplotlib>=3.1.3 +matplotlib>=3.3.2 numexpr>=2.7.1 scipy>=1.4.1 -numba>=0.48.0 +numba>=0.50.1 beautifulsoup4>=4.8.2 html5lib lxml From c29a70b171edb2e9cdb0d2fe68df835984bbea6e Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Tue, 15 Jun 2021 09:32:08 -0500 Subject: [PATCH 10/29] add whatsnew note --- ci/deps/actions-38-db-min.yaml | 1 - ci/deps/actions-38-db.yaml | 1 - doc/source/getting_started/install.rst | 46 ++++++++++----------- doc/source/whatsnew/v1.4.0.rst | 56 +++++++++++++++++++++++++- pandas/compat/_optional.py | 2 +- 5 files changed, 78 insertions(+), 28 deletions(-) diff --git a/ci/deps/actions-38-db-min.yaml b/ci/deps/actions-38-db-min.yaml index 9f76c27b3d009..c93f791b7dba7 100644 --- a/ci/deps/actions-38-db-min.yaml +++ b/ci/deps/actions-38-db-min.yaml @@ -30,7 +30,6 @@ dependencies: - numexpr - openpyxl - pandas-gbq - - google-cloud-bigquery>=1.27.2 # GH 36436 - protobuf>=3.12.4 - pyarrow=0.17.1 # GH 38803 - pytables>=3.6.1 diff --git a/ci/deps/actions-38-db.yaml b/ci/deps/actions-38-db.yaml index 07e88c4938a77..f6943354a67fa 100644 --- a/ci/deps/actions-38-db.yaml +++ b/ci/deps/actions-38-db.yaml @@ -29,7 +29,6 @@ dependencies: - odfpy - openpyxl - pandas-gbq - - google-cloud-bigquery>=1.27.2 # GH 36436 - psycopg2 - pyarrow>=0.17.0 - pymysql diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst index 88e54421daa11..6ba8e77a28454 100644 --- a/doc/source/getting_started/install.rst +++ b/doc/source/getting_started/install.rst @@ -221,9 +221,9 @@ Dependencies ================================================================ ========================== Package Minimum supported version ================================================================ ========================== -`NumPy `__ 1.17.3 -`python-dateutil `__ 2.7.3 -`pytz `__ 2017.3 +`NumPy `__ 1.18.5 +`python-dateutil `__ 2.8.1 +`pytz `__ 2020.1 ================================================================ ========================== .. _install.recommended_dependencies: @@ -233,11 +233,11 @@ Recommended dependencies * `numexpr `__: for accelerating certain numerical operations. ``numexpr`` uses multiple cores as well as smart chunking and caching to achieve large speedups. - If installed, must be Version 2.7.0 or higher. + If installed, must be Version 2.7.1 or higher. * `bottleneck `__: for accelerating certain types of ``nan`` evaluations. ``bottleneck`` uses specialized cython routines to achieve large speedups. If installed, - must be Version 1.2.1 or higher. + must be Version 1.3.1 or higher. .. note:: @@ -263,8 +263,8 @@ Visualization Dependency Minimum Version Notes ========================= ================== ============================================================= setuptools 38.6.0 Utils for entry points of plotting backend -matplotlib 2.2.3 Plotting library -Jinja2 2.10 Conditional formatting with DataFrame.style +matplotlib 3.3.2 Plotting library +Jinja2 2.11 Conditional formatting with DataFrame.style tabulate 0.8.7 Printing in Markdown-friendly format (see `tabulate`_) ========================= ================== ============================================================= @@ -274,10 +274,10 @@ Computation ========================= ================== ============================================================= Dependency Minimum Version Notes ========================= ================== ============================================================= -SciPy 1.12.0 Miscellaneous statistical functions -numba 0.46.0 Alternative execution engine for rolling operations +SciPy 1.14.1 Miscellaneous statistical functions +numba 0.50.1 Alternative execution engine for rolling operations (see :ref:`Enhancing Performance `) -xarray 0.12.3 pandas-like API for N-dimensional data +xarray 0.15.1 pandas-like API for N-dimensional data ========================= ================== ============================================================= Excel files @@ -286,10 +286,10 @@ Excel files ========================= ================== ============================================================= Dependency Minimum Version Notes ========================= ================== ============================================================= -xlrd 1.2.0 Reading Excel +xlrd 2.0.1 Reading Excel xlwt 1.3.0 Writing Excel -xlsxwriter 1.0.2 Writing Excel -openpyxl 3.0.0 Reading / writing for xlsx files +xlsxwriter 1.2.2 Writing Excel +openpyxl 3.0.3 Reading / writing for xlsx files pyxlsb 1.0.6 Reading for xlsb files ========================= ================== ============================================================= @@ -299,9 +299,9 @@ HTML ========================= ================== ============================================================= Dependency Minimum Version Notes ========================= ================== ============================================================= -BeautifulSoup4 4.6.0 HTML parser for read_html -html5lib 1.0.1 HTML parser for read_html -lxml 4.3.0 HTML parser for read_html +BeautifulSoup4 4.8.2 HTML parser for read_html +html5lib 1.1 HTML parser for read_html +lxml 4.5.0 HTML parser for read_html ========================= ================== ============================================================= One of the following combinations of libraries is needed to use the @@ -334,7 +334,7 @@ XML ========================= ================== ============================================================= Dependency Minimum Version Notes ========================= ================== ============================================================= -lxml 4.3.0 XML parser for read_xml and tree builder for to_xml +lxml 4.5.0 XML parser for read_xml and tree builder for to_xml ========================= ================== ============================================================= SQL databases @@ -343,9 +343,9 @@ SQL databases ========================= ================== ============================================================= Dependency Minimum Version Notes ========================= ================== ============================================================= -SQLAlchemy 1.3.0 SQL support for databases other than sqlite -psycopg2 2.7 PostgreSQL engine for sqlalchemy -pymysql 0.8.1 MySQL engine for sqlalchemy +SQLAlchemy 1.3.11 SQL support for databases other than sqlite +psycopg2 2.8.4 PostgreSQL engine for sqlalchemy +pymysql 0.10.1 MySQL engine for sqlalchemy ========================= ================== ============================================================= Other data sources @@ -354,8 +354,8 @@ Other data sources ========================= ================== ============================================================= Dependency Minimum Version Notes ========================= ================== ============================================================= -PyTables 3.5.1 HDF5-based reading / writing -blosc 1.17.0 Compression for HDF5 +PyTables 3.6.1 HDF5-based reading / writing +blosc 1.20.1 Compression for HDF5 zlib Compression for HDF5 fastparquet 0.4.0 Parquet reading / writing pyarrow 0.17.0 Parquet, ORC, and feather reading / writing @@ -385,7 +385,7 @@ Dependency Minimum Version Notes ========================= ================== ============================================================= fsspec 0.7.4 Handling files aside from simple local and HTTP gcsfs 0.6.0 Google Cloud Storage access -pandas-gbq 0.12.0 Google Big Query access +pandas-gbq 0.14.0 Google Big Query access s3fs 0.4.0 Amazon S3 access ========================= ================== ============================================================= diff --git a/doc/source/whatsnew/v1.4.0.rst b/doc/source/whatsnew/v1.4.0.rst index 166ea2f0d4164..29f9d4ef3c3a5 100644 --- a/doc/source/whatsnew/v1.4.0.rst +++ b/doc/source/whatsnew/v1.4.0.rst @@ -68,7 +68,21 @@ If installed, we now require: +-----------------+-----------------+----------+---------+ | Package | Minimum Version | Required | Changed | +=================+=================+==========+=========+ -| | | X | X | +| numpy | 1.18.5 | X | X | ++-----------------+-----------------+----------+---------+ +| pytz | 2020.1 | X | X | ++-----------------+-----------------+----------+---------+ +| python-dateutil | 2.8.1 | X | X | ++-----------------+-----------------+----------+---------+ +| bottleneck | 1.3.1 | | X | ++-----------------+-----------------+----------+---------+ +| numexpr | 2.7.1 | | X | ++-----------------+-----------------+----------+---------+ +| pytest (dev) | 6.0 | | | ++-----------------+-----------------+----------+---------+ +| mypy (dev) | 0.812 | | | ++-----------------+-----------------+----------+---------+ +| setuptools | 38.6.0 | | | +-----------------+-----------------+----------+---------+ For `optional libraries `_ the general recommendation is to use the latest version. @@ -78,7 +92,45 @@ Optional libraries below the lowest tested version may still work, but are not c +-----------------+-----------------+---------+ | Package | Minimum Version | Changed | +=================+=================+=========+ -| | | X | +| beautifulsoup4 | 4.8.2 | X | ++-----------------+-----------------+---------+ +| fastparquet | 0.4.0 | | ++-----------------+-----------------+---------+ +| fsspec | 0.7.4 | | ++-----------------+-----------------+---------+ +| gcsfs | 0.6.0 | | ++-----------------+-----------------+---------+ +| lxml | 4.5.0 | X | ++-----------------+-----------------+---------+ +| matplotlib | 3.3.2 | X | ++-----------------+-----------------+---------+ +| numba | 0.50.1 | X | ++-----------------+-----------------+---------+ +| openpyxl | 3.0.2 | | ++-----------------+-----------------+---------+ +| pyarrow | 0.17.0 | | ++-----------------+-----------------+---------+ +| pymysql | 0.10.1 | X | ++-----------------+-----------------+---------+ +| pytables | 3.6.1 | X | ++-----------------+-----------------+---------+ +| s3fs | 0.4.0 | | ++-----------------+-----------------+---------+ +| scipy | 1.4.1 | X | ++-----------------+-----------------+---------+ +| sqlalchemy | 1.3.11 | X | ++-----------------+-----------------+---------+ +| tabulate | 0.8.7 | | ++-----------------+-----------------+---------+ +| xarray | 0.15.1 | X | ++-----------------+-----------------+---------+ +| xlrd | 2.0.1 | X | ++-----------------+-----------------+---------+ +| xlsxwriter | 1.2.2 | X | ++-----------------+-----------------+---------+ +| xlwt | 1.3.0 | | ++-----------------+-----------------+---------+ +| pandas-gbq | 0.14.0 | X | +-----------------+-----------------+---------+ See :ref:`install.dependencies` and :ref:`install.optional_dependencies` for more. diff --git a/pandas/compat/_optional.py b/pandas/compat/_optional.py index 11492fe7aaad1..651729cd0ad44 100644 --- a/pandas/compat/_optional.py +++ b/pandas/compat/_optional.py @@ -20,7 +20,7 @@ "numexpr": "2.7.1", "odfpy": "1.4.1", "openpyxl": "3.0.2", - "pandas_gbq": "0.12.0", + "pandas_gbq": "0.14.0", "pyarrow": "0.17.0", "pytest": "6.0", "pyxlsb": "1.0.6", From c6c8405195f1cb40181b5618dcf06575808c96c8 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Tue, 15 Jun 2021 10:29:50 -0500 Subject: [PATCH 11/29] revert changes in code --- doc/source/getting_started/install.rst | 2 +- pandas/compat/__init__.py | 3 +++ pandas/compat/numpy/__init__.py | 1 + pandas/core/common.py | 3 ++- pandas/tests/api/test_api.py | 1 + pandas/tests/arrays/test_datetimelike.py | 16 ++++++++++++++-- pandas/tests/computation/test_eval.py | 11 ++++++++--- pandas/tests/frame/methods/test_sample.py | 14 ++++++++++++-- .../tests/indexes/period/test_searchsorted.py | 9 ++++++++- pandas/tests/indexes/test_numpy_compat.py | 9 ++++++++- pandas/tests/io/json/test_pandas.py | 3 ++- pandas/tests/io/test_parquet.py | 7 +++++-- pandas/tests/io/test_pickle.py | 2 ++ pandas/tests/io/xml/test_to_xml.py | 17 +++++++++++++++++ pandas/tests/io/xml/test_xml.py | 5 +++++ pandas/tests/scalar/test_nat.py | 14 +++++++++++++- .../scalar/timestamp/test_constructors.py | 5 +++++ pandas/tests/test_common.py | 19 +++++++++++-------- 18 files changed, 118 insertions(+), 23 deletions(-) diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst index 6ba8e77a28454..d4c69d2734e94 100644 --- a/doc/source/getting_started/install.rst +++ b/doc/source/getting_started/install.rst @@ -289,7 +289,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.3 Reading / writing for xlsx files +openpyxl 3.0.2 Reading / writing for xlsx files pyxlsb 1.0.6 Reading for xlsb files ========================= ================== ============================================================= diff --git a/pandas/compat/__init__.py b/pandas/compat/__init__.py index 3233de8e3b6d1..369832e9bc05c 100644 --- a/pandas/compat/__init__.py +++ b/pandas/compat/__init__.py @@ -16,6 +16,7 @@ is_numpy_dev, np_array_datetime64_compat, np_datetime64_compat, + np_version_under1p18, np_version_under1p19, np_version_under1p20, ) @@ -26,6 +27,7 @@ pa_version_under4p0, ) +PY38 = sys.version_info >= (3, 8) PY39 = sys.version_info >= (3, 9) PY310 = sys.version_info >= (3, 10) PYPY = platform.python_implementation() == "PyPy" @@ -149,6 +151,7 @@ def get_lzma_file(lzma): "is_numpy_dev", "np_array_datetime64_compat", "np_datetime64_compat", + "np_version_under1p18", "np_version_under1p19", "np_version_under1p20", "pa_version_under1p0", diff --git a/pandas/compat/numpy/__init__.py b/pandas/compat/numpy/__init__.py index 5b87257651a2d..4632626c40236 100644 --- a/pandas/compat/numpy/__init__.py +++ b/pandas/compat/numpy/__init__.py @@ -9,6 +9,7 @@ # numpy versioning _np_version = np.__version__ _nlv = Version(_np_version) +np_version_under1p18 = _nlv < Version("1.18") np_version_under1p19 = _nlv < Version("1.19") np_version_under1p20 = _nlv < Version("1.20") is_numpy_dev = _nlv.dev is not None diff --git a/pandas/core/common.py b/pandas/core/common.py index 5c1673983b1de..183607ebb489d 100644 --- a/pandas/core/common.py +++ b/pandas/core/common.py @@ -33,6 +33,7 @@ Scalar, T, ) +from pandas.compat import np_version_under1p18 from pandas.core.dtypes.cast import construct_1d_object_array_from_listlike from pandas.core.dtypes.common import ( @@ -415,7 +416,7 @@ def random_state(state=None): if ( is_integer(state) or is_array_like(state) - or isinstance(state, np.random.BitGenerator) + or (not np_version_under1p18 and isinstance(state, np.random.BitGenerator)) ): return np.random.RandomState(state) elif isinstance(state, np.random.RandomState): diff --git a/pandas/tests/api/test_api.py b/pandas/tests/api/test_api.py index 95dc1d82cb286..38984238ecf65 100644 --- a/pandas/tests/api/test_api.py +++ b/pandas/tests/api/test_api.py @@ -193,6 +193,7 @@ class TestPDApi(Base): "_hashtable", "_lib", "_libs", + "_np_version_under1p18", "_is_numpy_dev", "_testing", "_tslib", diff --git a/pandas/tests/arrays/test_datetimelike.py b/pandas/tests/arrays/test_datetimelike.py index 1e150f1b431c7..3f3f3a5ee8d18 100644 --- a/pandas/tests/arrays/test_datetimelike.py +++ b/pandas/tests/arrays/test_datetimelike.py @@ -10,6 +10,7 @@ OutOfBoundsDatetime, Timestamp, ) +from pandas.compat import np_version_under1p18 import pandas.util._test_decorators as td import pandas as pd @@ -287,7 +288,12 @@ def test_searchsorted(self): # GH#29884 match numpy convention on whether NaT goes # at the end or the beginning result = arr.searchsorted(NaT) - assert result == 10 + if np_version_under1p18: + # Following numpy convention, NaT goes at the beginning + # (unlike NaN which goes at the end) + assert result == 0 + else: + assert result == 10 @pytest.mark.parametrize("box", [None, "index", "series"]) def test_searchsorted_castable_strings(self, arr1d, box, request, string_storage): @@ -1238,11 +1244,17 @@ def test_invalid_nat_setitem_array(arr, non_casting_nats): ], ) def test_to_numpy_extra(arr): + if np_version_under1p18: + # np.isnan(NaT) raises, so use pandas' + isnan = pd.isna + else: + isnan = np.isnan + arr[0] = NaT original = arr.copy() result = arr.to_numpy() - assert np.isnan(result[0]) + assert isnan(result[0]) result = arr.to_numpy(dtype="int64") assert result[0] == -9223372036854775808 diff --git a/pandas/tests/computation/test_eval.py b/pandas/tests/computation/test_eval.py index b6c6baf6cc7e4..7cf319e1d134c 100644 --- a/pandas/tests/computation/test_eval.py +++ b/pandas/tests/computation/test_eval.py @@ -21,6 +21,7 @@ from pandas import ( DataFrame, Series, + compat, date_range, ) import pandas._testing as tm @@ -1282,8 +1283,10 @@ def test_assignment_column(self): msg = "left hand side of an assignment must be a single name" with pytest.raises(SyntaxError, match=msg): df.eval("d,c = a + b") - - msg = "cannot assign to function call" + if compat.PY38: + msg = "cannot assign to function call" + else: + msg = "can't assign to function call" with pytest.raises(SyntaxError, match=msg): df.eval('Timestamp("20131001") = a + b') @@ -1968,7 +1971,9 @@ def test_bool_ops_fails_on_scalars(lhs, cmp, rhs, engine, parser): "other", [ "'x'", - "...", + pytest.param( + "...", marks=pytest.mark.xfail(not compat.PY38, reason="GH-28116") + ), ], ) def test_equals_various(other): diff --git a/pandas/tests/frame/methods/test_sample.py b/pandas/tests/frame/methods/test_sample.py index 1d10d702aad2e..55ef665c55241 100644 --- a/pandas/tests/frame/methods/test_sample.py +++ b/pandas/tests/frame/methods/test_sample.py @@ -1,6 +1,8 @@ import numpy as np import pytest +from pandas.compat import np_version_under1p18 + from pandas import ( DataFrame, Series, @@ -153,8 +155,16 @@ def test_sample_none_weights(self, obj): "func_str,arg", [ ("np.array", [2, 3, 1, 0]), - ("np.random.MT19937", 3), - ("np.random.PCG64", 11), + pytest.param( + "np.random.MT19937", + 3, + marks=pytest.mark.skipif(np_version_under1p18, reason="NumPy<1.18"), + ), + pytest.param( + "np.random.PCG64", + 11, + marks=pytest.mark.skipif(np_version_under1p18, reason="NumPy<1.18"), + ), ], ) def test_sample_random_state(self, func_str, arg, frame_or_series): diff --git a/pandas/tests/indexes/period/test_searchsorted.py b/pandas/tests/indexes/period/test_searchsorted.py index 27e998284c189..af243eeccc7a4 100644 --- a/pandas/tests/indexes/period/test_searchsorted.py +++ b/pandas/tests/indexes/period/test_searchsorted.py @@ -2,6 +2,7 @@ import pytest from pandas._libs.tslibs import IncompatibleFrequency +from pandas.compat import np_version_under1p18 from pandas import ( NaT, @@ -27,7 +28,13 @@ def test_searchsorted(self, freq): p2 = Period("2014-01-04", freq=freq) assert pidx.searchsorted(p2) == 3 - assert pidx.searchsorted(NaT) == 5 + if np_version_under1p18: + # GH#36254 + # Following numpy convention, NaT goes at the beginning + # (unlike NaN which goes at the end) + assert pidx.searchsorted(NaT) == 0 + else: + assert pidx.searchsorted(NaT) == 5 msg = "Input has different freq=H from PeriodArray" with pytest.raises(IncompatibleFrequency, match=msg): diff --git a/pandas/tests/indexes/test_numpy_compat.py b/pandas/tests/indexes/test_numpy_compat.py index cb3106b9f49e5..f2ed96d0b65b8 100644 --- a/pandas/tests/indexes/test_numpy_compat.py +++ b/pandas/tests/indexes/test_numpy_compat.py @@ -1,6 +1,8 @@ import numpy as np import pytest +from pandas.compat import np_version_under1p18 + from pandas import ( DatetimeIndex, Float64Index, @@ -80,16 +82,21 @@ def test_numpy_ufuncs_other(index, func, request): isinstance(index, DatetimeIndex) and index.tz is not None and func in [np.isfinite, np.isnan, np.isinf] + and ( + not np_version_under1p18 + or (np_version_under1p18 and func is np.isfinite) + ) ): mark = pytest.mark.xfail(reason="__array_ufunc__ is not defined") request.node.add_marker(mark) - if func in [np.isfinite, np.isinf, np.isnan]: + if not np_version_under1p18 and func in [np.isfinite, np.isinf, np.isnan]: # numpy 1.18(dev) changed isinf and isnan to not raise on dt64/tfd64 result = func(index) assert isinstance(result, np.ndarray) elif func is np.isfinite: + # ok under numpy >= 1.17 # Results in bool array result = func(index) assert isinstance(result, np.ndarray) diff --git a/pandas/tests/io/json/test_pandas.py b/pandas/tests/io/json/test_pandas.py index b3275867f9a00..0ffc6044a5897 100644 --- a/pandas/tests/io/json/test_pandas.py +++ b/pandas/tests/io/json/test_pandas.py @@ -11,6 +11,7 @@ from pandas.compat import ( IS64, + PY38, PY310, is_platform_windows, ) @@ -1714,7 +1715,7 @@ def test_json_multiindex(self, dataframe, expected): assert result == expected @pytest.mark.xfail( - is_platform_windows(), + is_platform_windows() and PY38, reason="localhost connection rejected", strict=False, ) diff --git a/pandas/tests/io/test_parquet.py b/pandas/tests/io/test_parquet.py index 12a79f68d71c8..d100c584b698a 100644 --- a/pandas/tests/io/test_parquet.py +++ b/pandas/tests/io/test_parquet.py @@ -13,7 +13,10 @@ from pandas._config import get_option -from pandas.compat import is_platform_windows +from pandas.compat import ( + PY38, + is_platform_windows, +) from pandas.compat.pyarrow import ( pa_version_under1p0, pa_version_under2p0, @@ -648,7 +651,7 @@ def test_categorical(self, pa): check_round_trip(df, pa) @pytest.mark.xfail( - is_platform_windows(), + is_platform_windows() and PY38, reason="localhost connection rejected", strict=False, ) diff --git a/pandas/tests/io/test_pickle.py b/pandas/tests/io/test_pickle.py index ddd5429e39e44..7cf9d7e9a1925 100644 --- a/pandas/tests/io/test_pickle.py +++ b/pandas/tests/io/test_pickle.py @@ -32,6 +32,7 @@ import pytest from pandas.compat import ( + PY38, get_lzma_file, import_lzma, is_platform_little_endian, @@ -209,6 +210,7 @@ def python_unpickler(path): pytest.param( functools.partial(pd.to_pickle, protocol=5), id="pandas_proto_5", + marks=pytest.mark.skipif(not PY38, reason="protocol 5 not supported"), ), ], ) diff --git a/pandas/tests/io/xml/test_to_xml.py b/pandas/tests/io/xml/test_to_xml.py index 478f4c803479d..ac656ddd24acc 100644 --- a/pandas/tests/io/xml/test_to_xml.py +++ b/pandas/tests/io/xml/test_to_xml.py @@ -9,6 +9,7 @@ import numpy as np import pytest +from pandas.compat import PY38 import pandas.util._test_decorators as td from pandas import DataFrame @@ -363,6 +364,10 @@ def test_na_empty_elem_option(datapath, parser): # ATTR_COLS +@pytest.mark.skipif( + not PY38, + reason=("etree alpha ordered attributes < py 3.8"), +) def test_attrs_cols_nan_output(datapath, parser): expected = """\ @@ -378,6 +383,10 @@ def test_attrs_cols_nan_output(datapath, parser): assert output == expected +@pytest.mark.skipif( + not PY38, + reason=("etree alpha ordered attributes < py 3.8"), +) def test_attrs_cols_prefix(datapath, parser): expected = """\ @@ -532,6 +541,10 @@ def test_hierarchical_columns(datapath, parser): assert output == expected +@pytest.mark.skipif( + not PY38, + reason=("etree alpha ordered attributes < py 3.8"), +) def test_hierarchical_attrs_columns(datapath, parser): expected = """\ @@ -601,6 +614,10 @@ def test_multi_index(datapath, parser): assert output == expected +@pytest.mark.skipif( + not PY38, + reason=("etree alpha ordered attributes < py 3.8"), +) def test_multi_index_attrs_cols(datapath, parser): expected = """\ diff --git a/pandas/tests/io/xml/test_xml.py b/pandas/tests/io/xml/test_xml.py index d84ef65d4c691..46b39795f488e 100644 --- a/pandas/tests/io/xml/test_xml.py +++ b/pandas/tests/io/xml/test_xml.py @@ -10,6 +10,7 @@ import numpy as np import pytest +from pandas.compat import PY38 import pandas.util._test_decorators as td from pandas import DataFrame @@ -254,6 +255,10 @@ def test_parser_consistency_file(datapath): @tm.network @pytest.mark.slow @td.skip_if_no("lxml") +@pytest.mark.skipif( + not PY38, + reason=("etree alpha ordered attributes < py 3.8"), +) def test_parser_consistency_url(datapath): url = ( "https://data.cityofchicago.org/api/views/" diff --git a/pandas/tests/scalar/test_nat.py b/pandas/tests/scalar/test_nat.py index 43d61ef6f80e1..08c5ea706111a 100644 --- a/pandas/tests/scalar/test_nat.py +++ b/pandas/tests/scalar/test_nat.py @@ -9,6 +9,7 @@ import pytz from pandas._libs.tslibs import iNaT +import pandas.compat as compat from pandas.core.dtypes.common import is_datetime64_any_dtype @@ -137,7 +138,13 @@ def test_round_nat(klass, method, freq): "dst", "fromordinal", "fromtimestamp", - "fromisocalendar", + pytest.param( + "fromisocalendar", + marks=pytest.mark.skipif( + not compat.PY38, + reason="'fromisocalendar' was added in stdlib datetime in python 3.8", + ), + ), "isocalendar", "strftime", "strptime", @@ -308,6 +315,11 @@ def test_overlap_public_nat_methods(klass, expected): # NaT should have *most* of the Timestamp and Timedelta methods. # In case when Timestamp, Timedelta, and NaT are overlap, the overlap # is considered to be with Timestamp and NaT, not Timedelta. + + # "fromisocalendar" was introduced in 3.8 + if klass is Timestamp and not compat.PY38: + expected.remove("fromisocalendar") + assert _get_overlap_public_nat_methods(klass) == expected diff --git a/pandas/tests/scalar/timestamp/test_constructors.py b/pandas/tests/scalar/timestamp/test_constructors.py index c6c475f5b87a2..16ce51a88340e 100644 --- a/pandas/tests/scalar/timestamp/test_constructors.py +++ b/pandas/tests/scalar/timestamp/test_constructors.py @@ -17,6 +17,7 @@ Period, Timedelta, Timestamp, + compat, ) import pandas._testing as tm @@ -568,6 +569,10 @@ class SubDatetime(datetime): expected = Timestamp(2000, 1, 1) assert result == expected + @pytest.mark.skipif( + not compat.PY38, + reason="datetime.fromisocalendar was added in Python version 3.8", + ) def test_constructor_fromisocalendar(self): # GH 30395 expected_timestamp = Timestamp("2000-01-03 00:00:00") diff --git a/pandas/tests/test_common.py b/pandas/tests/test_common.py index 8ee6ae40cd406..93c95b3004876 100644 --- a/pandas/tests/test_common.py +++ b/pandas/tests/test_common.py @@ -5,6 +5,8 @@ import numpy as np import pytest +from pandas.compat import np_version_under1p18 + import pandas as pd from pandas import Series import pandas._testing as tm @@ -70,14 +72,15 @@ def test_random_state(): # Check BitGenerators # GH32503 - assert ( - com.random_state(npr.MT19937(3)).uniform() - == npr.RandomState(npr.MT19937(3)).uniform() - ) - assert ( - com.random_state(npr.PCG64(11)).uniform() - == npr.RandomState(npr.PCG64(11)).uniform() - ) + if not np_version_under1p18: + assert ( + com.random_state(npr.MT19937(3)).uniform() + == npr.RandomState(npr.MT19937(3)).uniform() + ) + assert ( + com.random_state(npr.PCG64(11)).uniform() + == npr.RandomState(npr.PCG64(11)).uniform() + ) # Error for floats or strings msg = ( From f94dffe29110c69523c8717b7d1e65d8e4b9fb66 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Tue, 15 Jun 2021 10:31:42 -0500 Subject: [PATCH 12/29] revert changes in code --- pandas/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandas/__init__.py b/pandas/__init__.py index 43f05617584cc..db4043686bcbb 100644 --- a/pandas/__init__.py +++ b/pandas/__init__.py @@ -19,7 +19,10 @@ del hard_dependencies, dependency, missing_dependencies # numpy compat -from pandas.compat import is_numpy_dev as _is_numpy_dev +from pandas.compat import ( + np_version_under1p18 as _np_version_under1p18, + is_numpy_dev as _is_numpy_dev, +) try: from pandas._libs import hashtable as _hashtable, lib as _lib, tslib as _tslib From 69650cd2402333aee4e55136c2242b48afff84f6 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Tue, 15 Jun 2021 11:38:49 -0500 Subject: [PATCH 13/29] update python version in install.rst --- doc/source/getting_started/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst index d4c69d2734e94..6c245a0668394 100644 --- a/doc/source/getting_started/install.rst +++ b/doc/source/getting_started/install.rst @@ -20,7 +20,7 @@ Instructions for installing from source, Python version support ---------------------- -Officially Python 3.7.1 and above, 3.8, and 3.9. +Officially Python 3.8, and 3.9. Installing pandas ----------------- From c6798bfc5bb2dcddae933baf03a6d48bfe4f2d3c Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Tue, 15 Jun 2021 11:43:45 -0500 Subject: [PATCH 14/29] revert changes in code --- pandas/tests/io/xml/test_xml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/io/xml/test_xml.py b/pandas/tests/io/xml/test_xml.py index 46b39795f488e..823d155360908 100644 --- a/pandas/tests/io/xml/test_xml.py +++ b/pandas/tests/io/xml/test_xml.py @@ -257,7 +257,7 @@ def test_parser_consistency_file(datapath): @td.skip_if_no("lxml") @pytest.mark.skipif( not PY38, - reason=("etree alpha ordered attributes < py 3.8"), + reason=("etree alpha ordered attributes < py3.8"), ) def test_parser_consistency_url(datapath): url = ( From 32cfed6a0609a30af01b506fe443b57bb8a262c4 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Tue, 15 Jun 2021 11:43:57 -0500 Subject: [PATCH 15/29] revert changes in code --- pandas/tests/io/xml/test_to_xml.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandas/tests/io/xml/test_to_xml.py b/pandas/tests/io/xml/test_to_xml.py index ac656ddd24acc..1e2973075f98e 100644 --- a/pandas/tests/io/xml/test_to_xml.py +++ b/pandas/tests/io/xml/test_to_xml.py @@ -385,7 +385,7 @@ def test_attrs_cols_nan_output(datapath, parser): @pytest.mark.skipif( not PY38, - reason=("etree alpha ordered attributes < py 3.8"), + reason=("etree alpha ordered attributes < py3.8"), ) def test_attrs_cols_prefix(datapath, parser): expected = """\ @@ -543,7 +543,7 @@ def test_hierarchical_columns(datapath, parser): @pytest.mark.skipif( not PY38, - reason=("etree alpha ordered attributes < py 3.8"), + reason=("etree alpha ordered attributes < py3.8"), ) def test_hierarchical_attrs_columns(datapath, parser): expected = """\ @@ -616,7 +616,7 @@ def test_multi_index(datapath, parser): @pytest.mark.skipif( not PY38, - reason=("etree alpha ordered attributes < py 3.8"), + reason=("etree alpha ordered attributes < py3.8"), ) def test_multi_index_attrs_cols(datapath, parser): expected = """\ From 7213ed8ffa1527ea2c8fca08bea341fb17a5d960 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Tue, 15 Jun 2021 16:00:20 -0500 Subject: [PATCH 16/29] stop testing gcsfs --- ci/deps/azure-windows-39.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/deps/azure-windows-39.yaml b/ci/deps/azure-windows-39.yaml index 6d70cb0a222d4..c7a727d055be9 100644 --- a/ci/deps/azure-windows-39.yaml +++ b/ci/deps/azure-windows-39.yaml @@ -16,7 +16,7 @@ dependencies: - beautifulsoup4 - bottleneck - fsspec>=0.8.0 - - gcsfs>=0.6.0 + # - gcsfs - html5lib - jinja2 - lxml From 0387028e25dc053fe90fea03edf4142a95f63f07 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Wed, 16 Jun 2021 08:23:01 -0500 Subject: [PATCH 17/29] resolve confilict --- ci/deps/actions-37-db.yaml | 54 +++++++++++++++++++++++++++++++++++ ci/deps/actions-37.yaml | 28 ++++++++++++++++++ ci/deps/azure-windows-37.yaml | 42 +++++++++++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 ci/deps/actions-37-db.yaml create mode 100644 ci/deps/actions-37.yaml create mode 100644 ci/deps/azure-windows-37.yaml diff --git a/ci/deps/actions-37-db.yaml b/ci/deps/actions-37-db.yaml new file mode 100644 index 0000000000000..a9e4113bf9d18 --- /dev/null +++ b/ci/deps/actions-37-db.yaml @@ -0,0 +1,54 @@ +name: pandas-dev +channels: + - conda-forge +dependencies: + - python=3.7.* + + # tools + - cython>=0.29.21 + - pytest>=6.0 + - pytest-xdist>=1.21 + - hypothesis>=3.58.0 + - pytest-cov>=2.10.1 # this is only needed in the coverage build, ref: GH 35737 + + # pandas dependencies + - beautifulsoup4 + - botocore>=1.11 + - dask + - fastparquet>=0.4.0 + - fsspec>=0.7.4, <2021.6.0 + - gcsfs>=0.6.0 + - geopandas + - html5lib + - matplotlib + - moto>=1.3.14 + - flask + - nomkl + - numexpr + - numpy=1.17.* + - odfpy + - openpyxl + - pandas-gbq + - google-cloud-bigquery>=1.27.2 # GH 36436 + - psycopg2 + - pyarrow>=0.17.0 + - pymysql + - pytables + - python-snappy + - python-dateutil + - pytz + - s3fs>=0.4.0 + - scikit-learn + - scipy + - sqlalchemy + - statsmodels + - xarray + - xlrd<2.0 + - xlsxwriter + - xlwt + - pip + - pip: + - brotlipy + - coverage + - pandas-datareader + - pyxlsb diff --git a/ci/deps/actions-37.yaml b/ci/deps/actions-37.yaml new file mode 100644 index 0000000000000..2272f8470e209 --- /dev/null +++ b/ci/deps/actions-37.yaml @@ -0,0 +1,28 @@ +name: pandas-dev +channels: + - defaults + - conda-forge +dependencies: + - python=3.7.* + + # tools + - cython>=0.29.21 + - pytest>=6.0 + - pytest-cov + - pytest-xdist>=1.21 + - hypothesis>=3.58.0 + + # pandas dependencies + - botocore>=1.11 + - fsspec>=0.7.4, <2021.6.0 + - numpy=1.19 + - python-dateutil + - nomkl + - pyarrow + - pytz + - s3fs>=0.4.0 + - moto>=1.3.14 + - flask + - tabulate + - pyreadstat + - pip diff --git a/ci/deps/azure-windows-37.yaml b/ci/deps/azure-windows-37.yaml new file mode 100644 index 0000000000000..4df55813ea21c --- /dev/null +++ b/ci/deps/azure-windows-37.yaml @@ -0,0 +1,42 @@ +name: pandas-dev +channels: + - defaults + - conda-forge +dependencies: + - python=3.7.* + + # tools + - cython>=0.29.21 + - pytest>=6.0 + - pytest-xdist>=1.21 + - hypothesis>=3.58.0 + - pytest-azurepipelines + + # pandas dependencies + - beautifulsoup4 + - bottleneck + - fsspec>=0.8.0, <2021.6.0 + - gcsfs>=0.6.0 + - html5lib + - jinja2 + - lxml + - matplotlib=2.2.* + - moto>=1.3.14 + - flask + - numexpr + - numpy=1.17.* + - openpyxl + - pyarrow=0.17.0 + - pytables + - python-dateutil + - pytz + - s3fs>=0.4.2 + - scipy + - sqlalchemy + - xlrd>=2.0 + - xlsxwriter + - xlwt + - pyreadstat + - pip + - pip: + - pyxlsb From aecc234f921e5649ac372a660ca2627c7f7641c2 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Wed, 16 Jun 2021 08:23:47 -0500 Subject: [PATCH 18/29] resolve conflict --- ci/deps/actions-37-db.yaml | 54 ----------------------------------- ci/deps/actions-37.yaml | 28 ------------------ ci/deps/azure-windows-37.yaml | 42 --------------------------- 3 files changed, 124 deletions(-) delete mode 100644 ci/deps/actions-37-db.yaml delete mode 100644 ci/deps/actions-37.yaml delete mode 100644 ci/deps/azure-windows-37.yaml diff --git a/ci/deps/actions-37-db.yaml b/ci/deps/actions-37-db.yaml deleted file mode 100644 index a9e4113bf9d18..0000000000000 --- a/ci/deps/actions-37-db.yaml +++ /dev/null @@ -1,54 +0,0 @@ -name: pandas-dev -channels: - - conda-forge -dependencies: - - python=3.7.* - - # tools - - cython>=0.29.21 - - pytest>=6.0 - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 - - pytest-cov>=2.10.1 # this is only needed in the coverage build, ref: GH 35737 - - # pandas dependencies - - beautifulsoup4 - - botocore>=1.11 - - dask - - fastparquet>=0.4.0 - - fsspec>=0.7.4, <2021.6.0 - - gcsfs>=0.6.0 - - geopandas - - html5lib - - matplotlib - - moto>=1.3.14 - - flask - - nomkl - - numexpr - - numpy=1.17.* - - odfpy - - openpyxl - - pandas-gbq - - google-cloud-bigquery>=1.27.2 # GH 36436 - - psycopg2 - - pyarrow>=0.17.0 - - pymysql - - pytables - - python-snappy - - python-dateutil - - pytz - - s3fs>=0.4.0 - - scikit-learn - - scipy - - sqlalchemy - - statsmodels - - xarray - - xlrd<2.0 - - xlsxwriter - - xlwt - - pip - - pip: - - brotlipy - - coverage - - pandas-datareader - - pyxlsb diff --git a/ci/deps/actions-37.yaml b/ci/deps/actions-37.yaml deleted file mode 100644 index 2272f8470e209..0000000000000 --- a/ci/deps/actions-37.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: pandas-dev -channels: - - defaults - - conda-forge -dependencies: - - python=3.7.* - - # tools - - cython>=0.29.21 - - pytest>=6.0 - - pytest-cov - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 - - # pandas dependencies - - botocore>=1.11 - - fsspec>=0.7.4, <2021.6.0 - - numpy=1.19 - - python-dateutil - - nomkl - - pyarrow - - pytz - - s3fs>=0.4.0 - - moto>=1.3.14 - - flask - - tabulate - - pyreadstat - - pip diff --git a/ci/deps/azure-windows-37.yaml b/ci/deps/azure-windows-37.yaml deleted file mode 100644 index 4df55813ea21c..0000000000000 --- a/ci/deps/azure-windows-37.yaml +++ /dev/null @@ -1,42 +0,0 @@ -name: pandas-dev -channels: - - defaults - - conda-forge -dependencies: - - python=3.7.* - - # tools - - cython>=0.29.21 - - pytest>=6.0 - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 - - pytest-azurepipelines - - # pandas dependencies - - beautifulsoup4 - - bottleneck - - fsspec>=0.8.0, <2021.6.0 - - gcsfs>=0.6.0 - - html5lib - - jinja2 - - lxml - - matplotlib=2.2.* - - moto>=1.3.14 - - flask - - numexpr - - numpy=1.17.* - - openpyxl - - pyarrow=0.17.0 - - pytables - - python-dateutil - - pytz - - s3fs>=0.4.2 - - scipy - - sqlalchemy - - xlrd>=2.0 - - xlsxwriter - - xlwt - - pyreadstat - - pip - - pip: - - pyxlsb From 5fc49f73d2bb4f814b9a4c70eee30f626d01788e Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Wed, 16 Jun 2021 08:48:07 -0500 Subject: [PATCH 19/29] update min ver --- ci/deps/actions-38-db.yaml | 2 +- ci/deps/actions-38-slow.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/deps/actions-38-db.yaml b/ci/deps/actions-38-db.yaml index f6943354a67fa..26825cad5c8f6 100644 --- a/ci/deps/actions-38-db.yaml +++ b/ci/deps/actions-38-db.yaml @@ -25,7 +25,7 @@ dependencies: - flask - nomkl - numexpr - - numpy=1.17.* + - numpy=1.18 - odfpy - openpyxl - pandas-gbq diff --git a/ci/deps/actions-38-slow.yaml b/ci/deps/actions-38-slow.yaml index da779dd9b6ac0..a4e6e0d0180d2 100644 --- a/ci/deps/actions-38-slow.yaml +++ b/ci/deps/actions-38-slow.yaml @@ -30,7 +30,7 @@ dependencies: - moto>=1.3.14 - scipy - sqlalchemy - - xlrd>=2.0 + - xlrd - xlsxwriter - xlwt - moto From 1cbeb056d65feb5b9cb65901b158bb7d8474a522 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Wed, 16 Jun 2021 21:12:31 -0500 Subject: [PATCH 20/29] fix job name --- .github/workflows/database.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index d4bb93dfa59fd..54a55cc78914d 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -19,7 +19,7 @@ env: COVERAGE: true jobs: - Linux_py37_IO: + Linux_py38_IO: runs-on: ubuntu-latest defaults: run: From b42c3408414bc78a0ea5ff91782a077c4c3fc94d Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Tue, 22 Jun 2021 09:16:35 -0500 Subject: [PATCH 21/29] remove py37 sdist --- .github/workflows/sdist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sdist.yml b/.github/workflows/sdist.yml index 0c2e30a74bbdb..22029eb2f7481 100644 --- a/.github/workflows/sdist.yml +++ b/.github/workflows/sdist.yml @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9"] + python-version: ["3.8", "3.9"] steps: - uses: actions/checkout@v2 From 2d853b9381d1e923ed05ea78e21799171ec2c198 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Tue, 29 Jun 2021 09:06:55 -0500 Subject: [PATCH 22/29] resolve conflict --- ci/deps/actions-37-slow.yaml | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ci/deps/actions-37-slow.yaml diff --git a/ci/deps/actions-37-slow.yaml b/ci/deps/actions-37-slow.yaml new file mode 100644 index 0000000000000..f44c4e16fc9df --- /dev/null +++ b/ci/deps/actions-37-slow.yaml @@ -0,0 +1,39 @@ +name: pandas-dev +channels: + - defaults + - conda-forge +dependencies: + - python=3.7.* + + # tools + - cython>=0.29.21 + - pytest>=6.0 + - pytest-cov + - pytest-xdist>=1.21 + - hypothesis>=3.58.0 + + # pandas dependencies + - beautifulsoup4 + - fsspec>=0.7.4, <2021.6.0 + - html5lib + - lxml + - matplotlib + - numexpr + - numpy + - openpyxl + - patsy + - psycopg2 + - pymysql + - pytables + - python-dateutil + - pytz + - s3fs>=0.4.0 + - moto>=1.3.14 + - scipy + - sqlalchemy + - xlrd<2.0 + - xlsxwriter + - xlwt + - moto + - flask + - numba \ No newline at end of file From f0e6ccc6a6f8d9f94ac69f10eb339d68ec736a1a Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Tue, 29 Jun 2021 09:07:27 -0500 Subject: [PATCH 23/29] resolve conflict --- ci/azure/windows.yml | 16 +++++++--------- ci/deps/azure-windows-38.yaml | 16 ++++++++-------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/ci/azure/windows.yml b/ci/azure/windows.yml index 58fe69ab2d272..afdaf147dba8c 100644 --- a/ci/azure/windows.yml +++ b/ci/azure/windows.yml @@ -8,41 +8,39 @@ jobs: vmImage: ${{ parameters.vmImage }} strategy: matrix: + py37_np17: + ENV_FILE: ci/deps/azure-windows-37.yaml + CONDA_PY: "37" + PATTERN: "not slow and not network" + PYTEST_WORKERS: 2 # GH-42236 + py38_np18: ENV_FILE: ci/deps/azure-windows-38.yaml CONDA_PY: "38" - PATTERN: "not slow and not network" - - py39: - ENV_FILE: ci/deps/azure-windows-39.yaml - CONDA_PY: "39" PATTERN: "not slow and not network and not high_memory" + PYTEST_WORKERS: 2 # GH-42236 steps: - powershell: | Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" Write-Host "##vso[task.prependpath]$HOME/miniconda3/bin" displayName: 'Add conda to PATH' - - script: conda update -q -n base conda displayName: 'Update conda' - bash: | conda env create -q --file ci\\deps\\azure-windows-$(CONDA_PY).yaml displayName: 'Create anaconda environment' - - bash: | source activate pandas-dev conda list python setup.py build_ext -q -j 4 python -m pip install --no-build-isolation -e . displayName: 'Build' - - bash: | source activate pandas-dev ci/run_tests.sh displayName: 'Test' - - task: PublishTestResults@2 condition: succeededOrFailed() inputs: diff --git a/ci/deps/azure-windows-38.yaml b/ci/deps/azure-windows-38.yaml index 4d224d3f840e8..70aa46e8a5851 100644 --- a/ci/deps/azure-windows-38.yaml +++ b/ci/deps/azure-windows-38.yaml @@ -3,13 +3,13 @@ channels: - conda-forge - defaults dependencies: - - python=3.8 + - python=3.8.* # tools - cython>=0.29.21 - pytest>=6.0 - - pytest-xdist>=1.31 - - hypothesis>=5.5.3 + - pytest-xdist>=1.21 + - hypothesis>=3.58.0 - pytest-azurepipelines # pandas dependencies @@ -17,20 +17,20 @@ dependencies: - bottleneck - fastparquet>=0.4.0 - flask - - fsspec>=0.8.0 - - matplotlib=3.3.2 + - fsspec>=0.8.0, <2021.6.0 + - matplotlib=3.1.3 - moto>=1.3.14 - numba - numexpr - - numpy=1.18.5 + - numpy=1.18.* - openpyxl - jinja2 - - pyarrow=0.17.0 + - pyarrow>=0.17.0 - pytables - python-dateutil - pytz - s3fs>=0.4.0 - scipy - - xlrd + - xlrd<2.0 - xlsxwriter - xlwt From ab6f27bf7835ab9e9d4e583cc437393b74a326b3 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Tue, 29 Jun 2021 09:10:48 -0500 Subject: [PATCH 24/29] resolve conflict --- ci/azure/windows.yml | 12 +++++------ ci/deps/actions-37-slow.yaml | 39 ----------------------------------- ci/deps/azure-windows-38.yaml | 14 ++++++------- 3 files changed, 13 insertions(+), 52 deletions(-) delete mode 100644 ci/deps/actions-37-slow.yaml diff --git a/ci/azure/windows.yml b/ci/azure/windows.yml index afdaf147dba8c..05ba7c57ad6c4 100644 --- a/ci/azure/windows.yml +++ b/ci/azure/windows.yml @@ -8,15 +8,15 @@ jobs: vmImage: ${{ parameters.vmImage }} strategy: matrix: - py37_np17: - ENV_FILE: ci/deps/azure-windows-37.yaml - CONDA_PY: "37" - PATTERN: "not slow and not network" - PYTEST_WORKERS: 2 # GH-42236 - py38_np18: ENV_FILE: ci/deps/azure-windows-38.yaml CONDA_PY: "38" + PATTERN: "not slow and not network" + PYTEST_WORKERS: 2 # GH-42236 + + py39: + ENV_FILE: ci/deps/azure-windows-39.yaml + CONDA_PY: "39" PATTERN: "not slow and not network and not high_memory" PYTEST_WORKERS: 2 # GH-42236 diff --git a/ci/deps/actions-37-slow.yaml b/ci/deps/actions-37-slow.yaml deleted file mode 100644 index f44c4e16fc9df..0000000000000 --- a/ci/deps/actions-37-slow.yaml +++ /dev/null @@ -1,39 +0,0 @@ -name: pandas-dev -channels: - - defaults - - conda-forge -dependencies: - - python=3.7.* - - # tools - - cython>=0.29.21 - - pytest>=6.0 - - pytest-cov - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 - - # pandas dependencies - - beautifulsoup4 - - fsspec>=0.7.4, <2021.6.0 - - html5lib - - lxml - - matplotlib - - numexpr - - numpy - - openpyxl - - patsy - - psycopg2 - - pymysql - - pytables - - python-dateutil - - pytz - - s3fs>=0.4.0 - - moto>=1.3.14 - - scipy - - sqlalchemy - - xlrd<2.0 - - xlsxwriter - - xlwt - - moto - - flask - - numba \ No newline at end of file diff --git a/ci/deps/azure-windows-38.yaml b/ci/deps/azure-windows-38.yaml index 70aa46e8a5851..c56496bce7d6c 100644 --- a/ci/deps/azure-windows-38.yaml +++ b/ci/deps/azure-windows-38.yaml @@ -3,13 +3,13 @@ channels: - conda-forge - defaults dependencies: - - python=3.8.* + - python=3.8 # tools - cython>=0.29.21 - pytest>=6.0 - - pytest-xdist>=1.21 - - hypothesis>=3.58.0 + - pytest-xdist>=1.31 + - hypothesis>=5.5.3 - pytest-azurepipelines # pandas dependencies @@ -18,19 +18,19 @@ dependencies: - fastparquet>=0.4.0 - flask - fsspec>=0.8.0, <2021.6.0 - - matplotlib=3.1.3 + - matplotlib=3.3.2 - moto>=1.3.14 - numba - numexpr - - numpy=1.18.* + - numpy=1.18 - openpyxl - jinja2 - - pyarrow>=0.17.0 + - pyarrow=0.17.0 - pytables - python-dateutil - pytz - s3fs>=0.4.0 - scipy - - xlrd<2.0 + - xlrd - xlsxwriter - xlwt From 2a41987a352419743535c2780e3a230343e79d41 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Tue, 29 Jun 2021 09:38:36 -0500 Subject: [PATCH 25/29] pin fsspec --- ci/deps/actions-38-db.yaml | 2 +- ci/deps/actions-39-slow.yaml | 2 +- ci/deps/azure-windows-39.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/deps/actions-38-db.yaml b/ci/deps/actions-38-db.yaml index 26825cad5c8f6..b4495fa6887f4 100644 --- a/ci/deps/actions-38-db.yaml +++ b/ci/deps/actions-38-db.yaml @@ -16,7 +16,7 @@ dependencies: - botocore>=1.11 - dask - fastparquet>=0.4.0 - - fsspec>=0.7.4 + - fsspec>=0.7.4, <2021.6.0 - gcsfs>=0.6.0 - geopandas - html5lib diff --git a/ci/deps/actions-39-slow.yaml b/ci/deps/actions-39-slow.yaml index 3e28d464381fc..cacafc2518b19 100644 --- a/ci/deps/actions-39-slow.yaml +++ b/ci/deps/actions-39-slow.yaml @@ -14,7 +14,7 @@ dependencies: # pandas dependencies - beautifulsoup4 - - fsspec>=0.7.4 + - fsspec>=0.7.4, <2021.6.0 - html5lib - lxml - matplotlib diff --git a/ci/deps/azure-windows-39.yaml b/ci/deps/azure-windows-39.yaml index c7a727d055be9..5709b4453cdba 100644 --- a/ci/deps/azure-windows-39.yaml +++ b/ci/deps/azure-windows-39.yaml @@ -15,7 +15,7 @@ dependencies: # pandas dependencies - beautifulsoup4 - bottleneck - - fsspec>=0.8.0 + - fsspec>=0.8.0, <2021.6.0 # - gcsfs - html5lib - jinja2 From b5a3e8b8480d69a3a677acc9eda97d3e7a49b059 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Fri, 2 Jul 2021 11:43:53 -0500 Subject: [PATCH 26/29] update whatsnew --- doc/source/whatsnew/v1.4.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v1.4.0.rst b/doc/source/whatsnew/v1.4.0.rst index e98c420d0f501..f93200eecf8e9 100644 --- a/doc/source/whatsnew/v1.4.0.rst +++ b/doc/source/whatsnew/v1.4.0.rst @@ -106,7 +106,7 @@ Optional libraries below the lowest tested version may still work, but are not c +-----------------+-----------------+---------+ | numba | 0.50.1 | X | +-----------------+-----------------+---------+ -| openpyxl | 3.0.2 | | +| openpyxl | 3.0.2 | X | +-----------------+-----------------+---------+ | pyarrow | 0.17.0 | | +-----------------+-----------------+---------+ From eeafda992b830440d14fb0e959662745bf52b027 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Sat, 3 Jul 2021 08:02:13 -0500 Subject: [PATCH 27/29] Update doc/source/whatsnew/v1.4.0.rst Co-authored-by: Simon Hawkins --- doc/source/whatsnew/v1.4.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v1.4.0.rst b/doc/source/whatsnew/v1.4.0.rst index f93200eecf8e9..b2dacdf6f6283 100644 --- a/doc/source/whatsnew/v1.4.0.rst +++ b/doc/source/whatsnew/v1.4.0.rst @@ -80,7 +80,7 @@ If installed, we now require: +-----------------+-----------------+----------+---------+ | pytest (dev) | 6.0 | | | +-----------------+-----------------+----------+---------+ -| mypy (dev) | 0.812 | | | +| mypy (dev) | 0.910 | | X | +-----------------+-----------------+----------+---------+ | setuptools | 38.6.0 | | | +-----------------+-----------------+----------+---------+ From bd005a296f3b17145fe935b11a6b4d41f9f02990 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Sat, 3 Jul 2021 08:04:51 -0500 Subject: [PATCH 28/29] add -W error flag back --- .github/workflows/posix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index d5a3b477e8393..42a8c0052246a 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -31,7 +31,7 @@ jobs: [actions-38-slow.yaml, "slow", "", "", "", "", ""], [actions-38-locale.yaml, "not slow and not network", "language-pack-zh-hans xsel", "zh_CN.utf8", "zh_CN.utf8", "", ""], [actions-39-slow.yaml, "slow", "", "", "", "", ""], - [actions-39-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", ""], + [actions-39-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", "-W error"], [actions-39.yaml, "not slow and not network and not clipboard", "", "", "", "", ""] ] fail-fast: false From c97059f9bf68134d39ab0699f3d5cbbc7e055238 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Sun, 4 Jul 2021 13:31:43 -0500 Subject: [PATCH 29/29] add comment --- ci/deps/azure-windows-39.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/deps/azure-windows-39.yaml b/ci/deps/azure-windows-39.yaml index 5709b4453cdba..aaf86b7310eb2 100644 --- a/ci/deps/azure-windows-39.yaml +++ b/ci/deps/azure-windows-39.yaml @@ -16,7 +16,7 @@ dependencies: - beautifulsoup4 - bottleneck - fsspec>=0.8.0, <2021.6.0 - # - gcsfs + - gcsfs - html5lib - jinja2 - lxml @@ -26,7 +26,7 @@ dependencies: - numexpr - numpy - openpyxl - # - pyarrow + # - pyarrow GH 42370 - pytables - python-dateutil - pytz