Skip to content

Commit c7483af

Browse files
jorisvandenbosscheraulcd
authored andcommitted
GH-36744: [Python][Packaging] Add upper pin for cython<3 to pyarrow build dependencies (#36743)
### Rationale for this change Although we already fixed some cython 3 build issues (#34726), some new have been introduced, which we are seeing now cython 3 is released (#36730) Adding an upper pin (<3) for the release, so we have more time (the full 14.0 release cycle) to iron out issues. * Closes: #36744 Authored-by: Joris Van den Bossche <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
1 parent ae32f8f commit c7483af

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

.github/workflows/dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
shell: bash
104104
run: |
105105
gem install test-unit
106-
pip install cython setuptools six pytest jira
106+
pip install "cython<3" setuptools six pytest jira
107107
- name: Run Release Test
108108
env:
109109
ARROW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

ci/conda_env_python.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# don't add pandas here, because it is not a mandatory test dependency
1919
boto3 # not a direct dependency of s3fs, but needed for our s3fs fixture
2020
cffi
21-
cython
21+
cython<3
2222
cloudpickle
2323
fsspec
2424
hypothesis

python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
[build-system]
1919
requires = [
20-
"cython >= 0.29.31",
20+
"cython >= 0.29.31,<3",
2121
"oldest-supported-numpy>=0.14",
2222
"setuptools_scm",
2323
"setuptools >= 40.1.0",

python/requirements-build.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cython>=0.29.31
1+
cython>=0.29.31,<3
22
oldest-supported-numpy>=0.14
33
setuptools_scm
44
setuptools>=38.6.0

python/requirements-wheel-build.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cython>=0.29.31
1+
cython>=0.29.31,<3
22
oldest-supported-numpy>=0.14
33
setuptools_scm
44
setuptools>=58

python/setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@
4040
# Check if we're running 64-bit Python
4141
is_64_bit = sys.maxsize > 2**32
4242

43-
if Cython.__version__ < '0.29.31':
44-
raise Exception('Please upgrade to Cython 0.29.31 or newer')
43+
if Cython.__version__ < '0.29.31' or Cython.__version__ >= '3.0':
44+
raise Exception(
45+
'Please update your Cython version. Supported Cython >= 0.29.31, < 3.0')
4546

4647
setup_dir = os.path.abspath(os.path.dirname(__file__))
4748

@@ -491,7 +492,7 @@ def has_ext_modules(foo):
491492
'pyarrow/_generated_version.py'),
492493
'version_scheme': guess_next_dev_version
493494
},
494-
setup_requires=['setuptools_scm', 'cython >= 0.29.31'] + setup_requires,
495+
setup_requires=['setuptools_scm', 'cython >= 0.29.31,<3'] + setup_requires,
495496
install_requires=install_requires,
496497
tests_require=['pytest', 'pandas', 'hypothesis'],
497498
python_requires='>=3.8',

0 commit comments

Comments
 (0)