diff --git a/.github/actions/build_pandas/action.yml b/.github/actions/build_pandas/action.yml index d4777bcd1d079..2e4bfea165316 100644 --- a/.github/actions/build_pandas/action.yml +++ b/.github/actions/build_pandas/action.yml @@ -13,5 +13,5 @@ runs: - name: Build Pandas run: | python setup.py build_ext -j 2 - python -m pip install -e . --no-build-isolation --no-use-pep517 + python -m pip install -e . --no-build-isolation --no-use-pep517 --no-index shell: bash -l {0} diff --git a/.github/workflows/sdist.yml b/.github/workflows/sdist.yml index 2e890506073a8..7692dc522522f 100644 --- a/.github/workflows/sdist.yml +++ b/.github/workflows/sdist.yml @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9"] + python-version: ["3.8", "3.9", "3.10"] concurrency: group: ${{github.ref}}-${{matrix.python-version}}-sdist cancel-in-progress: ${{github.event_name == 'pull_request'}} @@ -53,13 +53,24 @@ jobs: - uses: conda-incubator/setup-miniconda@v2 with: activate-environment: pandas-sdist - python-version: ${{ matrix.python-version }} + python-version: '${{ matrix.python-version }}' - name: Install pandas from sdist run: | - conda list + pip list python -m pip install dist/*.gz + - name: Force oldest supported NumPy + run: | + case "${{matrix.python-version}}" in + 3.8) + pip install numpy==1.18.5 ;; + 3.9) + pip install numpy==1.19.3 ;; + 3.10) + pip install numpy==1.21.2 ;; + esac + - name: Import pandas run: | cd .. diff --git a/ci/deps/actions-38-db-min.yaml b/ci/deps/actions-38-db-min.yaml index c93f791b7dba7..a45e3919afd69 100644 --- a/ci/deps/actions-38-db-min.yaml +++ b/ci/deps/actions-38-db-min.yaml @@ -5,7 +5,7 @@ dependencies: - python=3.8 # tools - - cython>=0.29.21 + - cython>=0.29.24 - pytest>=6.0 - pytest-cov - pytest-xdist>=1.31 diff --git a/ci/deps/actions-38-db.yaml b/ci/deps/actions-38-db.yaml index 26825cad5c8f6..a143de20c2207 100644 --- a/ci/deps/actions-38-db.yaml +++ b/ci/deps/actions-38-db.yaml @@ -5,7 +5,7 @@ dependencies: - python=3.8 # tools - - cython>=0.29.21 + - cython>=0.29.24 - pytest>=6.0 - pytest-xdist>=1.31 - hypothesis>=5.5.3 diff --git a/ci/deps/actions-38-locale.yaml b/ci/deps/actions-38-locale.yaml index 46ebaadc3049a..13b132109effb 100644 --- a/ci/deps/actions-38-locale.yaml +++ b/ci/deps/actions-38-locale.yaml @@ -5,7 +5,7 @@ dependencies: - python=3.8 # tools - - cython>=0.29.21 + - cython>=0.29.24 - pytest>=6.0 - pytest-cov - pytest-xdist>=1.31 diff --git a/ci/deps/actions-38-locale_slow.yaml b/ci/deps/actions-38-locale_slow.yaml index e7276027f2a41..0ff5dd6c3f7f0 100644 --- a/ci/deps/actions-38-locale_slow.yaml +++ b/ci/deps/actions-38-locale_slow.yaml @@ -6,7 +6,7 @@ dependencies: - python=3.8 # tools - - cython>=0.29.21 + - cython>=0.29.24 - pytest>=6.0 - pytest-cov - pytest-xdist>=1.31 diff --git a/ci/deps/actions-38-minimum_versions.yaml b/ci/deps/actions-38-minimum_versions.yaml index d666bc3b555f5..cdcb598ccc566 100644 --- a/ci/deps/actions-38-minimum_versions.yaml +++ b/ci/deps/actions-38-minimum_versions.yaml @@ -5,7 +5,7 @@ dependencies: - python=3.8.0 # tools - - cython=0.29.21 + - cython=0.29.24 - pytest>=6.0 - pytest-cov - pytest-xdist>=1.31 diff --git a/ci/deps/actions-38-slow.yaml b/ci/deps/actions-38-slow.yaml index a4e6e0d0180d2..903bd25655bd2 100644 --- a/ci/deps/actions-38-slow.yaml +++ b/ci/deps/actions-38-slow.yaml @@ -5,7 +5,7 @@ dependencies: - python=3.8 # tools - - cython>=0.29.21 + - cython>=0.29.24 - pytest>=6.0 - pytest-cov - pytest-xdist>=1.31 diff --git a/ci/deps/actions-38.yaml b/ci/deps/actions-38.yaml index 86b038ff7d4b6..899913d6e8c70 100644 --- a/ci/deps/actions-38.yaml +++ b/ci/deps/actions-38.yaml @@ -6,7 +6,7 @@ dependencies: - python=3.8 # tools - - cython>=0.29.21 + - cython>=0.29.24 - pytest>=6.0 - pytest-cov - pytest-xdist>=1.31 diff --git a/ci/deps/actions-39-numpydev.yaml b/ci/deps/actions-39-numpydev.yaml index 03181a9d71d1d..4a6acf55e265f 100644 --- a/ci/deps/actions-39-numpydev.yaml +++ b/ci/deps/actions-39-numpydev.yaml @@ -15,7 +15,7 @@ dependencies: - pytz - pip - pip: - - cython==0.29.21 # GH#34014 + - cython==0.29.24 # GH#34014 - "--extra-index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple" - "--pre" - "numpy" diff --git a/ci/deps/actions-39-slow.yaml b/ci/deps/actions-39-slow.yaml index e8c431c59a564..2d723354935d2 100644 --- a/ci/deps/actions-39-slow.yaml +++ b/ci/deps/actions-39-slow.yaml @@ -6,7 +6,7 @@ dependencies: - python=3.9 # tools - - cython>=0.29.21 + - cython>=0.29.24 - pytest>=6.0 - pytest-cov - pytest-xdist>=1.31 diff --git a/ci/deps/actions-39.yaml b/ci/deps/actions-39.yaml index 322b3ae6007c7..8751651ece115 100644 --- a/ci/deps/actions-39.yaml +++ b/ci/deps/actions-39.yaml @@ -5,7 +5,7 @@ dependencies: - python=3.9 # tools - - cython>=0.29.21 + - cython>=0.29.24 - pytest>=6.0 - pytest-cov - pytest-xdist>=1.31 diff --git a/ci/deps/azure-macos-38.yaml b/ci/deps/azure-macos-38.yaml index 029d088362aa9..27bfb136005c1 100644 --- a/ci/deps/azure-macos-38.yaml +++ b/ci/deps/azure-macos-38.yaml @@ -32,6 +32,6 @@ dependencies: - xlwt - pip - pip: - - cython>=0.29.21 + - cython>=0.29.24 - pyreadstat - pyxlsb diff --git a/ci/deps/azure-windows-38.yaml b/ci/deps/azure-windows-38.yaml index 3bf80e97b3663..3e462a7cb3a65 100644 --- a/ci/deps/azure-windows-38.yaml +++ b/ci/deps/azure-windows-38.yaml @@ -6,7 +6,7 @@ dependencies: - python=3.8 # tools - - cython>=0.29.21 + - cython>=0.29.24 - pytest>=6.0 - pytest-xdist>=1.31 - hypothesis>=5.5.3 diff --git a/ci/deps/azure-windows-39.yaml b/ci/deps/azure-windows-39.yaml index f8e3332347b69..0e352a80a6d34 100644 --- a/ci/deps/azure-windows-39.yaml +++ b/ci/deps/azure-windows-39.yaml @@ -6,7 +6,7 @@ dependencies: - python=3.9 # tools - - cython>=0.29.21 + - cython>=0.29.24 - pytest>=6.0 - pytest-xdist>=1.31 - hypothesis>=5.5.3 diff --git a/ci/deps/circle-38-arm64.yaml b/ci/deps/circle-38-arm64.yaml index 17fe5b4b7b77b..6627ed5073b46 100644 --- a/ci/deps/circle-38-arm64.yaml +++ b/ci/deps/circle-38-arm64.yaml @@ -5,7 +5,7 @@ dependencies: - python=3.8 # tools - - cython>=0.29.21 + - cython>=0.29.24 - pytest>=6.0 - pytest-xdist>=1.31 - hypothesis>=5.5.3 diff --git a/doc/source/whatsnew/v1.3.4.rst b/doc/source/whatsnew/v1.3.4.rst index 6f07dc3e1e2f9..963aaa7f9189f 100644 --- a/doc/source/whatsnew/v1.3.4.rst +++ b/doc/source/whatsnew/v1.3.4.rst @@ -42,7 +42,7 @@ Bug fixes Other ~~~~~ -- +- The minimum version of Cython needed to compile pandas is now ``0.29.24`` (:issue:`43729`) - .. --------------------------------------------------------------------------- diff --git a/pyproject.toml b/pyproject.toml index fe48a4d684cf8..ae68e54ce1346 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,18 +4,8 @@ requires = [ "setuptools>=51.0.0", "wheel", - "Cython>=0.29.21,<3", # Note: sync with setup.py - # Numpy requirements for different OS/architectures - # Copied from https://github.com/scipy/scipy/blob/master/pyproject.toml (which is also licensed under BSD) - "numpy==1.17.3; python_version=='3.7' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64'", - "numpy==1.18.3; python_version=='3.8' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64'", - "numpy==1.19.3; python_version>='3.9' and (platform_machine!='arm64' or platform_system!='Darwin')", - # Aarch64(Python 3.9 requirements are the same as AMD64) - "numpy==1.19.2; python_version=='3.7' and platform_machine=='aarch64'", - "numpy==1.19.2; python_version=='3.8' and platform_machine=='aarch64'", - # Darwin Arm64 - "numpy>=1.20.0; python_version=='3.8' and platform_machine=='arm64' and platform_system=='Darwin'", - "numpy>=1.20.0; python_version=='3.9' and platform_machine=='arm64' and platform_system=='Darwin'" + "Cython>=0.29.24,<3", # Note: sync with setup.py + "oldest-supported-numpy>=0.10" ] # uncomment to enable pep517 after versioneer problem is fixed. # https://github.com/python-versioneer/python-versioneer/issues/193 diff --git a/setup.cfg b/setup.cfg index 62ff0c6934f77..9deebb835eff7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,6 +21,7 @@ classifiers = Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 Topic :: Scientific/Engineering project_urls = Bug Tracker = https://github.com/pandas-dev/pandas/issues @@ -30,7 +31,10 @@ project_urls = [options] packages = find: install_requires = - numpy>=1.18.5 + numpy>=1.18.5; platform_machine!='aarch64' and platform_machine!='arm64' and python_version<'3.10' + numpy>=1.19.2; platform_machine=='aarch64' and python_version<'3.10' + numpy>=1.20.0; platform_machine=='arm64' and python_version<'3.10' + numpy>=1.21.0; python_version>='3.10' python-dateutil>=2.8.1 pytz>=2020.1 python_requires = >=3.8 diff --git a/setup.py b/setup.py index 337719053585c..f5151621c9efe 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ def is_platform_mac(): return sys.platform == "darwin" -min_cython_ver = "0.29.21" # note: sync with pyproject.toml +min_cython_ver = "0.29.24" # note: sync with pyproject.toml try: from Cython import (