Support Python 3.11 (#30818)

* Support Python 3.11

* Update build images for 3.11

* Whoopsie

* The architecture of this thing is garbage

* Silence ownership warning

* Account for change in git behavior

* Fix directory

* I am in great pain

* Update Windows and arm linux

* Agh

* Clean up
pull/30945/head
Richard Belleville 3 years ago committed by GitHub
parent d7cce32449
commit 2297249e47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      setup.py
  2. 2
      src/python/grpcio/README.rst
  3. 2
      src/python/grpcio_channelz/README.rst
  4. 1
      src/python/grpcio_channelz/setup.py
  5. 2
      src/python/grpcio_health_checking/README.rst
  6. 1
      src/python/grpcio_health_checking/setup.py
  7. 2
      src/python/grpcio_reflection/README.rst
  8. 1
      src/python/grpcio_reflection/setup.py
  9. 2
      src/python/grpcio_status/README.rst
  10. 1
      src/python/grpcio_status/setup.py
  11. 2
      src/python/grpcio_testing/README.rst
  12. 3
      tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile
  13. 5
      tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile
  14. 6
      tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile
  15. 5
      tools/dockerfile/grpc_artifact_python_musllinux_1_1_x64/Dockerfile
  16. 5
      tools/dockerfile/grpc_artifact_python_musllinux_1_1_x86/Dockerfile
  17. 17
      tools/internal_ci/helper_scripts/install_python_interpreters.ps1
  18. 8
      tools/internal_ci/helper_scripts/prepare_build_macos_rc
  19. 23
      tools/run_tests/artifacts/artifact_targets.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',
]

@ -10,7 +10,7 @@ Package for gRPC Python.
Supported Python Versions
-------------------------
Python >= 3.6
Python >= 3.7
Installation
------------

@ -5,7 +5,7 @@ Channelz is a live debug tool in gRPC Python.
Supported Python Versions
-------------------------
Python >= 3.6
Python >= 3.7
Dependencies
------------

@ -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',
]

@ -5,7 +5,7 @@ Reference package for GRPC Python health checking.
Supported Python Versions
-------------------------
Python >= 3.6
Python >= 3.7
Dependencies
------------

@ -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',
]

@ -5,7 +5,7 @@ Reference package for reflection in GRPC Python.
Supported Python Versions
-------------------------
Python >= 3.6
Python >= 3.7
Dependencies
------------

@ -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',
]

@ -5,7 +5,7 @@ Reference package for GRPC Python status proto mapping.
Supported Python Versions
-------------------------
Python >= 3.6
Python >= 3.7
Dependencies
------------

@ -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',
]

@ -5,7 +5,7 @@ Testing utilities for gRPC Python
Supported Python Versions
-------------------------
Python >= 3.6
Python >= 3.7
Dependencies
------------

@ -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

@ -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

@ -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
@ -43,3 +44,6 @@ 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

@ -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

@ -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

@ -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

@ -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" ]

@ -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),

Loading…
Cancel
Save