Skip to content

[protobuf] Bump to 7.34.1 and improve type coverage#15569

Open
emmanuel-ferdman wants to merge 2 commits intopython:mainfrom
emmanuel-ferdman:protobuf-v34.1
Open

[protobuf] Bump to 7.34.1 and improve type coverage#15569
emmanuel-ferdman wants to merge 2 commits intopython:mainfrom
emmanuel-ferdman:protobuf-v34.1

Conversation

@emmanuel-ferdman
Copy link
Copy Markdown
Contributor

PR Summary

Bump protobuf stubs from 6.32.1 to 7.34.1 - removes deprecated label/float_format/float_precision params, adds new methods, replaces all Incomplete with precise types, adds missing module stubs and narrows Any to specific types.

Closes #14887

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

spark (https://github.com/apache/spark)
+ python/pyspark/sql/connect/client/core.py:1147: error: "FieldDescriptor" has no attribute "label"  [attr-defined]
+ python/pyspark/sql/connect/client/core.py:1158: error: "FieldDescriptor" has no attribute "label"  [attr-defined]
+ python/pyspark/sql/connect/client/core.py:1165: error: "FieldDescriptor" has no attribute "label"  [attr-defined]

Comment on lines +23 to +43
enum_types: Any
enum_types_by_name: Any
enum_values_by_name: Any
extension_ranges: Any
extensions: Any
extensions_by_name: Any
fields: Any
fields_by_camelcase_name: Any
fields_by_name: Any
fields_by_number: Any
file: FileDescriptor
full_name: str
has_options: bool
is_extendable: bool
name: str
nested_types: Any
nested_types_by_name: Any
oneofs: Any
oneofs_by_name: Any
def __new__(cls, *args, **kwargs) -> Self: ...
def CopyToProto(self, proto: Any, /) -> None: ...
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I noticed that you replaced Incomplete with Any annotations are added Any to previously unannotated items. Why? Also please note that we need a comment for each Any explaining the possible types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants