Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump protobuf to 5.28.* #12689

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ruff==0.5.4 # must match .pre-commit-config.yaml
aiohttp==3.10.2
# grpc install only fails on Windows, but let's avoid building sdist on other platforms
# https://github.com/grpc/grpc/issues/36201
grpcio-tools; python_version < "3.13"
grpcio-tools; python_version < "3.13" # For grpc_tools.protoc
mypy-protobuf==3.6.0
packaging==24.1
pathspec>=0.11.1
Expand Down
2 changes: 1 addition & 1 deletion scripts/sync_protobuf/google_protobuf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# Whenever you update PACKAGE_VERSION here, version should be updated
# in stubs/protobuf/METADATA.toml and vice-versa.
PACKAGE_VERSION = "27.1"
PACKAGE_VERSION = "28.2"

STUBS_FOLDER = REPO_ROOT / "stubs" / "protobuf"
ARCHIVE_FILENAME = f"protobuf-{PACKAGE_VERSION}.zip"
Expand Down
4 changes: 2 additions & 2 deletions stubs/protobuf/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Whenever you update version here, PACKAGE_VERSION should be updated
# in scripts/sync_proto/google_protobuf.py and vice-versa.
version = "5.27.*"
version = "5.28.*"
upstream_repository = "https://github.com/protocolbuffers/protobuf"
extra_description = "Partially generated using [mypy-protobuf==3.6.0](https://github.com/nipunn1313/mypy-protobuf/tree/v3.6.0) and libprotoc 26.1 on [protobuf v27.1](https://github.com/protocolbuffers/protobuf/releases/tag/v27.1) (python `protobuf==5.27.1`)."
extra_description = "Partially generated using [mypy-protobuf==3.6.0](https://github.com/nipunn1313/mypy-protobuf/tree/v3.6.0) and libprotoc 26.1 on [protobuf v28.2](https://github.com/protocolbuffers/protobuf/releases/tag/v28.2) (python `protobuf==5.28.2`)."
partial_stub = true

[tool.stubtest]
Expand Down
7 changes: 4 additions & 3 deletions stubs/protobuf/google/protobuf/descriptor_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1304,12 +1304,13 @@ class FieldOptions(google.protobuf.message.Message):
FEATURE_SUPPORT_FIELD_NUMBER: builtins.int
UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
ctype: global___FieldOptions.CType.ValueType
"""The ctype option instructs the C++ code generator to use a different
"""NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
The ctype option instructs the C++ code generator to use a different
representation of the field than it normally would. See the specific
options below. This option is only implemented to support use of
[ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
type "bytes" in the open source release -- sorry, we'll try to include
other types in a future version!
type "bytes" in the open source release.
TODO: make ctype actually deprecated.
"""
packed: builtins.bool
"""The packed option can be enabled for repeated primitive fields to enable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ _StructValueArg: TypeAlias = _StructValue | Mapping[str, _StructValueArg] | Sequ

class Struct:
def __getitem__(self, key: str) -> _StructValue: ...
def __contains__(self, item: object) -> bool: ...
def __setitem__(self, key: str, value: _StructValueArg) -> None: ...
def __delitem__(self, key: str) -> None: ...
def __len__(self) -> int: ...
Expand Down