Skip to content

Instantly share code, notes, and snippets.

@jtattermusch
Created February 9, 2021 16:01
Show Gist options
  • Save jtattermusch/6d56350c6d19e21bf06633e6ef2667b3 to your computer and use it in GitHub Desktop.
Save jtattermusch/6d56350c6d19e21bf06633e6ef2667b3 to your computer and use it in GitHub Desktop.
import os
print('PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=%s' % os.getenv('PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION'))
from google.protobuf.internal import api_implementation
print('API implementation default %s:' % api_implementation._default_implementation_type)
print('API implementation used by protobuf python: %s' % api_implementation.Type())
# this throws if c++ implementation is on and the native extension cannot be loaded
import google.protobuf.timestamp_pb2
print('Success')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment