Use PyImport_ImportModuleLevel() instead of PyImport_Import() for descriptor_pb2. PyImport_ImportModuleLevel() custom globals and locals pointing to some namespace we control, not normal-looking __builtins__
Change PYUPB_DESCRIPTOR_MODULE to "google.protobuf.descriptor_pb2" because protobuf python is using google.protobuf.descriptor_pb2 everywhere Also check import result of PYUPB_DESCRIPTOR_MODULE PiperOrigin-RevId: 565409795pull/14088/head
parent
a0f7918cae
commit
bc0a87423e
2 changed files with 4 additions and 3 deletions
Loading…
Reference in new issue