diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2018-08-08 17:00:41 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2018-08-08 17:00:41 -0700 |
commit | 6bbe197e9c1b6fc38cbdc45e3bf83fa7ced792a3 (patch) | |
tree | e575738adf52d24b883cca5e8928a5ded31caba1 /python/google/protobuf/internal/api_implementation.py | |
parent | e7746f487cb9cca685ffb1b3d7dccc5554b618a4 (diff) | |
download | protobuf-6bbe197e9c1b6fc38cbdc45e3bf83fa7ced792a3.tar.gz protobuf-6bbe197e9c1b6fc38cbdc45e3bf83fa7ced792a3.tar.bz2 protobuf-6bbe197e9c1b6fc38cbdc45e3bf83fa7ced792a3.zip |
Down-integrate from google3.
Diffstat (limited to 'python/google/protobuf/internal/api_implementation.py')
-rwxr-xr-x | python/google/protobuf/internal/api_implementation.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/python/google/protobuf/internal/api_implementation.py b/python/google/protobuf/internal/api_implementation.py index ab9e7812..23cc2c0a 100755 --- a/python/google/protobuf/internal/api_implementation.py +++ b/python/google/protobuf/internal/api_implementation.py @@ -145,29 +145,3 @@ def Version(): # For internal use only def IsPythonDefaultSerializationDeterministic(): return _python_deterministic_proto_serialization - -# DO NOT USE: For migration and testing only. Will be removed when Proto3 -# defaults to preserve unknowns. -if _implementation_type == 'cpp': - try: - # pylint: disable=g-import-not-at-top - from google.protobuf.pyext import _message - - def GetPythonProto3PreserveUnknownsDefault(): - return _message.GetPythonProto3PreserveUnknownsDefault() - - def SetPythonProto3PreserveUnknownsDefault(preserve): - _message.SetPythonProto3PreserveUnknownsDefault(preserve) - except ImportError: - # Unrecognized cpp implementation. Skipping the unknown fields APIs. - pass -else: - _python_proto3_preserve_unknowns_default = True - - def GetPythonProto3PreserveUnknownsDefault(): - return _python_proto3_preserve_unknowns_default - - def SetPythonProto3PreserveUnknownsDefault(preserve): - global _python_proto3_preserve_unknowns_default - _python_proto3_preserve_unknowns_default = preserve - |