| Index: third_party/protobuf/python/google/protobuf/internal/api_implementation.py
|
| diff --git a/third_party/protobuf/python/google/protobuf/internal/api_implementation.py b/third_party/protobuf/python/google/protobuf/internal/api_implementation.py
|
| index ffcf751167a5a973fa2e48f06a7b2920802fa494..460a4a6c2c8cdab6d142ce5ba6b39ed696d69758 100755
|
| --- a/third_party/protobuf/python/google/protobuf/internal/api_implementation.py
|
| +++ b/third_party/protobuf/python/google/protobuf/internal/api_implementation.py
|
| @@ -32,6 +32,7 @@
|
| """
|
|
|
| import os
|
| +import warnings
|
| import sys
|
|
|
| try:
|
| @@ -78,6 +79,11 @@ _implementation_type = os.getenv('PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION',
|
| if _implementation_type != 'python':
|
| _implementation_type = 'cpp'
|
|
|
| +if 'PyPy' in sys.version and _implementation_type == 'cpp':
|
| + warnings.warn('PyPy does not work yet with cpp protocol buffers. '
|
| + 'Falling back to the python implementation.')
|
| + _implementation_type = 'python'
|
| +
|
| # This environment variable can be used to switch between the two
|
| # 'cpp' implementations, overriding the compile-time constants in the
|
| # _api_implementation module. Right now only '2' is supported. Any other
|
|
|