You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of protobuf and what language are you using?
Version: 3.20.1
Language: Python
What operating system (Linux, Windows, ...) and version?
Linux/openSUSE/Tumbleweed, all packages from the current distribution
What runtime / compiler are you using (e.g., python version or gcc version)
See details in googleapis/python-api-core#372
What did you do?
Run test suite for python-api-core, while packaging it for openSUSE..
What did you expect to see
Passing test suite.
What did you see instead?
See the above mentioned bug.
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
In the end I have created this patch, which makes the test suite pass, but I guess it is just poorly mitigating bug somewhere else in the code:
---
python/google/protobuf/descriptor_database.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- a/python/google/protobuf/descriptor_database.py+++ b/python/google/protobuf/descriptor_database.py@@ -75,14 +75,17 @@ class DescriptorDatabase(object):
for name in _ExtractSymbols(message, package):
self._AddSymbol(name, file_desc_proto)
for enum in file_desc_proto.enum_type:
- self._AddSymbol(('.'.join((package, enum.name))), file_desc_proto)+ symbol = ('.'.join((package, enum.name))).lstrip('.')+ self._AddSymbol(symbol, file_desc_proto)
for enum_value in enum.value:
self._file_desc_protos_by_symbol[
'.'.join((package, enum_value.name))] = file_desc_proto
for extension in file_desc_proto.extension:
- self._AddSymbol(('.'.join((package, extension.name))), file_desc_proto)+ symbol = ('.'.join((package, extension.name))).lstrip('.')+ self._AddSymbol(symbol, file_desc_proto)
for service in file_desc_proto.service:
- self._AddSymbol(('.'.join((package, service.name))), file_desc_proto)+ symbol = ('.'.join((package, service.name))).lstrip('.')+ self._AddSymbol(symbol, file_desc_proto)
def FindFileByName(self, name):
"""Finds the file descriptor proto by file name.
The text was updated successfully, but these errors were encountered:
The .proto file starts with a package declaration, which helps to prevent naming conflicts between different projects. In Python, packages are normally determined by directory structure, so the package you define in your .proto file will have no effect on the generated code. However, you should still declare package to avoid name collisions in the Protocol Buffers name space as well as in non-Python languages.
What version of protobuf and what language are you using?
Version: 3.20.1
Language: Python
What operating system (Linux, Windows, ...) and version?
Linux/openSUSE/Tumbleweed, all packages from the current distribution
What runtime / compiler are you using (e.g., python version or gcc version)
See details in googleapis/python-api-core#372
What did you do?
Run test suite for python-api-core, while packaging it for openSUSE..
What did you expect to see
Passing test suite.
What did you see instead?
See the above mentioned bug.
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
In the end I have created this patch, which makes the test suite pass, but I guess it is just poorly mitigating bug somewhere else in the code:
The text was updated successfully, but these errors were encountered: