468 Commits

Author SHA1 Message Date
Michael Lumish
522dbbbb25 [Release] Bump version to 1.79.0-dev (on master branch) (#41291)
Change was **not** created by the release automation script, because it doesn't handle a +2 version bump. See go/grpc-release

Closes #41291

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41291 from murgatroid99:v1.79.0-dev_bump 9a9bf54e5a891459390792dc9d547bdc17b7dd4d
PiperOrigin-RevId: 848168598
2025-12-23 07:26:31 -08:00
Mark D. Roth
0a6901dcd9 [python xDS protos] move to a shallower directory (#41261)
This will avoid exceeding the Windows 150-character path length limit when we upgrade the xDS protos.

Closes #41261

PiperOrigin-RevId: 847800132
2025-12-22 10:00:34 -08:00
Sreenithi Sridharan
5db63228c8 [Python] Disable layering check in grpc_tools:protoc_lib (#41142)
Python Bazel tests have been failing since yesterday after layering check was enabled in grpcio_tools build in commit: 756389e9e7

Temporarily disabling it after discussing IRL with @rishesh007

Closes #41142

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41142 from sreenithi:temp_fix_python_bazel_test 751c420bf3a27066d6cdd912e0e08e9c0acaebb8
PiperOrigin-RevId: 837494537
2025-11-27 05:21:50 -08:00
Rishesh Agarwal
756389e9e7 Adding layering_check and parse_headers in each bazel distrib python build file
PiperOrigin-RevId: 836934818
2025-11-25 21:34:44 -08:00
Nathan Baulch
5dfeafa56c Fix tools typos (#38030)
Continuation of #37541 but focused on tools.

FYI, typos are:
* atifacts
* building
* certern
* commadline
* dependences
* displayes
* docstinrg
* doesn
* faied
* ifle
* manylinx
* onveniently
* passthough
* reqistration
* slighly
* subsituding
* testca
* unices
* uniqifies

Closes #38030

PiperOrigin-RevId: 827772625
2025-11-03 21:11:49 -08:00
Sreenithi Sridharan
17d19bd7cf [Python] Exclude test files in grpcio_tools wheels (#40999)
This PR removes some additional files that were included in the grpcio_tools package wheels after migrating to pyproject.toml build system in #40833

Closes #40999

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40999 from sreenithi:fix_grpc_tools_wheels_2 a261b2160e3ddd34a5c0b74e6d84b2f8c1bda1cd
PiperOrigin-RevId: 827755815
2025-11-03 20:09:57 -08:00
Sreenithi Sridharan
d8698ff717 [Python] Migrate to pyproject.toml build system (#40833)
Fixes #40744.

Closes #40833

PiperOrigin-RevId: 826625632
2025-10-31 14:19:57 -07:00
Sreenithi Sridharan
bca7762d1c [Python] Update setuptools min version to 77.0.1 (#40931)
This PR updates the minimum version of `setuptools` package required across different Python setup files to v77.0.1. This version contains Python 3.14 support as well as deprecates a format for defining project license in `pyproject.toml` files ([Reference](https://setuptools.pypa.io/en/stable/history.html#id71)) which is a prerequisite for #40833

Closes #40931

PiperOrigin-RevId: 823008815
2025-10-23 06:15:35 -07:00
Sergii Tkachenko
14ed0daa6c [Python] Add redirects packages for o11y, fix description spec (#40919)
```console
$ cd tools/distrib/python/grpc_prefixed/dist
$ twine check grpc_observability-1.0.0.tar.gz grpc_csm_observability-1.0.0.tar.gz
Checking grpc_observability-1.0.0.tar.gz: PASSED
Checking grpc_csm_observability-1.0.0.tar.gz: PASSED
$ twine upload grpc_observability-1.0.0.tar.gz grpc_csm_observability-1.0.0.tar.gz
Uploading distributions to https://upload.pypi.org/legacy/
Uploading grpc_observability-1.0.0.tar.gz
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.8/14.8 kB • 00:00 • ?
Uploading grpc_csm_observability-1.0.0.tar.gz
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.9/14.9 kB • 00:00 • ?

View at:
https://pypi.org/project/grpc-csm-observability/1.0.0/
https://pypi.org/project/grpc-observability/1.0.0/
```

https://pypi.org/project/grpc-csm-observability/1.0.0/
https://pypi.org/project/grpc-observability/1.0.0/

Closes #40919

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40919 from sergiitk:py/misc/py-o11y-redirects 85b56288016cc9d8da4f142a4dff6a2af8b321a9
PiperOrigin-RevId: 820958555
2025-10-17 22:43:54 -07:00
Craig Tiller
339906443b [clang-format] Match include file ordering to internal clang-format (#40905)
gRPC is currently getting formatted with two different clang-format implementations, and due to some weirdness they have different include file orderings. This change introduces clang-format configuration to ensure that the two systems align - it's *highly* expected that this will need some maintenance going forward as the two systems evolve.

Closes #40905

PiperOrigin-RevId: 819606209
2025-10-15 00:24:11 -07:00
Sergii Tkachenko
02d82e4094 [Release] Bump version to 1.77.0-dev (on master branch) (#40796)
Change was created by the release automation script. See go/grpc-release.

Closes #40796

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40796 from sergiitk:bump_dev_version_202509291139 e7aa910253d1706a72822da986b8b8e7bc87931d
PiperOrigin-RevId: 812961524
2025-09-29 15:16:18 -07:00
Sreenithi Sridharan
ee5325b9f1 [Python][Support 3.14] Enable 3.14 in Python Basic, Bazel and Distrib tests (#40403)
This PR enables Python 3.14 in all the different tests - Basic tests (Native Python tests), Bazel tests and Distrib tests to build Python 3.14 artifacts. In addition, it also updates all the public facing METADATA versions.

## Distribtests
Required pre-requisite changes to enable 3.14 artifacts are covered in #40289 .

## Bazel tests
Enabling Python 3.14 required updating the rules_python version to a more recent version that supports 3.14. This was done in #40602

## Basic tests
The following errors were caught by the Basic tests when running via Python 3.14 and resolved in this PR:

### 1) No running event loop for AsyncIO when run outside an async function
```
Traceback (most recent call last):
  File "src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi", line 184, in grpc._cython.cygrpc.get_working_loop
RuntimeError: no running event loop
```
This was caught by the `tests_aio.unit.outside_init_test.TestOutsideInit` and `tests_aio.unit.init_test.TestInit` tests, and was also previously reported in #39507 with the root cause.

Following some investigation, the fix is being worked on by @sergiitk  in PR #40293. In order to parallelize the fix and this PR, these 2 tests are currently being skipped for Python 3.14 and above.

### 2) Pickling error from the `multiprocessing` library
```
_pickle.PicklingError: Can't pickle <function _test_well_known_types at 0x7f3937eee610>: it's not the same object as tests.unit._dynamic_stubs_test._test_well_known_types
when serializing dict item '_target'
when serializing multiprocessing.context.Process state
when serializing multiprocessing.context.Process object
```
This was caught by the `tests.unit._dynamic_stubs_test.DynamicStubTest` which runs test cases in a subprocess using the `multiprocessing` library.
Error root cause:
- The default start method of multiprocessing in linux has changed to `forkserver` instead of `fork` from Python 3.14.
- `forkserver` has a few extra restrictions for picklability as compared to `fork` (Ref: [Python Docs](https://docs.python.org/3.14/library/multiprocessing.html#the-spawn-and-forkserver-start-methods))
- All the [test case functions](0243842d5d/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py (L115)) in the DynamicStubTest that are provided as `target` to the `multiprocessing.Process` use decorators. This causes problems when pickling them.

Hence to resolve this, we manually set the 'start method' of `multiprocessing` to use the `fork` start method.

Closes #40403

PiperOrigin-RevId: 804290760
2025-09-07 23:58:12 -07:00
Sergii Tkachenko
957c045d9a [Python] xds-protos: sync required grpcio version with gRPC gencode (#40521)
A follow up on #40518, which regenerated xds-protos with protobuf 6.x.

Since PR #40518, xds-protos grpc gencode contains a poison pill that enforces grpcio runtime version to be equal or greater to the grpcio-tools version that generated the code.

This PR:
- Locks xds-protos grpcio dependencies to the same version as specified in generate_projects.sh
- Documents the need to keep these in sync

Closes #40521

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40521 from sergiitk:py/xds-protos/requirements 794fb65f2989da4f8afcc201fa6ac542db775df3
PiperOrigin-RevId: 800547324
2025-08-28 11:37:09 -07:00
apolcyn
73c0f8ac9c [release] Bump dev version on to 1.76.0-dev (#40484)
As title

Closes #40484

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40484 from apolcyn:bump_dev_version_202508191952 e788be57e9dc7f5e8316bee4baadec26fba3f6e6
PiperOrigin-RevId: 798331971
2025-08-22 14:01:19 -07:00
Mark D. Roth
f0d0435993 [sanity] fix on master (#40518)
Closes #40518

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40518 from markdroth:sanity_fix a1d6d2aacc71474f6017e1aa245b4bbcca4d39eb
PiperOrigin-RevId: 797870628
2025-08-21 12:36:05 -07:00
Ashesh Vidyut
c8b6203b57 [Python] Fixes issue 40325 (#40347)
### Description

Fixes https://github.com/grpc/grpc/issues/40325

Closes #40347

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40347 from asheshvidyut:fix/issue-40325 4a22fb412c02e2e9821e58dbd288d7f441059625
PiperOrigin-RevId: 788705992
2025-07-29 19:29:31 -07:00
Sergii Tkachenko
6c7e2a94f9 [Python] Fix bazel tests compatibility with python 3.11 (#40273)
Fix python import paths in bazel tests:
- `//tools/distrib/python/grpcio_tools/grpc_tools/test:protoc_test`
- `//examples/python/cancellation:test/_cancellation_example_test`
- `//examples/python/compression:test/compression_example_test`

Previously paths were set incorrectly. With bazel + python 3.11, this resulted in the following errors:

<details>
<summary>error examples for posterity</summary>

#### `//tools/distrib/python/grpcio_tools/grpc_tools/test:protoc_test`
```
Traceback (most recent call last):
  File "/root/.cache/bazel/_bazel_root/954bb7512d44d20015390af6e76121c6/sandbox/processwrapper-sandbox/3073/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/tools/distrib/python/grpcio_tools/grpc_tools/test/protoc_test.runfiles/com_github_grpc_grpc/tools/distrib/python/grpcio_tools/grpc_tools/test/protoc_test.py", line 141, in _test_syntax_errors
    protos = protoc._protos("flawed.proto")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/bazel/_bazel_root/954bb7512d44d20015390af6e76121c6/sandbox/processwrapper-sandbox/3073/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/tools/distrib/python/grpcio_tools/grpc_tools/test/protoc_test.runfiles/com_github_grpc_grpc/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py", line 110, in _protos
    module = importlib.import_module(module_name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "", line 1204, in _gcd_import
  File "", line 1176, in _find_and_load
  File "", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'flawed_pb2'

Traceback (most recent call last):
  File "/root/.cache/bazel/_bazel_root/954bb7512d44d20015390af6e76121c6/sandbox/processwrapper-sandbox/3073/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/tools/distrib/python/grpcio_tools/grpc_tools/test/protoc_test.runfiles/com_github_grpc_grpc/tools/distrib/python/grpcio_tools/grpc_tools/test/protoc_test.py", line 168, in test_combined_import
    _run_in_subprocess(_test_combined_import)
  File "/root/.cache/bazel/_bazel_root/954bb7512d44d20015390af6e76121c6/sandbox/processwrapper-sandbox/3073/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/tools/distrib/python/grpcio_tools/grpc_tools/test/protoc_test.runfiles/com_github_grpc_grpc/tools/distrib/python/grpcio_tools/grpc_tools/test/protoc_test.py", line 48, in _run_in_subprocess
    raise error_queue.get()
ModuleNotFoundError: No module named 'simple_pb2'
```

#### `//examples/python/cancellation:test/_cancellation_example_test`
```
test_graceful_sigint (__main__.CancellationExampleTest.test_graceful_sigint) ... Traceback (most recent call last):
  File "/root/.cache/bazel/_bazel_root/954bb7512d44d20015390af6e76121c6/sandbox/processwrapper-sandbox/3027/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/examples/python/cancellation/test/_cancellation_example_test.runfiles/com_github_grpc_grpc/examples/python/cancellation/server.py", line 26, in
    import search
ModuleNotFoundError: No module named 'search'
```

#### `//examples/python/compression:test/compression_example_test`
```
test_compression_example (__main__.CompressionExampleTest.test_compression_example) ... Traceback (most recent call last):
  File "/root/.cache/bazel/_bazel_root/954bb7512d44d20015390af6e76121c6/sandbox/processwrapper-sandbox/2906/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/examples/python/compression/test/compression_example_test.runfiles/com_github_grpc_grpc/examples/python/compression/client.py", line 24, in
    import helloworld_pb2
ModuleNotFoundError: No module named 'helloworld_pb2'
Traceback (most recent call last):
  File "/root/.cache/bazel/_bazel_root/954bb7512d44d20015390af6e76121c6/sandbox/processwrapper-sandbox/2906/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/examples/python/compression/test/compression_example_test.runfiles/com_github_grpc_grpc/examples/python/compression/server.py", line 26, in
    import helloworld_pb2
ModuleNotFoundError: No module named 'helloworld_pb2'
FAIL

======================================================================
FAIL: test_compression_example (__main__.CompressionExampleTest.test_compression_example)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/.cache/bazel/_bazel_root/954bb7512d44d20015390af6e76121c6/sandbox/processwrapper-sandbox/2906/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/examples/python/compression/test/compression_example_test.runfiles/com_github_grpc_grpc/examples/python/compression/test/compression_example_test.py", line 68, in test_compression_example
    self.assertEqual(0, client_return_code)
AssertionError: 0 != 1
```
</details>

The main difference is as of Python 3.11 bazel no longer appends the directory of the file to the sys.path. For example, compression test sys.path:

1. Contains `examples/python/compression/test` in 3.10
2. Doesn't contain `examples/python/compression/test` in 3.11

Closes #40273

PiperOrigin-RevId: 786308459
2025-07-23 09:21:50 -07:00
Sergii Tkachenko
1f0784936d [Python] Make protoc_test work python > 3.7 on macos, windows (#40253)
In Python 3.8, multiprocessing module changed the default fork method from `fork` to `spawn`:

> On macOS, the spawn start method is now used by default.
> — https://docs.python.org/3/whatsnew/3.8.html#multiprocessing

Spawn method uses pickling to pass the target method to the fork. Pickling is only supported for top-level defined methods. This PR changes the test wrapper to use an annotation to collect test result instead of `_wrap_in_subprocess`, therefore making the method picklable by keeping the method definition at the top level. Similar to 9772d15077/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py (L47).

Steps to reproduce:
```console
$ sw_vers
ProductName:		macOS
ProductVersion:		15.5
BuildVersion:		24F74
$ cd tools/distrib/python/grpcio_tools/grpc_tools/test/
$ python3.9 -m venv --upgrade-deps .venv
$ source .venv/bin/activate
$ pip install grpcio grpcio-tools
$ python protoc_test.py
```

Before:
```console
$ python protoc_test.py
EEEEEEE
======================================================================
ERROR: test_combined_import (__main__.ProtocTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/sergiitk/Development/grpc/tools/distrib/python/grpcio_tools/grpc_tools/test/protoc_test.py", line 168, in test_combined_import
    _run_in_subprocess(_test_combined_import)
  File "/Users/sergiitk/Development/grpc/tools/distrib/python/grpcio_tools/grpc_tools/test/protoc_test.py", line 45, in _run_in_subprocess
    proc.start()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
    return Popen(process_obj)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 47, in _launch
    reduction.dump(process_obj, fp)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <function _test_combined_import at 0x10c2a0f70>: it's not the same object as __main__._test_combined_import
...
```

After
```console
$ python protoc_test.py
.......
----------------------------------------------------------------------
Ran 7 tests in 2.568s

OK
```

Closes #40253

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40253 from sergiitk:fix/macos/protoc_test 658fbecbbe3eca41249034819a2ae1a5a5c1e776
PiperOrigin-RevId: 786101961
2025-07-22 20:04:19 -07:00
Alexander Polcyn
26048ddc59 Don't shutdown fds in c-ares resolver until all requests are complete
This is a bug fix intended to unblock c-ares 1.34.5 upgrade: https://github.com/grpc/grpc/pull/39508

The bug can be seen by running any of the iomgr c-ares resolver `resolver_component_tests_runner_invoker`: //test/cpp/naming:resolver_component_tests_runner_invoker@experiment=no_event_engine_dns

In the general case, bug works like this:

1) c-ares initiates A and AAAA queries
2) c-ares opens fd 1 to some server that act as a black hole
3) query to server 1 times out and so c-ares opens fd 2 to query a new server b/c old one is not responding

c-ares 1.34.5 will internally increment a `consec_failures` field on the connection object when queries on fd 1 time out (see d3a507e920/src/lib/ares_process.c (L670))

4) answer to one of the queries comes in on fd 2

After processing the answer, c-ares [checks for connections to close out](d3a507e920/src/lib/ares_process.c (L233)) and closes connections that have `consec_failures > 0`, see d3a507e920/src/lib/ares_close_sockets.c (L119)

5) Now, c-ares will not indicate any interest in fd 1 from `ares_getsock` APIs

So, we'll now shutdown fd 1 which can have the effect of prematurely cancelling the overall request (see 06de3cc2ec/src/core/lib/event_engine/ares_resolver.cc (L590)) depending on ordering of events (reading another query's answer on fd 2 vs. when we run on_readable callback following shutdown of fd 1)

I guess this was not an issue before c-ares 1.34.5 b/c earlier c-ares did not have `consec_failures` tracking and so did not close sockets that had timed out earlier, after processing answers that came in on new fds, see 6360e96b5c/src/lib/ares_process.c (L1528)

---

Note: EE c-ares resolver does not have this early-cancellation issue b/c it shuts down no-longer-interesting fds with an OK status: 79769b35d0/src/core/lib/event_engine/ares_resolver.cc (L547)
PiperOrigin-RevId: 783612611
2025-07-15 22:52:29 -07:00
Arthit Suriyawongkul
32cb614277 [Python] Remove outdated python version note from grpcio-tools README (#39313)
Change the gRPC Python Tools supported versions to match ones in
tools/distrib/python/grpcio_tools/python_version.py

Also update "Mac OS X" name to "macOS" as it is currently used by Apple.

---------

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
2025-07-15 21:57:16 -07:00
Esun Kim
58022c65ff [Release] Bump version to 1.75.0-dev (on master branch) (#40120)
Change was created by the release automation script. See go/grpc-release.

Closes #40120

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40120 from veblush:bump_dev_version_202507041728 e403e80e566f334809e93e421d552d0b99076f68
PiperOrigin-RevId: 779336318
2025-07-04 18:59:21 -07:00
Yash Tibrewal
2a5597f87f [deps] Update absl to 20250512.1 (#39571)
Update absl dependency to https://github.com/abseil/abseil-cpp/releases/tag/20250512.1

As part of this upgrade, remove gRPC's usage of internal absl helper functions.
A similar fix is needed for OpenCensus-Cpp, but since that repo is archived, I am choosing to add in a patch. The aim is to delete our OpenCensus plugin so that we don't have to maintain this forever as per https://github.com/grpc/proposal/pull/496.

Closes #39571

PiperOrigin-RevId: 777770232
2025-06-30 16:46:51 -07:00
Ashesh Vidyut
28e36d4b37 [dep] Upgrade Protobuf Version 31.1 (#39916)
Fixes - https://github.com/grpc/grpc/issues/39836 and https://github.com/grpc/grpc/issues/39912

## Description

Upgrade Protobuf Version to `31.1`.

## Testing

CI

Closes #39916

PiperOrigin-RevId: 775972589
2025-06-25 21:53:01 -07:00
Ashesh Vidyut
3df733d7fd Fix protobuf failure (#39907)
## Description
Fixes failing `prod:grpc/core/master/linux/grpc_build_protobuf_at_head`

# Testing
Sucessfull run on fusion - https://fusion2.corp.google.com/ci/kokoro/prod:grpc%2Fcore%2Fmaster%2Flinux%2Fgrpc_build_protobuf_at_head/activity/889e2ee8-c5f4-4b12-8486-b17c0e0c3426/details

on commit sha from github - 477d40e38475b976c0492505362ea37a198b0732

Closes #39907

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39907 from asheshvidyut:fix-protobuff-failure 477d40e38475b976c0492505362ea37a198b0732
PiperOrigin-RevId: 773293898
2025-06-19 04:16:39 -07:00
Yash Tibrewal
0e54ed66b5 [Release] Bump version to 1.74.0-dev (on master branch) (#39614)
Change was created by the release automation script. See go/grpc-release.

Closes #39614

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39614 from yashykt:bump_dev_version_202505211516 89b3566bfa45e56bc555a70f9a61832ba26274d5
PiperOrigin-RevId: 762218178
2025-05-22 19:15:53 -07:00
Esun Kim
81356d4ca3 [Dep] Update Protobuf to v31.0 (#39392)
<!--

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 #39392

PiperOrigin-RevId: 758868130
2025-05-14 16:01:05 -07:00
Esun Kim
b98b101153 [Deps] Updated abseil to 20250127.1 (#38664)
Closes #38664

PiperOrigin-RevId: 755978662
2025-05-07 13:19:40 -07:00
Craig Tiller
3afc5d692a [build] Convert more templates to inja (#39304)
This should complete the templates that /do not/ have embedded Python

Closes #39304

PiperOrigin-RevId: 750384033
2025-04-22 17:33:19 -07:00
Anthonios Partheniou
38a825f53e fix: resolve issue where pre-release versions of protobuf are installed (#38986)
Remove `dev` from `setup.py` to avoid installing pre-release versions of dependency `protobuf`. See https://github.com/googleapis/google-cloud-python/issues/13585 for more information.

If possible, we should back port this fix to active release branches.

https://github.com/pypa/pip/blob/main/NEWS.rst#2501-2025-02-09

![image](https://github.com/user-attachments/assets/bd031558-6066-40f3-b0e6-ad5398ab5472)

Closes #38986

PiperOrigin-RevId: 748592011
2025-04-17 01:40:22 -07:00
Ilya Priven
caed22c8df grpcio-tools: add script (#39090)
This change adds a "python-grpcio-tools-protoc" script. This complements the current way of invoking this tool, `python -m grpcio-tools.protoc`, with a CLI tool.

The main motivation is to be able to run it through [pipx](https://github.com/pypa/pipx).

Currently,
```sh
$ pipx run --spec grpcio-tools
'grpcio-tools' executable script not found in package 'grpcio-tools'.
Available executable scripts:
```

Closes #39090

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39090 from ikonst:patch-1 dbcfd8e9a626861fc50b9b7245d0dd11e3442e6f
PiperOrigin-RevId: 748390971
2025-04-16 12:52:08 -07:00
Xuan Wang
267a27ceab [Release] Bump version to 1.73.0-dev (on master branch) (#39161)
Change was created by the release automation script. See go/grpc-release.

Closes #39161

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39161 from XuanWang-Amos:bump_dev_version_202504041546 b481e8b65b4bd8fd25d4c966eb1e13c4798f2e43
PiperOrigin-RevId: 744818540
2025-04-07 12:50:04 -07:00
Esun Kim
5a18d66e23 [Deps] Updated Protobuf to v30 (#38725)
This PR upgrading Protobuf from v29 to v30 is mostly done mechanically except
- `-Wno-format-nonliteral` and `-Wno-language-extension-token` are added to the Windows Clang test
- `[ABSL|protobuf]_MSVC_STATIC_RUNTIME=ON` is added to `tools/run_tests/artifacts/build_artifact_protoc.bat` (Technically this is to fix the broken test on master)

Closes #38725

PiperOrigin-RevId: 734204682
2025-03-06 10:49:50 -08:00
Esun Kim
f122d24844 [Apple] Bump the minimum iOS to 15.0 & OSX to 11.0 (#38876)
This is aligned with
- https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md
- Upcoming Protobuf v30 (9f1b38e8a1)

Closes #38876

PiperOrigin-RevId: 731889588
2025-02-27 15:33:34 -08:00
Eugene Ostroukhov
54d338e159 Bump dev version 202502191432 (#38787)
Closes #38787

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38787 from eugeneo:bump_dev_version_202502191432 d26c8d5062a4455499c26590c86e9f82cf510841
PiperOrigin-RevId: 728854026
2025-02-19 16:10:09 -08:00
Esun Kim
55cf79cc4b [CI] Drop Python 3.8 (#38747)
Removed Python 3.8 builds and tests, to be aligned with [the  Foundational Python Support](e1ee4cc2cf/foundational-python-support-matrix.md (L6)).

Closes #38747

PiperOrigin-RevId: 727070251
2025-02-14 14:47:26 -08:00
Esun Kim
db53a45e2b [Deps] Removed vendored python deps from Bazel builds (#38716)
Roll-forward of https://github.com/grpc/grpc/pull/38692

Closes #38716

PiperOrigin-RevId: 725813827
2025-02-11 16:28:07 -08:00
Esun Kim
16715aab00 [Deps] Revert "Removed vendored python deps from Bazel builds (#38692)" (#38705)
This reverts commit 68b5dc5125 (https://github.com/grpc/grpc/pull/38692).

Copybara missed the load statement, which shouldn't happen, causing many build failures on master.

Closes #38705

PiperOrigin-RevId: 724474971
2025-02-07 14:40:40 -08:00
Esun Kim
68b5dc5125 [Deps] Removed vendored python deps from Bazel builds (#38692)
With the Bazel build transitioning to BzlMod, all vendored Bazel Python targets must be removed.  These targets are not available in the BCR and need be managed via a pip `requirements.bazel.txt` file. gRPC already uses this approach, so it is going to be extended to include those target. (e.g. see [test utils](e06ad82c3f/test/cpp/naming/utils/BUILD (L27-L45)) to understand how those targets are used)

Additionally, the generation of the `requirements.bazel.lock` file has been improved.  Because this file is a lock file, including all transitive dependencies, manual maintenance is not managable.  Its new source file, `requirements.bazel.txt` is created to list only the direct dependencies used by gRPC, along with instructions for generating the full lock file.  This source file omits specific version requirements to use the latest available versions, but version constraints can be added as needed.

Closes #38692

PiperOrigin-RevId: 724427578
2025-02-07 12:10:20 -08:00
Esun Kim
d1bf8d5296 [Dep] Updated envoy-api to 0.0.0-20250128-4de3c74 (#38618)
This is the [latest version ](4de3c74cf2) of envoy-API and made both bazel workspace and bzlmod use the same version.

Closes #38618

PiperOrigin-RevId: 721076378
2025-01-29 12:51:06 -08:00
Riccardo Magliocchetti
d97c28f3dd [Python] Support musl-linux binary wheels on arm64 (#38223)
This is a rebase of https://github.com/grpc/grpc/pull/32941 to fix conflicts and align to what changed in the meantime.

I'm very confused on how the tooling works here:
- no idea how to generate `tools/dockerfile/grpc_artifact_python_musllinux_1_1_aarch64/Dockerfile` so I copied the x64 one and update accordingly
- `tools/dockerfile/grpc_artifact_python_musllinux_1_1_aarch64.current_version` and `tools/dockerfile/distribtest/python_alpine_aarch64.current_version` need to be refreshed

<!--

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 #38223

PiperOrigin-RevId: 720993782
2025-01-29 08:51:27 -08:00
Esun Kim
4b2fbd834c [CI] Updated Buildtools to 8.0.0 (#38446)
- Updated Buildtools to 8.0.0
- Replaced `native.cc_proto_library` with the ones from `com_google_protobuf`.  (Automatically fixed by the buildifier)

Closes #38446

PiperOrigin-RevId: 716355135
2025-01-16 13:24:15 -08:00
Esun Kim
ea16833187 [C++] Fix python build script to handle C and C++ std options properly for MSVC (#38410)
This PR makes necessary changes to Python build scripts for C++17 support, which were missed in #37919

- Fixed handling of C and C++ standard options for MSVC.
  - Previously, a workaround relied on a specific method, `_compiler` found in the compiler class. [unixcompiler](ff11eed0c3/distutils/unixccompiler.py (L191)) has it but [msvccompiler](ff11eed0c3/distutils/_msvccompiler.py (L367)) doesn't. Therefore this won't work for MSVC even though it's supposed to work across all compilers.
  - To resolve this, a new workaround has been implemented. This involves adding logic directly into the `_commandfile_spawn` function, which is considered the most suitable location for this fix. Although not ideal, this ensures that C and C++ standard options are managed correctly for MSVC.
- Removed `compiler_ok_with_extra_std function` as isolating C and C++ standard options is always recommended.
- Updated comments to correctly refer to C++17.

Closes #38410

PiperOrigin-RevId: 713442384
2025-01-08 15:48:59 -08:00
Esun Kim
19cfe776b4 [CI] Updated Buildtools to 7.3.1 (#38397)
This is a prerequisite to getting a upcoming buildifier release.

Closes #38397

PiperOrigin-RevId: 713341592
2025-01-08 10:42:49 -08:00
Stanley Cheung
80f339642f [Release] Bump version to 1.71.0-dev (on master branch) (#38406)
Change was created by the release automation script. See go/grpc-release.

Closes #38406

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38406 from stanley-cheung:bump_dev_version_202501080434 a3b2a3f2d996eb2dcf210c8fb03006d28223c4a9
PiperOrigin-RevId: 713317017
2025-01-08 09:29:09 -08:00
Mark D. Roth
ea7b8bf69f [xDS] update xDS protos (#38385)
Closes #38385

PiperOrigin-RevId: 712628592
2025-01-06 12:56:20 -08:00
Mark D. Roth
ae9b21619c [xDS] update to the latest xDS protos (#38379)
Closes #38379

PiperOrigin-RevId: 711859212
2025-01-03 14:47:13 -08:00
Esun Kim
93b29607cc [C++] Transition to C++17 (#37919)
This bumps the minimum version of C++ to 17 from 14 per https://github.com/grpc/proposal/blob/master/L120-requiring-cpp17.md

Changes:
- Used C++17 instead of C++14 when building gRPC.
- Disabled `modernize-unary-static-assert` clang-tidy rule for the smooth transition. This rule will be re-enabled in a future update, along with a fix to address any identified issues.
- Added a post-install script for XCode/Cocoapod examples to enforce the use of C++17 across all projects, preventing build errors. (I'd like to have a better solution here but couldn't find it)

Closes #37919

PiperOrigin-RevId: 709073401
2024-12-23 08:53:24 -08:00
Mark D. Roth
cde3276637 [release] Bump dev version on master to 1.70.0-dev (#38236)
Closes #38236

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38236 from markdroth:bump_dev_version_202412051835 49da946106ec40cc3be8ff140139adcbbfc2c8af
PiperOrigin-RevId: 703202870
2024-12-05 12:16:34 -08:00
Esun Kim
7819891fab [Deps] Updated protobuf to v29 (#38066)
Upgraded Protobuf from v28 to v29. This PR doesn't have anything special other than regular changes needed.

Closes #38066

PiperOrigin-RevId: 702136117
2024-12-02 17:29:03 -08:00
Nathan Baulch
8342a109ae Fix python typos (#38029)
Continuation of #37541 but focused on Python.

Top typos are:
* resolveable (5)
* dedecated (4)
* everyting (4)
* programatically (3)
* supercede (3)
* wil (3)
* acknowledgment (2)
* corutine (2)
* coversion (2)
* operaton (2)
* wich (2)

Closes #38029

PiperOrigin-RevId: 695759207
2024-11-12 09:15:38 -08:00