Skip to content

Commit

Permalink
Update cython bounds to 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
gnossen committed Jun 27, 2024
1 parent c4aa89d commit 0fa70c7
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion tools/distrib/install_all_python_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ BASEDIR=$(realpath "$BASEDIR")/../..
PACKAGES="grpcio_channelz grpcio_csds grpcio_admin grpcio_health_checking grpcio_reflection grpcio_status grpcio_testing grpcio_csm_observability grpcio_tests"

(cd "$BASEDIR";
pip install --upgrade "cython<3.0.0rc1";
pip install --upgrade "cython<4.0.0rc1";
python setup.py install;
pushd tools/distrib/python/grpcio_tools;
../make_grpcio_tools.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ popd
rm -rf "Python-${PYTHON_VERSION}"

# install cython and wheel
"${PYTHON_PREFIX}/bin/python3" -m pip install --upgrade 'cython<3.0.0rc1' wheel
"${PYTHON_PREFIX}/bin/python3" -m pip install --upgrade 'cython<4.0.0rc1' wheel
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH

###################################
# Install Python build requirements
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1'

#=================
# Install ccache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ RUN yum update -y && yum install -y curl-devel expat-devel gettext-devel openssl

###################################
# Install Python build requirements
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1'

#=================
# Install ccache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ RUN yum update -y && yum install -y curl-devel expat-devel gettext-devel openssl

###################################
# Install Python build requirements
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1'

#=================
# Install ccache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ FROM quay.io/pypa/musllinux_1_1_x86_64:2023-09-17-ae90a16

###################################
# Install Python build requirements
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1'

#=================
# Install ccache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ FROM quay.io/pypa/musllinux_1_1_i686:2023-09-17-ae90a16

###################################
# Install Python build requirements
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<3.0.0rc1'
RUN /opt/python/cp36-cp36m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp37-cp37m/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp38-cp38/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp39-cp39/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp310-cp310/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp311-cp311/bin/pip install --upgrade 'cython<4.0.0rc1'
RUN /opt/python/cp312-cp312/bin/pip install --upgrade 'cython<4.0.0rc1'

#=================
# Install ccache
Expand Down
2 changes: 1 addition & 1 deletion tools/internal_ci/helper_scripts/requirements.macos.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cython<3.0.0rc1
cython<4.0.0rc1
cryptography==3.4.6
PyJWT==2.0.1
pyOpenSSL==20.0.1
Expand Down
12 changes: 6 additions & 6 deletions tools/internal_ci/macos/grpc_distribtests_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ source tools/internal_ci/helper_scripts/prepare_build_macos_rc

# TODO(jtattermusch): cleanup this prepare build step (needed for python artifact build)
# install cython for all python versions
python3.7 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user
python3.8 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user
python3.9 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user
python3.10 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user
python3.11 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user
python3.12 -m pip install -U 'cython<3.0.0rc1' setuptools==65.4.1 wheel --user
python3.7 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user
python3.8 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user
python3.9 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user
python3.10 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user
python3.11 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user
python3.12 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user

# Build all python macos artifacts (this step actually builds all the binary wheels and source archives)
tools/run_tests/task_runner.py -f artifact macos python ${TASK_RUNNER_EXTRA_FILTERS} -j 2 -x build_artifacts/sponge_log.xml || FAILED="true"
Expand Down
2 changes: 1 addition & 1 deletion tools/run_tests/artifacts/build_artifact_python.bat
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set PATH=C:\msys64\mingw%2\bin;C:\tools\msys64\mingw%2\bin;%PATH%
python -m pip install --upgrade pip six
@rem Ping to a single version to make sure we're building the same artifacts
python -m pip install setuptools==69.5.1 wheel==0.43.0
python -m pip install --upgrade "cython<3.0.0rc1"
python -m pip install --upgrade "cython<4.0.0rc1"
python -m pip install -rrequirements.txt --user

@rem set GRPC_PYTHON_OVERRIDE_CYGWIN_DETECTION_FOR_27=1
Expand Down
2 changes: 1 addition & 1 deletion tools/run_tests/artifacts/build_artifact_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ then
# Any installation step is a potential source of breakages,
# so we are trying to perform as few download-and-install operations
# as possible.
"${PYTHON}" -m pip install --upgrade 'cython<3.0.0rc1'
"${PYTHON}" -m pip install --upgrade 'cython<4.0.0rc1'
fi

# Allow build_ext to build C/C++ files in parallel
Expand Down
2 changes: 1 addition & 1 deletion tools/run_tests/helper_scripts/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ pip_install_dir_and_deps() {

pip_install -U gevent

pip_install --upgrade 'cython<3.0.0rc1'
pip_install --upgrade 'cython<4.0.0rc1'
pip_install --upgrade six 'protobuf>=4.21.3rc1,!=4.22.0.*'

if [ "$("$VENV_PYTHON" -c "import sys; print(sys.version_info[0])")" == "2" ]
Expand Down

0 comments on commit 0fa70c7

Please sign in to comment.