diff --git a/setup.py b/setup.py index 2646af5fd5e..3a50c975d8b 100644 --- a/setup.py +++ b/setup.py @@ -105,6 +105,7 @@ CLASSIFIERS = [ 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'License :: OSI Approved :: Apache Software License', ] diff --git a/src/python/grpcio/README.rst b/src/python/grpcio/README.rst index 0beb0296e80..f3e261db2e0 100644 --- a/src/python/grpcio/README.rst +++ b/src/python/grpcio/README.rst @@ -10,7 +10,7 @@ Package for gRPC Python. Supported Python Versions ------------------------- -Python >= 3.6 +Python >= 3.7 Installation ------------ diff --git a/src/python/grpcio_channelz/README.rst b/src/python/grpcio_channelz/README.rst index 526b34ac83b..9ae42a38f5c 100644 --- a/src/python/grpcio_channelz/README.rst +++ b/src/python/grpcio_channelz/README.rst @@ -5,7 +5,7 @@ Channelz is a live debug tool in gRPC Python. Supported Python Versions ------------------------- -Python >= 3.6 +Python >= 3.7 Dependencies ------------ diff --git a/src/python/grpcio_channelz/setup.py b/src/python/grpcio_channelz/setup.py index 07cc8981394..a1da3f7ce1a 100644 --- a/src/python/grpcio_channelz/setup.py +++ b/src/python/grpcio_channelz/setup.py @@ -55,6 +55,7 @@ CLASSIFIERS = [ 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'License :: OSI Approved :: Apache Software License', ] diff --git a/src/python/grpcio_health_checking/README.rst b/src/python/grpcio_health_checking/README.rst index bb4ff867c41..e5227e4ff2d 100644 --- a/src/python/grpcio_health_checking/README.rst +++ b/src/python/grpcio_health_checking/README.rst @@ -5,7 +5,7 @@ Reference package for GRPC Python health checking. Supported Python Versions ------------------------- -Python >= 3.6 +Python >= 3.7 Dependencies ------------ diff --git a/src/python/grpcio_health_checking/setup.py b/src/python/grpcio_health_checking/setup.py index 04a8df4d26c..2de7eaf27e4 100644 --- a/src/python/grpcio_health_checking/setup.py +++ b/src/python/grpcio_health_checking/setup.py @@ -54,6 +54,7 @@ CLASSIFIERS = [ 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'License :: OSI Approved :: Apache Software License', ] diff --git a/src/python/grpcio_reflection/README.rst b/src/python/grpcio_reflection/README.rst index f8c4c548663..269f4d928b2 100644 --- a/src/python/grpcio_reflection/README.rst +++ b/src/python/grpcio_reflection/README.rst @@ -5,7 +5,7 @@ Reference package for reflection in GRPC Python. Supported Python Versions ------------------------- -Python >= 3.6 +Python >= 3.7 Dependencies ------------ diff --git a/src/python/grpcio_reflection/setup.py b/src/python/grpcio_reflection/setup.py index f6133759941..16793cae5c4 100644 --- a/src/python/grpcio_reflection/setup.py +++ b/src/python/grpcio_reflection/setup.py @@ -55,6 +55,7 @@ CLASSIFIERS = [ 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'License :: OSI Approved :: Apache Software License', ] diff --git a/src/python/grpcio_status/README.rst b/src/python/grpcio_status/README.rst index e9483d033fd..640ea04d400 100644 --- a/src/python/grpcio_status/README.rst +++ b/src/python/grpcio_status/README.rst @@ -5,7 +5,7 @@ Reference package for GRPC Python status proto mapping. Supported Python Versions ------------------------- -Python >= 3.6 +Python >= 3.7 Dependencies ------------ diff --git a/src/python/grpcio_status/setup.py b/src/python/grpcio_status/setup.py index a2bed6ada50..350209fe7b7 100644 --- a/src/python/grpcio_status/setup.py +++ b/src/python/grpcio_status/setup.py @@ -54,6 +54,7 @@ CLASSIFIERS = [ 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'License :: OSI Approved :: Apache Software License', ] diff --git a/src/python/grpcio_testing/README.rst b/src/python/grpcio_testing/README.rst index 66d80b1d535..fe0b6562d00 100644 --- a/src/python/grpcio_testing/README.rst +++ b/src/python/grpcio_testing/README.rst @@ -5,7 +5,7 @@ Testing utilities for gRPC Python Supported Python Versions ------------------------- -Python >= 3.6 +Python >= 3.7 Dependencies ------------ diff --git a/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile b/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile index b06af3b329d..cb1674ef4a9 100644 --- a/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile @@ -27,6 +27,7 @@ RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.7.10" "3.7.10" /opt RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.8.8" "3.8.8" /opt/python/cp38-cp38 RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.9.2" "3.9.2" /opt/python/cp39-cp39 RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.10.0" "3.10.0rc1" /opt/python/cp310-cp310 +RUN /scripts/install_python_for_wheel_crosscompilation.sh "3.11.0" "3.11.0rc1" /opt/python/cp311-cp311 ENV AUDITWHEEL_ARCH armv7l ENV AUDITWHEEL_PLAT linux_armv7l @@ -59,3 +60,5 @@ ENV CXX ${CROSS_TRIPLE}-g++ # truncate it. # TODO(jtattermusch): Remove this hack when possible. RUN echo "# file contents removed to avoid resetting PATH set by the docker image" >/etc/profile + +RUN git config --global --add safe.directory /var/local/jenkins/grpc diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile index f90a46e8be4..ffccd995a78 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile @@ -14,7 +14,7 @@ # Docker file for building gRPC manylinux Python artifacts. -FROM quay.io/pypa/manylinux2014_x86_64:2021-08-26-12e5da0 +FROM quay.io/pypa/manylinux2014_x86_64:2022-08-29-0fd77fa # manylinux_2_17 is the preferred alias of manylinux2014 ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH @@ -29,6 +29,7 @@ RUN /opt/python/cp37-cp37m/bin/pip install --upgrade cython RUN /opt/python/cp38-cp38/bin/pip install --upgrade cython RUN /opt/python/cp39-cp39/bin/pip install --upgrade cython RUN /opt/python/cp310-cp310/bin/pip install --upgrade cython +RUN /opt/python/cp311-cp311/bin/pip install --upgrade cython #================= # Install ccache @@ -43,3 +44,5 @@ RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/downloa && make -j4 && make install \ && cd ../.. \ && rm -rf ccache-4.5.1 ccache.tar.gz + +RUN git config --global --add safe.directory /var/local/jenkins/grpc diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile index 3de8fb180a7..052c196672b 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile @@ -14,7 +14,7 @@ # Docker file for building gRPC manylinux Python artifacts. -FROM quay.io/pypa/manylinux2014_i686:2021-08-26-12e5da0 +FROM quay.io/pypa/manylinux2014_i686:2022-08-29-0fd77fa # manylinux_2_17 is the preferred alias of manylinux2014 ENV AUDITWHEEL_PLAT manylinux_2_17_$AUDITWHEEL_ARCH @@ -29,6 +29,7 @@ RUN /opt/python/cp37-cp37m/bin/pip install --upgrade cython RUN /opt/python/cp38-cp38/bin/pip install --upgrade cython RUN /opt/python/cp39-cp39/bin/pip install --upgrade cython RUN /opt/python/cp310-cp310/bin/pip install --upgrade cython +RUN /opt/python/cp311-cp311/bin/pip install --upgrade cython #================= # Install ccache @@ -42,4 +43,7 @@ RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/downloa && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \ && make -j4 && make install \ && cd ../.. \ - && rm -rf ccache-4.5.1 ccache.tar.gz \ No newline at end of file + && rm -rf ccache-4.5.1 ccache.tar.gz + + +RUN git config --global --add safe.directory /var/local/jenkins/grpc 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 290f252dc4c..c0166713d3e 100644 --- a/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM quay.io/pypa/musllinux_1_1_x86_64:2021-11-15-a808c18 +FROM quay.io/pypa/musllinux_1_1_x86_64:2022-08-29-0fd77fa ################################### # Install Python build requirements @@ -21,6 +21,7 @@ RUN /opt/python/cp37-cp37m/bin/pip install --upgrade cython RUN /opt/python/cp38-cp38/bin/pip install --upgrade cython RUN /opt/python/cp39-cp39/bin/pip install --upgrade cython RUN /opt/python/cp310-cp310/bin/pip install --upgrade cython +RUN /opt/python/cp311-cp311/bin/pip install --upgrade cython #================= # Install ccache @@ -35,3 +36,5 @@ RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/downloa && make -j4 && make install \ && cd ../.. \ && rm -rf ccache-4.5.1 ccache.tar.gz + +RUN git config --global --add safe.directory /var/local/jenkins/grpc 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 7a408b6a45a..9b9553d8dce 100644 --- a/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM quay.io/pypa/musllinux_1_1_i686:2021-11-15-a808c18 +FROM quay.io/pypa/musllinux_1_1_i686:2022-08-29-0fd77fa ################################### # Install Python build requirements @@ -21,6 +21,7 @@ RUN /opt/python/cp37-cp37m/bin/pip install --upgrade cython RUN /opt/python/cp38-cp38/bin/pip install --upgrade cython RUN /opt/python/cp39-cp39/bin/pip install --upgrade cython RUN /opt/python/cp310-cp310/bin/pip install --upgrade cython +RUN /opt/python/cp311-cp311/bin/pip install --upgrade cython #================= # Install ccache @@ -35,3 +36,5 @@ RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/downloa && make -j4 && make install \ && cd ../.. \ && rm -rf ccache-4.5.1 ccache.tar.gz + +RUN git config --global --add safe.directory /var/local/jenkins/grpc diff --git a/tools/internal_ci/helper_scripts/install_python_interpreters.ps1 b/tools/internal_ci/helper_scripts/install_python_interpreters.ps1 index 262f93b4ebc..bd10d8bd3f3 100644 --- a/tools/internal_ci/helper_scripts/install_python_interpreters.ps1 +++ b/tools/internal_ci/helper_scripts/install_python_interpreters.ps1 @@ -111,3 +111,20 @@ $Python310x64Config = @{ PythonInstallerHash = "9ea305690dbfd424a632b6a659347c1e" } Install-Python @Python310x64Config + +# Python 3.11 +$Python311x86Config = @{ + PythonVersion = "3.11.0" + PythonInstaller = "python-3.11.0rc1" + PythonInstallPath = "C:\Python311_32bit" + PythonInstallerHash = "d2e5420e53d9e71c82b4a19763dbaa12" +} +Install-Python @Python311x86Config + +$Python311x64Config = @{ + PythonVersion = "3.11.0" + PythonInstaller = "python-3.11.0rc1-amd64" + PythonInstallPath = "C:\Python311" + PythonInstallerHash = "5943d8702e40a5ccd62e5a8d4c8852aa" +} +Install-Python @Python311x64Config diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc index 182c7ffe085..bdb72b60af9 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc @@ -159,6 +159,14 @@ then shasum -c /tmp/python_installer_checksum.sha256 time sudo installer -pkg ./python-3.10.5-macos11.pkg -target / fi + + # Install Python 3.11 if it doesn't exist + if [ ! -f "/usr/local/bin/python3.11" ]; then + time curl -O https://www.python.org/ftp/python/3.11.0/python-3.11.0rc1-macos11.pkg + echo "eec3f817797b1d61f48f29b96ac0443ea19f3170 python-3.11.0rc1-macos11.pkg" > /tmp/python_installer_checksum.sha256 + shasum -c /tmp/python_installer_checksum.sha256 + time sudo installer -pkg ./python-3.11.0rc1-macos11.pkg -target / + fi fi if [ "${PREPARE_BUILD_INSTALL_DEPS_CSHARP}" == "true" ] diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py index a3b12b07759..443bcce2eaa 100644 --- a/tools/run_tests/artifacts/artifact_targets.py +++ b/tools/run_tests/artifacts/artifact_targets.py @@ -441,25 +441,31 @@ def targets(): PythonArtifact('manylinux2014', 'x64', 'cp37-cp37m', presubmit=True), PythonArtifact('manylinux2014', 'x64', 'cp38-cp38', presubmit=True), PythonArtifact('manylinux2014', 'x64', 'cp39-cp39'), - PythonArtifact('manylinux2014', 'x64', 'cp310-cp310', presubmit=True), + PythonArtifact('manylinux2014', 'x64', 'cp310-cp310'), + PythonArtifact('manylinux2014', 'x64', 'cp311-cp311', presubmit=True), PythonArtifact('manylinux2014', 'x86', 'cp37-cp37m', presubmit=True), PythonArtifact('manylinux2014', 'x86', 'cp38-cp38', presubmit=True), PythonArtifact('manylinux2014', 'x86', 'cp39-cp39'), - PythonArtifact('manylinux2014', 'x86', 'cp310-cp310', presubmit=True), + PythonArtifact('manylinux2014', 'x86', 'cp310-cp310'), + PythonArtifact('manylinux2014', 'x86', 'cp311-cp311', presubmit=True), PythonArtifact('manylinux2014', 'aarch64', 'cp37-cp37m', presubmit=True), PythonArtifact('manylinux2014', 'aarch64', 'cp38-cp38', presubmit=True), PythonArtifact('manylinux2014', 'aarch64', 'cp39-cp39'), PythonArtifact('manylinux2014', 'aarch64', 'cp310-cp310'), + # TODO(https://github.com/grpc/grpc/issues/30927): Support aarch64 with 3.11. Blocked on dockcross support. PythonArtifact('linux_extra', 'armv7', 'cp37-cp37m', presubmit=True), PythonArtifact('linux_extra', 'armv7', 'cp38-cp38'), PythonArtifact('linux_extra', 'armv7', 'cp39-cp39'), - PythonArtifact('linux_extra', 'armv7', 'cp310-cp310', presubmit=True), - PythonArtifact('musllinux_1_1', 'x64', 'cp310-cp310', presubmit=True), + PythonArtifact('linux_extra', 'armv7', 'cp310-cp310'), + PythonArtifact('linux_extra', 'armv7', 'cp311-cp311', presubmit=True), + PythonArtifact('musllinux_1_1', 'x64', 'cp310-cp310'), + PythonArtifact('musllinux_1_1', 'x64', 'cp311-cp311', presubmit=True), PythonArtifact('musllinux_1_1', 'x64', 'cp37-cp37m', presubmit=True), PythonArtifact('musllinux_1_1', 'x64', 'cp38-cp38'), PythonArtifact('musllinux_1_1', 'x64', 'cp39-cp39'), - PythonArtifact('musllinux_1_1', 'x86', 'cp310-cp310', presubmit=True), + PythonArtifact('musllinux_1_1', 'x86', 'cp310-cp310'), + PythonArtifact('musllinux_1_1', 'x86', 'cp311-cp311', presubmit=True), PythonArtifact('musllinux_1_1', 'x86', 'cp37-cp37m', presubmit=True), PythonArtifact('musllinux_1_1', 'x86', 'cp38-cp38'), PythonArtifact('musllinux_1_1', 'x86', 'cp39-cp39'), @@ -467,14 +473,17 @@ def targets(): PythonArtifact('macos', 'x64', 'python3.8'), PythonArtifact('macos', 'x64', 'python3.9'), PythonArtifact('macos', 'x64', 'python3.10', presubmit=True), + PythonArtifact('macos', 'x64', 'python3.11', presubmit=True), PythonArtifact('windows', 'x86', 'Python37_32bit', presubmit=True), PythonArtifact('windows', 'x86', 'Python38_32bit'), PythonArtifact('windows', 'x86', 'Python39_32bit'), - PythonArtifact('windows', 'x86', 'Python310_32bit', presubmit=True), + PythonArtifact('windows', 'x86', 'Python310_32bit'), + PythonArtifact('windows', 'x86', 'Python311_32bit', presubmit=True), PythonArtifact('windows', 'x64', 'Python37', presubmit=True), PythonArtifact('windows', 'x64', 'Python38'), PythonArtifact('windows', 'x64', 'Python39'), - PythonArtifact('windows', 'x64', 'Python310', presubmit=True), + PythonArtifact('windows', 'x64', 'Python310'), + PythonArtifact('windows', 'x64', 'Python311', presubmit=True), RubyArtifact('linux', 'x86-mingw32', presubmit=True), RubyArtifact('linux', 'x64-mingw32', presubmit=True), RubyArtifact('linux', 'x64-mingw-ucrt', presubmit=True),