Skip to content

[CI] Use python 3.9+ everywhere#40139

Closed
sergiitk wants to merge 8 commits intogrpc:masterfrom
sergiitk:feat/py39/grpc_python_bazel_test
Closed

[CI] Use python 3.9+ everywhere#40139
sergiitk wants to merge 8 commits intogrpc:masterfrom
sergiitk:feat/py39/grpc_python_bazel_test

Conversation

@sergiitk
Copy link
Member

@sergiitk sergiitk commented Jul 8, 2025

  • Upgrade the base image of us-docker.pkg.dev/grpc-testing/testing-images-public/bazel to a newer gcr.io/oss-fuzz-base/base-builder, which comes with python3.11.
    Before:
    Python 3.8.3 (default, Mar 12 2024, 03:21:22)
    [Clang 15.0.0 (https://github.com/llvm/llvm-project.git bf7f8d6fa6f460bf0a16ffe
    
    After:
    Python 3.11.13 (main, Jul 16 2025, 03:42:11)
    [Clang 18.1.8 (https://github.com/llvm/llvm-project.git 3b5b5c1ec4a3095ab096dd78
    
  • Refactor and improve us-docker.pkg.dev/grpc-testing/testing-images-public/sanity. Removed the step to build python 3.7 from source.
  • Switch Windows builds from 3.8.10 to 3.9.13.
  • Changed minimum python version in bazel builds from 3.8 to 3.9.
  • Updated pylint to use 3.11.
  • Various minor compatibility fixes.

There's a few other dependencies/settings that can be upgraded now that we're using 3.9+. I'll make them in a follow-up PR.

@sergiitk sergiitk self-assigned this Jul 8, 2025
@sergiitk sergiitk added release notes: no Indicates if PR should not be in release notes release notes: yes Indicates if PR needs to be in release notes area/infra and removed area/infra release notes: no Indicates if PR should not be in release notes release notes: yes Indicates if PR needs to be in release notes labels Jul 8, 2025
@sergiitk sergiitk added release notes: no Indicates if PR should not be in release notes and removed release notes: yes Indicates if PR needs to be in release notes labels Jul 8, 2025
@sergiitk sergiitk force-pushed the feat/py39/grpc_python_bazel_test branch from cc73f49 to 6672522 Compare July 11, 2025 10:20
copybara-service bot pushed a commit that referenced this pull request Jul 14, 2025
In preparation for migrating it from python3.7 to python3.11.
Pylint version had to be upgraded because pylint==2.2.2 doesn't support python 3.11.

The image will be updated separately to remove compiling python3.7 from source in #40139.

Pylint v2.17.7 docs: https://pylint.readthedocs.io/en/v2.17.7

Closes #40169

PiperOrigin-RevId: 783026287
@sergiitk sergiitk changed the title [CI] bump bazel and set min python to 3.9 [CI] Use python 3.9+ everywhere Jul 16, 2025
@sergiitk sergiitk force-pushed the feat/py39/grpc_python_bazel_test branch 2 times, most recently from ad8bbc1 to b6b1862 Compare July 16, 2025 18:26
sergiitk added a commit that referenced this pull request Jul 22, 2025
Previously broken by requiring black version that dropped py3.8 support.
Gitignore/dockerignore changes made to prevent ruff checking virtualenv
directories.

Related:
- #40256 
- #40139
@sergiitk sergiitk force-pushed the feat/py39/grpc_python_bazel_test branch from b6b1862 to 145b733 Compare July 23, 2025 18:31
@sergiitk sergiitk requested a review from asheshvidyut July 24, 2025 02:08
@sergiitk sergiitk marked this pull request as ready for review July 24, 2025 02:08
@sergiitk sergiitk requested review from apolcyn and drfloob as code owners July 24, 2025 02:08
@sergiitk
Copy link
Member Author

cc @eugeneo

Copy link
Member

@asheshvidyut asheshvidyut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks LGTM 👍

@sergiitk sergiitk deleted the feat/py39/grpc_python_bazel_test branch July 24, 2025 18:44
asheshvidyut pushed a commit to asheshvidyut/grpc that referenced this pull request Jul 28, 2025
Previously broken by requiring black version that dropped py3.8 support.
Gitignore/dockerignore changes made to prevent ruff checking virtualenv
directories.

Related:
- grpc#40256 
- grpc#40139
asheshvidyut pushed a commit to asheshvidyut/grpc that referenced this pull request Jul 28, 2025
- Upgrade the base image of  https://us-docker.pkg.dev/grpc-testing/testing-images-public/bazel to newer https://gcr.io/oss-fuzz-base/base-builder@sha256:4f3ca10accd14292556601d70e457fa85ad57180c913484427869d3379a07684, which comes with python3.11

  Before:
  ```

  Python 3.8.3 (default, Mar 12 2024, 03:21:22)
  [Clang 15.0.0 (https://github.com/llvm/llvm-project.git bf7f8d6fa6f460bf0a16ffe
  ```

  After:
  ```
  Python 3.11.13 (main, Jul 16 2025, 03:42:11)
  [Clang 18.1.8 (https://github.com/llvm/llvm-project.git 3b5b5c1ec4a3095ab096dd78
  ```
- Refactor and improve  https://us-docker.pkg.dev/grpc-testing/testing-images-public/sanity. Removed building python 3.7 from source.
- Switch Windows builds to use `3.9.13` (previously `3.8.10`)
- Changed minimum python version in bazel builds from 3.8 to 3.9.
- Updated pylint to use python3.11.
- Various minor compatibility fixes.

There's a few other dependencies/settings that can be upgraded now that we're using 3.9+. I'll make them in a follow-up PR.

Closes grpc#40139

PiperOrigin-RevId: 786775922
paulosjca pushed a commit to paulosjca/grpc that referenced this pull request Aug 23, 2025
In preparation for migrating it from python3.7 to python3.11.
Pylint version had to be upgraded because pylint==2.2.2 doesn't support python 3.11.

The image will be updated separately to remove compiling python3.7 from source in grpc#40139.

Pylint v2.17.7 docs: https://pylint.readthedocs.io/en/v2.17.7

Closes grpc#40169

PiperOrigin-RevId: 783026287
paulosjca pushed a commit to paulosjca/grpc that referenced this pull request Aug 23, 2025
Previously broken by requiring black version that dropped py3.8 support.
Gitignore/dockerignore changes made to prevent ruff checking virtualenv
directories.

Related:
- grpc#40256 
- grpc#40139
paulosjca pushed a commit to paulosjca/grpc that referenced this pull request Aug 23, 2025
- Upgrade the base image of  https://us-docker.pkg.dev/grpc-testing/testing-images-public/bazel to newer https://gcr.io/oss-fuzz-base/base-builder@sha256:4f3ca10accd14292556601d70e457fa85ad57180c913484427869d3379a07684, which comes with python3.11

  Before:
  ```

  Python 3.8.3 (default, Mar 12 2024, 03:21:22)
  [Clang 15.0.0 (https://github.com/llvm/llvm-project.git bf7f8d6fa6f460bf0a16ffe
  ```

  After:
  ```
  Python 3.11.13 (main, Jul 16 2025, 03:42:11)
  [Clang 18.1.8 (https://github.com/llvm/llvm-project.git 3b5b5c1ec4a3095ab096dd78
  ```
- Refactor and improve  https://us-docker.pkg.dev/grpc-testing/testing-images-public/sanity. Removed building python 3.7 from source.
- Switch Windows builds to use `3.9.13` (previously `3.8.10`)
- Changed minimum python version in bazel builds from 3.8 to 3.9.
- Updated pylint to use python3.11.
- Various minor compatibility fixes.

There's a few other dependencies/settings that can be upgraded now that we're using 3.9+. I'll make them in a follow-up PR.

Closes grpc#40139

PiperOrigin-RevId: 786775922
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants