Migrate to protobuf-py and rename repo to connect-py#274
Merged
Conversation
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
stefanvanburen
approved these changes
Jun 24, 2026
stefanvanburen
left a comment
Member
There was a problem hiding this comment.
lgtm, just some nits. 🚢
Comment on lines
113
to
121
| protoc-gen-connect-python/protoc-gen-connect-python | ||
|
|
||
| # goreleaser archives | ||
| out/ |
Member
There was a problem hiding this comment.
probably a couple of others we could delete while we're here?
| if test_request.cancel: | ||
| match test_request.cancel.cancel_timing: | ||
| case Oneof("after_close_send_ms", after_close_send_ms): | ||
| await asyncio.sleep(after_close_send_ms / 1000.0) |
Member
There was a problem hiding this comment.
nit: should this also await request_closed.wait() similar to the async case below? (looks like this was already the case in the code, just think it ought to match?)
| # https://github.com/python/typeshed/issues/9006. | ||
| message.ParseFromString(data) # ty: ignore[invalid-argument-type] | ||
| return message | ||
| return message.__class__.from_binary(data) # TODO: fix type |
Member
There was a problem hiding this comment.
guessing this needs an upstream fix?
Collaborator
Author
There was a problem hiding this comment.
Oops nice catch! Nope it's a fix to the codec type here to allow using protobuf-py's classmethod style better that I had initially punted.
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
Signed-off-by: Stefan VanBuren <stefan@vanburen.xyz> Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
…nto protobuf-py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This brings the long awaited update to target the new protobuf-py implementation. Along with it, we will rename the repo to connect-py so this incorporates docs updates for that as well.
compatpackage with codecs targetinggoogle.protobufis included, and automatically used by gencode if passing the optionprotobuf=googleprotoc-gen-connect-pythontoprotoc-gen-connectrpcwhich could have happened before tooConnectin prose, andconnect-pyonly in repo links (before we usedConnect-Pythonin prose)iooption). I owe a testing utility for this in protobuf-py