-
Notifications
You must be signed in to change notification settings - Fork 24
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
Rebuild protobuf parser using protoc 25.1 #95
Merged
fabricematrat
merged 4 commits into
go-macaroon-bakery:master
from
jameinel:protoc-rebuild-25.1
Dec 13, 2023
Merged
Rebuild protobuf parser using protoc 25.1 #95
fabricematrat
merged 4 commits into
go-macaroon-bakery:master
from
jameinel:protoc-rebuild-25.1
Dec 13, 2023
Conversation
This file contains 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
Using: ``` $ protoc --version libprotoc 3.12.4 $ protoc --python_out . id.proto ``` Note that this is probably still not 4.x compatible since the error message was "cannot instantiate Descriptor directly"
Downloaded the binary directly and ran: ``` $ ~/dev/protobuf/bin/protoc --version libprotoc 25.1 $ ~/dev/protobuf/bin/protoc --python_out . id.proto ``` I then tested that you can install python-protobuf 4.* and still import this file.
The issue is that with 3.20 they introduced Builders, which are required in new versions of protobuf, but only support in 3.20 and onwards.
jameinel
changed the title
Protoc rebuild 25.1
Rebuild protobuf parser using protoc 25.1
Dec 7, 2023
This was referenced Dec 8, 2023
@jameinel you should also modify the setup.py. |
I updated setup.py as well. |
Merged
@fabricematrat pinging for this anytime you can ☝️ thanks again for all the time you spent on this! ❤️ |
1 task
13 tasks
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 rebuilds the Bakery making it compatible with Protobuf >= 3.20 (including 4.*)
The issue is that Builder objects were introduced in 3.20 and are mandatory for 4.* support. So if you regenerate the protocol definition to support 4.* then it won't import with 3.4 or 3.19 (as I tested).
This appears to work with both 4.0 and 3.20 at least. I don't know what versions of Protobuf we need to support.