Hi,
https://developers.google.com/protocol-buffers/docs/reference/python-generated#cpp_impl states that the default implementation is Python and that one needs to opt in to C++ by setting PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION.
However, when I install the latest version of protobuf without setting that environment variable I still seem to get the C++ implementation:
busunkim@busunkim:~$ python3 -m venv protobufenv
busunkim@busunkim:~$ source protobufenv/bin/activate
(protobufenv) busunkim@busunkim:~$ python3 -m pip install protobuf
Collecting protobuf
Collecting six>=1.9 (from protobuf)
Installing collected packages: six, protobuf
Successfully installed protobuf-3.15.8 six-1.15.0
WARNING: You are using pip version 19.2.3, however version 21.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(protobufenv) busunkim@busunkim:~$ python3
Python 3.8.3 (default, Jun 15 2020, 16:29:21)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from google.protobuf.internal import api_implementation
>>> api_implementation.Type()
'cpp'
Under what conditions does someone end up with the C++ implementation vs. the Python implementation? Is it possible to know in which version that change was made?