Skip to content

Commit 4cede50

Browse files
authored
Bump the protobuf version to 5.28.2 (#635)
1 parent d869f78 commit 4cede50

File tree

6 files changed

+32
-16
lines changed

6 files changed

+32
-16
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@ See [Changelog](CHANGELOG.md) for recent changes.
1616
Earlier releases might work, but aren't tested
1717

1818
- [protoc >= 23.4](https://github.com/protocolbuffers/protobuf/releases)
19-
- [python-protobuf >= 4.25.3](https://pypi.org/project/protobuf/) - matching protoc release
19+
- [python-protobuf >= 5.28.2](https://pypi.org/project/protobuf/) - matching protoc release
2020
- [python >= 3.8](https://www.python.org/downloads/source/) - for running mypy-protobuf plugin.
2121

2222
## Requirements to run typecheckers on stubs generated by mypy-protobuf
2323

2424
Earlier releases might work, but aren't tested
2525

2626
- [mypy >= v1.11.2](https://pypi.org/project/mypy) or [pyright >= 1.1.383](https://github.com/microsoft/pyright)
27-
- [python-protobuf >= 4.25.3](https://pypi.org/project/protobuf/) - matching protoc release
28-
- [types-protobuf >= 4.24](https://pypi.org/project/types-protobuf/) - for stubs from the google.protobuf library
27+
- [python-protobuf >= 5.28.2](https://pypi.org/project/protobuf/) - matching protoc release
28+
- [types-protobuf >= 5.28](https://pypi.org/project/types-protobuf/) - for stubs from the google.protobuf library
2929

3030
### To run typecheckers on code generated with grpc plugin - you'll additionally need
3131

3232
Earlier releases might work, but aren't tested
3333

34-
- [grpcio>=1.56.2](https://pypi.org/project/grpcio/)
35-
- [grpcio-tools>=1.56.2](https://pypi.org/project/grpcio-tools/)
36-
- [grpc-stubs>=1.53.0.2](https://pypi.org/project/grpc-stubs/)
34+
- [grpcio>=1.66.2](https://pypi.org/project/grpcio/)
35+
- [grpcio-tools>=1.66.2](https://pypi.org/project/grpcio-tools/)
36+
- [grpc-stubs>=1.53.0.5](https://pypi.org/project/grpc-stubs/)
3737

3838
Other configurations may work, but are not continuously tested currently.
3939
We would be open to expanding this list - file an issue on the issue tracker.

mypy_protobuf/extensions_pb2.py

Lines changed: 16 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mypy_protobuf/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,8 @@ def write_grpc_services(
783783
scl_prefix: SourceCodeLocation,
784784
) -> None:
785785
wl = self._write_line
786+
wl("GRPC_GENERATED_VERSION: str")
787+
wl("GRPC_VERSION: str")
786788
for i, service in enumerate(services):
787789
if service.name in PYTHON_RESERVED:
788790
continue

test/generated/testproto/grpc/dummy_pb2_grpc.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Ite
1717
class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg]
1818
...
1919

20+
GRPC_GENERATED_VERSION: str
21+
GRPC_VERSION: str
2022
class DummyServiceStub:
2123
"""DummyService"""
2224

test/generated/testproto/grpc/import_pb2_grpc.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Ite
1818
class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg]
1919
...
2020

21+
GRPC_GENERATED_VERSION: str
22+
GRPC_VERSION: str
2123
class SimpleServiceStub:
2224
"""SimpleService"""
2325

test_requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Requirements to run unit tests. Tests import from
22
# generated code.
3-
protobuf==4.25.3
3+
protobuf==5.28.2
44
pytest==8.1.1
55
pytest-asyncio==0.23.6
6-
grpc-stubs==1.53.0.2
7-
grpcio-tools==1.62.1
8-
types-protobuf==4.24.0.20240311
6+
grpc-stubs==1.53.0.5
7+
grpcio-tools==1.66.2
8+
types-protobuf==5.28.0.20240924

0 commit comments

Comments
 (0)