This is an automated email from the ASF dual-hosted git repository.
jorisvandenbossche pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 41359dc070 GH-37742: [Python] Enable Cython 3 (#37743)
41359dc070 is described below
commit 41359dc070c63e8bfa83ca8095266e5426cc6c43
Author: Dane Pitkin <[email protected]>
AuthorDate: Thu Oct 5 17:56:31 2023 -0400
GH-37742: [Python] Enable Cython 3 (#37743)
### Rationale for this change
Enable Cython 3.
### What changes are included in this PR?
* Unpin Cython version in builds.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
Yes, pyarrow will build with cython 3 by default.
* Closes: #37742
Authored-by: Dane Pitkin <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
---
.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 cee3c74762..cfa9ffb49d 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>=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 d914229ec5..da52b5ea68 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>=0.29.31
cloudpickle
fsspec
hypothesis
diff --git a/dev/release/verify-release-candidate.sh
b/dev/release/verify-release-candidate.sh
index ae28ebe792..21a3b84a87 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>=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
diff --git a/python/pyproject.toml b/python/pyproject.toml
index a1de6ac4f1..437de105ab 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 efd653ec47..56e9d479ee 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 00504b0c73..f42ee4a018 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 062aac307b..6934161fe6 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -40,9 +40,9 @@ import Cython
# 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 @@ setup(
'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',