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

are google.protobuf and google.protobuf.pyext supposed to be namespace packages? #5194

Closed
benjaminp opened this issue Sep 27, 2018 · 1 comment
Assignees
Labels

Comments

@benjaminp
Copy link
Contributor

I'm trying to understand why 786f80f added the namespace package stanza to google/protobuf/__init__.py and google/protobuf/pyext/__init__.py. I see the google namespace has a fraught history, but is it actually expected that other packages will put code in google.protobuf or google.protobuf.pyext? Note also google/protobuf/__init__.py technically violates the requirement that a namespace packages's __init__.py must not include any other code and data aside from the namespace declaration.

I think either the namespace declaration code should be removed from google/protobuf/__init__.py and google/protobuf/pyext/__init__.py, or these namespace packages should be declared along with the google namespace in setup.py.

benjaminp added a commit to benjaminp/protobuf that referenced this issue Nov 4, 2019
…protobuf.pyext.

setup.py does not declare these packages to be namespace packages, so they shouldn't have the boilerplate.

Fixes protocolbuffers#5194.
@benjaminp
Copy link
Contributor Author

#7902

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants