-
Notifications
You must be signed in to change notification settings - Fork 13
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
Plugin request for Buf Schema Registry - python-betterproto #95
Comments
Closing for now. If this plugin becomes more popular we can re-open the issue. |
We would love to have this plugin :-) |
@mfridman how is "popularity" measured here so this can be reopened? i'd be willing to help get this in the community plugins as betterproto has a much cleaner interface when working with protobuf. One thing that might delay this is that the most recent version on pypi for this is almost 3 years old and it looks like a 2.0(major release) is "close" to being finalized. |
Can we reopen this? betterproto is miles ahead of the standard protoc Python plugin. Not having this plugin keeps my company from using Buf |
this is excellent, thanks everyone. |
Is there any chance you could publish v2.0.0-beta5? v1.2.5 dates back to 2020, the latest changes are available in v2.0.0-beta5 (and that is still almost 1 year old) |
At this time, we only support stable releases of BSR plugins. Once the maintainer releases a v2.0.0, we will pick it up automatically and release it to the BSR. |
The issue is that the latest stable version is more than 3 years old and a lot of projects use the beta versions that are quite stable. |
I'm using this hack in the meantime... FROM python:3.11-bookworm AS builder
RUN pip install "betterproto[compiler]==2.0.0b5" grpcio-tools
CMD python -m grpc_tools.protoc -I /app/proto --python_betterproto_out=/app/gen $(find /app/proto -iname '*.proto' | sort | xargs) # Hack because betterproto 2.0.0b5 is not supported by buf yet
mkdir -p gen/python # required for correct ownership
docker build -f scripts/betterproto/Dockerfile -t proto-python-builder .
docker run --rm --user "$(id -u):$(id -g)" -v "$(pwd)/proto:/app/proto" -v "$(pwd)/gen/python:/app/gen" proto-python-builder |
How will it be picked up automatically? I see the current version uses a requirements.txt file that pins versions of some dependencies but that likely won't work for v2 so there would need to be some manual intervention. Does the buf team just get notified that a new version is out and get prompted to manually add a new version? |
It's pretty automated, there's a job that runs daily searching for updated plugin versions. Think of this repository as a "dependabot" for Protobuf plugins with an automated pipeline to https://buf.build/plugins. Once a stable semver is released, it'll get picked up automatically. The only condition is that it must be a valid semver without a pre-release component Currently, Which is why it's the latest available one: https://buf.build/community/danielgtaylor-betterproto I'm afraid until a stable v2.0.0 is released, we can't do much. Hope this helps, if you have any other questions we're more than happy to help. |
https://github.com/danielgtaylor/python-betterproto
The text was updated successfully, but these errors were encountered: