Skip to content
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

Python package prefixes in Managed Mode? #676

Closed
zxia-wish opened this issue Oct 21, 2021 · 2 comments
Closed

Python package prefixes in Managed Mode? #676

zxia-wish opened this issue Oct 21, 2021 · 2 comments

Comments

@zxia-wish
Copy link

Hi team!

Buf is a really awesome tool and thank you for your hard work! We already have package prefixes for Go and Java, can we have the same for Python? For example, instead of import object, importing package_prefix.object makes it much easier to package and publish Python packages.

Thanks!

@amckinney
Copy link
Contributor

Thanks for the issue @zxia-wish! For Managed Mode, we can only support the standard file options defined by google/protobuf/descriptor.proto. Python doesn't support any file options, so we can't control the behavior of the plugin in the same way as we do with go_package_prefix (i.e. we can use the go_package option for that).

From what I can tell, the protoc-gen-python plugin doesn't support any other compiler options, as described in the official documentation, so I don't think we can do anything here to help your use case.

For what it's worth, it looks like this is related to protocolbuffers/protobuf#881. I'll close this issue for now since we'll need to see changes to protoc-gen-python.

@piapip
Copy link

piapip commented Jan 10, 2022

@ionicc FeelsBadMan :<

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

No branches or pull requests

3 participants