Skip to content

Conversation

@jrmccluskey
Copy link
Contributor

@jrmccluskey jrmccluskey commented May 19, 2025

Sets a specific dependency boundary for grpcio and grpcio-tools for future Python 3.13 support. Leaves the bounds for current python versions as-is due to the unknown status of grpc/grpc#37710

Part of #34869


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@github-actions
Copy link
Contributor

Assigning reviewers:

R: @shunping for label python.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@damccorm
Copy link
Contributor

cc/ @tvalentyn

# TODO(https://github.com/grpc/grpc/issues/37710): Unpin grpc
'grpcio>=1.33.1,<2,!=1.48.0,!=1.59.*,!=1.60.*,!=1.61.*,!=1.62.0,!=1.62.1,<1.66.0', # pylint: disable=line-too-long
'grpcio>=1.33.1,<2,!=1.48.0,!=1.59.*,!=1.60.*,!=1.61.*,!=1.62.0,!=1.62.1,<1.66.0; python_version <= "3.12"', # pylint: disable=line-too-long
'grpcio>=1.67.0; python_version >= "3.13"',
Copy link
Contributor

Choose a reason for hiding this comment

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

To work around grpc/grpc#39113 , we need to set a variable GRPC_EXPERIMENTS="-event_engine_client" in the container image. However custom container users might not set it and will be affected by the issue. I asked GRPC team on fix ETA on the internal bug. To reduce customer friction, we can add a check to see whether GRPC_EXPERIMENTS has been set and print a warning if it hasn't been set and GRPC version is affected by the regression. Hopefully there will be a fix soon though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay cool, I'll include that in the Dockerfile when I add all of the support changes. Do we know if that environment variable has any impact for GRPC versions < 1.66.0? Conditional environmental variables are not a thing docker likes to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Having followed up in the grpc code base it looks like this experiment has been around a while and may have some sort of impact (specifically on macos environments as stated in grpc/grpc#33279) so I'll have to do some testing around what what does/does not work.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we know if that environment variable has any impact for GRPC versions < 1.66.0? Conditional environmental variables are not a thing docker likes to do.

We can reach out to grpc people; we do control the version of grpc in our containers, so it doesn't need to be conditional.

RUN python -c "" || export might also work if we want to enable it for 3.13 only

Copy link
Collaborator

@shunping shunping left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@jrmccluskey jrmccluskey merged commit f4a0f2b into apache:master May 21, 2025
95 checks passed
changliiu pushed a commit to changliiu/beam that referenced this pull request May 22, 2025
* Update GRPC dependencies for Python 3.13

* change grpcio-tools to be conditional
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.

4 participants