From 8ea184bd77770f56fd2bd6abd510fa8bb2fdab07 Mon Sep 17 00:00:00 2001 From: Dane Pitkin Date: Fri, 15 Sep 2023 12:58:25 -0400 Subject: [PATCH 1/2] Enable Cython 3 --- .github/workflows/dev.yml | 2 +- ci/conda_env_python.txt | 2 +- dev/release/verify-release-candidate.sh | 2 +- python/pyproject.toml | 2 +- python/requirements-build.txt | 2 +- python/requirements-wheel-build.txt | 2 +- python/setup.py | 6 +++--- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index cee3c74762c..e8fe565ace0 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -103,7 +103,7 @@ jobs: shell: bash run: | gem install test-unit - pip install "cython<3" setuptools six pytest jira + pip install cython setuptools six pytest jira - name: Run Release Test env: ARROW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/ci/conda_env_python.txt b/ci/conda_env_python.txt index d914229ec58..203ed7c00d1 100644 --- a/ci/conda_env_python.txt +++ b/ci/conda_env_python.txt @@ -18,7 +18,7 @@ # don't add pandas here, because it is not a mandatory test dependency boto3 # not a direct dependency of s3fs, but needed for our s3fs fixture cffi -cython<3 +cython cloudpickle fsspec hypothesis diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index ae28ebe7924..6a5efda487a 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -666,7 +666,7 @@ test_python() { show_header "Build and test Python libraries" # Build and test Python - maybe_setup_virtualenv "cython<3" numpy "setuptools_scm<8.0.0" setuptools || exit 1 + maybe_setup_virtualenv cython numpy "setuptools_scm<8.0.0" setuptools || exit 1 maybe_setup_conda --file ci/conda_env_python.txt || exit 1 if [ "${USE_CONDA}" -gt 0 ]; then diff --git a/python/pyproject.toml b/python/pyproject.toml index a1de6ac4f1c..437de105ab8 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -17,7 +17,7 @@ [build-system] requires = [ - "cython >= 0.29.31,<3", + "cython >= 0.29.31", "oldest-supported-numpy>=0.14", "setuptools_scm < 8.0.0", "setuptools >= 40.1.0", diff --git a/python/requirements-build.txt b/python/requirements-build.txt index efd653ec470..56e9d479ee9 100644 --- a/python/requirements-build.txt +++ b/python/requirements-build.txt @@ -1,4 +1,4 @@ -cython>=0.29.31,<3 +cython>=0.29.31 oldest-supported-numpy>=0.14 setuptools_scm<8.0.0 setuptools>=38.6.0 diff --git a/python/requirements-wheel-build.txt b/python/requirements-wheel-build.txt index 00504b0c731..f42ee4a018f 100644 --- a/python/requirements-wheel-build.txt +++ b/python/requirements-wheel-build.txt @@ -1,4 +1,4 @@ -cython>=0.29.31,<3 +cython>=0.29.31 oldest-supported-numpy>=0.14 setuptools_scm<8.0.0 setuptools>=58 diff --git a/python/setup.py b/python/setup.py index 062aac307b1..6934161fe6d 100755 --- a/python/setup.py +++ b/python/setup.py @@ -40,9 +40,9 @@ # Check if we're running 64-bit Python is_64_bit = sys.maxsize > 2**32 -if Cython.__version__ < '0.29.31' or Cython.__version__ >= '3.0': +if Cython.__version__ < '0.29.31': raise Exception( - 'Please update your Cython version. Supported Cython >= 0.29.31, < 3.0') + 'Please update your Cython version. Supported Cython >= 0.29.31') setup_dir = os.path.abspath(os.path.dirname(__file__)) @@ -492,7 +492,7 @@ def has_ext_modules(foo): 'pyarrow/_generated_version.py'), 'version_scheme': guess_next_dev_version }, - setup_requires=['setuptools_scm < 8.0.0', 'cython >= 0.29.31,<3'] + setup_requires, + setup_requires=['setuptools_scm < 8.0.0', 'cython >= 0.29.31'] + setup_requires, install_requires=install_requires, tests_require=['pytest', 'pandas', 'hypothesis'], python_requires='>=3.8', From 3d1a44f64b4a06320f10998b12347c001ec93397 Mon Sep 17 00:00:00 2001 From: Dane Pitkin Date: Tue, 26 Sep 2023 15:12:49 -0400 Subject: [PATCH 2/2] Pin cython min version everywhere --- .github/workflows/dev.yml | 2 +- ci/conda_env_python.txt | 2 +- dev/release/verify-release-candidate.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index e8fe565ace0..cfa9ffb49d7 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -103,7 +103,7 @@ jobs: shell: bash run: | gem install test-unit - pip install cython setuptools six pytest jira + pip install "cython>=0.29.31" setuptools six pytest jira - name: Run Release Test env: ARROW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/ci/conda_env_python.txt b/ci/conda_env_python.txt index 203ed7c00d1..da52b5ea689 100644 --- a/ci/conda_env_python.txt +++ b/ci/conda_env_python.txt @@ -18,7 +18,7 @@ # don't add pandas here, because it is not a mandatory test dependency boto3 # not a direct dependency of s3fs, but needed for our s3fs fixture cffi -cython +cython>=0.29.31 cloudpickle fsspec hypothesis diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 6a5efda487a..21a3b84a875 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -666,7 +666,7 @@ test_python() { show_header "Build and test Python libraries" # Build and test Python - maybe_setup_virtualenv cython numpy "setuptools_scm<8.0.0" setuptools || exit 1 + maybe_setup_virtualenv "cython>=0.29.31" numpy "setuptools_scm<8.0.0" setuptools || exit 1 maybe_setup_conda --file ci/conda_env_python.txt || exit 1 if [ "${USE_CONDA}" -gt 0 ]; then