Skip to content

Commit 4ee4629

Browse files
GwendalRaoulPFigs
authored andcommitted
Protobuf: Add a warning in case full python protobuf lib in use (#16)
1 parent c9059a7 commit 4ee4629

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

wrappers/python/wirepas_messaging/__init__.py

+16
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,21 @@
1313
except ImportError:
1414
print("Could not import WPE handles")
1515

16+
17+
from google.protobuf.internal import api_implementation
18+
19+
warning_msg = """
20+
***********************************************************************
21+
* WARNING:
22+
* You are using the pure python protobuf implementation.
23+
* For better results, please consider using the cpp version.
24+
* For more information please consult:
25+
* https://github.com/protocolbuffers/protobuf/tree/master/python
26+
***********************************************************************
27+
"""
28+
if api_implementation._default_implementation_type == "python":
29+
print(warning_msg)
30+
1631
__title__ = "wirepas_messaging"
1732
__version__ = "1.2.0rc1"
33+

0 commit comments

Comments
 (0)