Bump protobuf to v24.4 and update generator script - #11693
Conversation
This comment has been minimized.
This comment has been minimized.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
|
|
||
| sed --in-place="" \ | ||
| "s/extra_description = .*$/extra_description = \"Generated using [mypy-protobuf==$MYPY_PROTOBUF_VERSION](https:\/\/github.com\/nipunn1313\/mypy-protobuf\/tree\/v$MYPY_PROTOBUF_VERSION) on protobuf==$PYTHON_PROTOBUF_VERSION\"/" \ | ||
| "s/extra_description = .*$/extra_description = \"Generated using [mypy-protobuf==$MYPY_PROTOBUF_VERSION](https:\/\/github.com\/nipunn1313\/mypy-protobuf\/tree\/v$MYPY_PROTOBUF_VERSION) on [protobuf v$PROTOBUF_VERSION](https:\/\/github.com\/protocolbuffers\/protobuf\/releases\/tag\/v$PROTOBUF_VERSION) (python protobuf==$PYTHON_PROTOBUF_VERSION)\"/" \ |
There was a problem hiding this comment.
This is a very long line, but idk how to do a single argument multiline string in bash
There was a problem hiding this comment.
I think you can split a line by placing ”¥¥¥n” immediately after the word you want to separate.
"s/extra_description = .*$/extra_description = "\
"\"Generated using [mypy-protobuf==$MYPY_PROTOBUF_VERSION](https:\/\/github.com\/nipunn1313\/mypy-protobuf\/tree\/v$MYPY_PROTOBUF_VERSION)"\
" on [protobuf v$PROTOBUF_VERSION](https:\/\/github.com\/protocolbuffers\/protobuf\/releases\/tag\/v$PROTOBUF_VERSION)"\
" (python protobuf==$PYTHON_PROTOBUF_VERSION)\"/"
| also declared with same name and request/response types in | ||
| `Storage`. A documentation generator or annotation processor will | ||
| see the effective `Storage.GetAcl` method after inheriting | ||
| see the effective `Storage.GetAcl` method after inherting |
There was a problem hiding this comment.
Lol, did they deliberately introduce a typo or did we accidentally update this in our vendored copy without contributing the typo fix upstream, I wonder?
There was a problem hiding this comment.
They deliberately re-introduced it! protocolbuffers/protobuf@b81c127
There was a problem hiding this comment.
Amazing! If this didn't have a citation I'd be certain this was an April Fool's :D
There was a problem hiding this comment.
Got to have copyright on those typo fixes
Thanks, those changes look great :) |
| fully qualified. | ||
| """ | ||
| @property | ||
| def source_file_descriptors(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[google.protobuf.descriptor_pb2.FileDescriptorProto]: |
Closes #11686 and closes #11685
As of v22, protobuf downloads on github no longer provides a zip per language, but rather a single zip with all languages. I've updated the script to work on v22+ and bumped protobuf to v24 to reflect what the stubs claim to cover.
I could easily have the
versioninMETADATA.tomlfollow thepython protobufversion used by the script. LMK if you also think that would be a good idea (with an appropriate comment inMETADATA.toml)I didn't bump all the way up to v26 (#10964) because I wanted to at least correct the existing v24 typings
CC @AlexWaygood I also fixed the
pre-commit run --filesinvocation so it's actually passed the files to check, runs without error, and re-run Ruff as a second pass because unused imports are not removed when fixingUP036 Version block is outdated for minimum Python versionCC @ijknabla FYI