Skip to content

Commit

Permalink
apacheGH-45237: [Python] Raise minimum supported cython to >=3
Browse files Browse the repository at this point in the history
  • Loading branch information
raulcd committed Jan 13, 2025
1 parent b1bb480 commit 69ba571
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 55 deletions.
2 changes: 1 addition & 1 deletion ci/conda_env_python.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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>=0.29.31
cython>=3
cloudpickle
fsspec
hypothesis
Expand Down
24 changes: 0 additions & 24 deletions ci/docker/conda-python-cython2.dockerfile

This file was deleted.

25 changes: 0 additions & 25 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ x-hierarchy:
- conda-python-pandas:
- conda-python-docs
- conda-python-cpython-debug
- conda-python-cython2
- conda-python-dask
- conda-python-emscripten
- conda-python-hdfs
Expand Down Expand Up @@ -1499,30 +1498,6 @@ services:
/arrow/ci/scripts/python_build.sh /arrow /build &&
/arrow/ci/scripts/integration_substrait.sh"]

conda-python-cython2:
# Usage:
# docker compose build conda
# docker compose build conda-cpp
# docker compose build conda-python
# docker compose build conda-python-cython2
# docker compose run --rm conda-python-cython2
image: ${REPO}:${ARCH}-conda-python-${PYTHON}-cython2
build:
context: .
dockerfile: ci/docker/conda-python-cython2.dockerfile
cache_from:
- ${REPO}:${ARCH}-conda-python-${PYTHON}-cython2
args:
repo: ${REPO}
arch: ${ARCH}
python: ${PYTHON}
shm_size: *shm-size
environment:
<<: [*common, *ccache]
PYTEST_ARGS: # inherit
volumes: *conda-volumes
command: *python-conda-command

conda-python-cpython-debug:
# Usage:
# docker compose build conda
Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

[build-system]
requires = [
"cython >= 0.29.31",
"cython >= 3",
# Starting with NumPy 1.25, NumPy is (by default) as far back compatible
# as oldest-support-numpy was (customizable with a NPY_TARGET_VERSION
# define). For older Python versions (where NumPy 1.25 is not yet available)
Expand Down
2 changes: 1 addition & 1 deletion python/requirements-build.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cython>=0.29.31
cython>=3
oldest-supported-numpy>=0.14; python_version<'3.9'
numpy>=1.25; python_version>='3.9'
setuptools_scm>=8
Expand Down
2 changes: 1 addition & 1 deletion python/requirements-wheel-build.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cython>=0.29.31
cython>=3
oldest-supported-numpy>=0.14; python_version<'3.9'
numpy>=2.0.0; python_version>='3.9'
setuptools_scm
Expand Down
4 changes: 2 additions & 2 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
)


if Cython.__version__ < '0.29.31':
if Cython.__version__ < '3':
raise Exception(
'Please update your Cython version. Supported Cython >= 0.29.31')
'Please update your Cython version. Supported Cython >= 3')

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

Expand Down

0 comments on commit 69ba571

Please sign in to comment.