Commit Graph

8 Commits

Author SHA1 Message Date
Xuan Wang c910004328 [Python Stub] Add version check to stubs generated by grpcio_tools (#35906)
The stubs generated by grpcio_tools should always be used with [the same or higher version of grpcio](https://github.com/grpc/grpc/blob/master/tools/distrib/python/grpcio_tools/setup.py#L313), this change will add a run time check for this requirement inside the generated stubs and therefor enforce this requirement.

Please note for now we're just printing a warning for incorrect usage, we'll **change it to an error** soon.

Example warning message:
```
/usr/local/google/home/xuanwn/workspace/misc/grpc/examples/python/helloworld/helloworld_pb2_grpc.py:21: RuntimeWarning: The grpc package installed is at version 1.60.1, but the generated code in helloworld_pb2_grpc.py depends on grpcio>=1.63.0.dev0. Please upgrade your grpc module to grpcio>=1.63.0.dev0 or downgrade your generated code using grpcio-tools<=1.60.1. This warning will become an error in 1.64.0, scheduled for release on May 14,2024.
```
<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #35906

PiperOrigin-RevId: 615659471
2024-03-13 22:47:01 -07:00
Xuan Wang 4bf0109f52 [Python Misc] Use template to generate _parallel_compile_patch.py (#34847)
`_parallel_compile_patch.py` exist in multiple places, we should use template system to generate the content.

<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #34847

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/34847 from XuanWang-Amos:use_template_for__parallel_compile_patch 15b98ea826
PiperOrigin-RevId: 590262888
2023-12-12 11:00:34 -08:00
Richard Belleville 498fc99479
[packaging] Publish xds-protos as part of the standard package pipeline (#33797)
This PR:

- Fixes the xds-protos Python package, which was broken when the `udpa`
submodule was removed
  - This required re-adding the protoc-gen-validate submodule
- Adds non-Bazel tests for xds-protos and all of its dependent packages
- Versions xds-protos the same way as the rest of the Python packages
- Fixes Python 3.11 support in `run_tests.py`, which is necessary for
the testing mentioned above


CC @sergiitk You won't be able to consume this in the interop tests
until it makes it into a release. I'm thinking I'll want to backport
this to the 1.57.x branch to make that happen faster.

CC @drfloob to inform him about the likely backport.
2023-07-25 16:41:02 -07:00
Richard Belleville 010d62175e Pin protobuf version dependency for grpcio-tools 2020-12-04 17:40:31 -08:00
Lidi Zheng 981baff79b Fix the docgen script:
1. Make it use python3 by default;
2. Simplify its arguments.
2020-08-03 11:28:56 -07:00
ncteisen 7a2be20a8a yapf tools/distrib 2017-12-11 16:49:19 -08:00
Jan Tattermusch 4d5c3102a1 fix remaining license notices 2017-06-08 11:22:41 +02:00
Masood Malekghassemi 955887928f Keep grpcio_tools version in sync with rest of project 2016-05-04 15:30:30 -07:00