Skip to content

Conversation

@sreenithi
Copy link
Contributor

This PR adds templating for Python versions and updates the maximum supported Python version to 3.13. The following major changes related to templating are added:

  • Minimum supported Python version and list of supported versions in setup.py are fetched using new template generated files called python_version.py
  • Dockerfiles for the different Python Linux builds are now template generated.
  • The "Supported Python Versions" section from READMEs of ancillary and main packages have been removed

Note: All the python_version.py files and Linux build Dockerfiles except tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile in the PR are generated from the respective templates.

Further non-templated additions to add support for Python 3.13:

  • install scripts and artifacts for windows, macos and linux are added manually. Later, these can be templated as well.
  • updated cython bounds to 3.x
  • updated twine version to solve cgi module import error
  • the twine update introduces a dependency on cryptography>=2.0. But the cryptography package doesn't support 32-bit Linux images and hence twine check has been disabled for x86 manylinux and x86 musllinux artifacts.

Closes #37643

PiperOrigin-RevId: 678954495

This PR adds templating for Python versions and updates the maximum supported Python version to 3.13. The following major changes related to templating are added:
 - Minimum supported Python version and list of supported versions in `setup.py` are fetched using new template generated files called `python_version.py`
 - Dockerfiles for the different Python Linux builds are now template generated.
 - The "Supported Python Versions" section from READMEs of ancillary and main packages have been removed

Note: All the `python_version.py` files and Linux build `Dockerfiles` except `tools/dockerfile/grpc_artifact_python_linux_armv7/Dockerfile` in the PR are generated from the respective templates.

Further non-templated additions to add support for Python 3.13:
 - install scripts and artifacts for windows, macos and linux are added manually. Later, these can be templated as well.
 - updated cython bounds to 3.x
 - updated twine version to solve [cgi module import error](pypa/twine#1046)
 - the twine update introduces a dependency on cryptography>=2.0. But the cryptography package doesn't support 32-bit Linux images and hence `twine check` has been disabled for x86 manylinux and x86 musllinux artifacts.

Closes grpc#37643

PiperOrigin-RevId: 678954495
@sreenithi sreenithi added the release notes: yes Indicates if PR needs to be in release notes label Sep 26, 2024
@sreenithi sreenithi changed the title Add templating and support for Python 3.13 (#37643) [Backport] Add templating and support for Python 3.13 (#37643) Sep 26, 2024
@sreenithi sreenithi changed the title [Backport] Add templating and support for Python 3.13 (#37643) [Backport to v1.66.x] Add templating and support for Python 3.13 (#37643) Sep 26, 2024
@gnossen
Copy link
Contributor

gnossen commented Sep 26, 2024

All failures are unrelated. Going ahead and merging.

# NOTE: git>=2.46 allows leading paths like third_party/* to include all subdirectories
# current docker base images use git versions lower than 2.46 and hence require separate configs for each submodule
RUN git config --global --add safe.directory /var/local/jenkins/grpc
RUN git config --global --add safe.directory /var/local/jenkins/grpc/.git
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not an immediate blocker, but please take an action item to remove the explicit enumeration of third-party modules. This is going to make it significantly more difficult to add a third-party module in the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

This change will only be needed on the master branch.

@gnossen gnossen merged commit 4ca1787 into grpc:v1.66.x Sep 26, 2024
62 of 66 checks passed
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