diff --git a/tools/distrib/install_all_python_modules.sh b/tools/distrib/install_all_python_modules.sh index b389df483776f..b715eb8cc1795 100755 --- a/tools/distrib/install_all_python_modules.sh +++ b/tools/distrib/install_all_python_modules.sh @@ -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 diff --git a/tools/dockerfile/grpc_artifact_python_linux_armv7/install_python_for_wheel_crosscompilation.sh b/tools/dockerfile/grpc_artifact_python_linux_armv7/install_python_for_wheel_crosscompilation.sh index 08c6439d36a04..f1f1d39509e9c 100755 --- a/tools/dockerfile/grpc_artifact_python_linux_armv7/install_python_for_wheel_crosscompilation.sh +++ b/tools/dockerfile/grpc_artifact_python_linux_armv7/install_python_for_wheel_crosscompilation.sh @@ -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 diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile index 8e1c0751a8a90..329c4dac51561 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux2014_aarch64/Dockerfile @@ -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 diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile index ae959de2db4e9..7cda60426789a 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile @@ -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 diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile index 7736403f098bf..f305335f52654 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile @@ -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 diff --git a/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile b/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile index a6eff9bbe715f..c06858b0db08b 100644 --- a/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile @@ -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 diff --git a/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile b/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile index c7ac549e98fcf..d4f96cfdc150b 100644 --- a/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile @@ -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 diff --git a/tools/internal_ci/helper_scripts/requirements.macos.txt b/tools/internal_ci/helper_scripts/requirements.macos.txt index 59a759b0ce231..57c4fb7abf5bb 100644 --- a/tools/internal_ci/helper_scripts/requirements.macos.txt +++ b/tools/internal_ci/helper_scripts/requirements.macos.txt @@ -1,4 +1,4 @@ -cython<3.0.0rc1 +cython<4.0.0rc1 cryptography==3.4.6 PyJWT==2.0.1 pyOpenSSL==20.0.1 diff --git a/tools/internal_ci/macos/grpc_distribtests_python.sh b/tools/internal_ci/macos/grpc_distribtests_python.sh index 8bd18de2e1d01..e0d305db0f52c 100644 --- a/tools/internal_ci/macos/grpc_distribtests_python.sh +++ b/tools/internal_ci/macos/grpc_distribtests_python.sh @@ -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" diff --git a/tools/run_tests/artifacts/build_artifact_python.bat b/tools/run_tests/artifacts/build_artifact_python.bat index f76ac6b31c7c3..af43acf68c630 100644 --- a/tools/run_tests/artifacts/build_artifact_python.bat +++ b/tools/run_tests/artifacts/build_artifact_python.bat @@ -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 diff --git a/tools/run_tests/artifacts/build_artifact_python.sh b/tools/run_tests/artifacts/build_artifact_python.sh index 1598d2edc183c..2a84f1949aec7 100755 --- a/tools/run_tests/artifacts/build_artifact_python.sh +++ b/tools/run_tests/artifacts/build_artifact_python.sh @@ -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 diff --git a/tools/run_tests/helper_scripts/build_python.sh b/tools/run_tests/helper_scripts/build_python.sh index 347d5a73c3388..9a092f2443e46 100755 --- a/tools/run_tests/helper_scripts/build_python.sh +++ b/tools/run_tests/helper_scripts/build_python.sh @@ -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" ]