Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: recipe_engine/third_party/google/protobuf/pyext/cpp_message.py

Issue 2236673002: Bump vendoring, move to proto3 release. (Closed) Base URL: https://github.com/luci/recipes-py@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: recipe_engine/third_party/google/protobuf/pyext/cpp_message.py
diff --git a/recipe_engine/third_party/google/protobuf/pyext/cpp_message.py b/recipe_engine/third_party/google/protobuf/pyext/cpp_message.py
index b215211ee581f2bfa4fa8d06cf3ca3fc27941f56..fc8eb32d79f60ff95b328ec5a828593ab78e1802 100644
--- a/recipe_engine/third_party/google/protobuf/pyext/cpp_message.py
+++ b/recipe_engine/third_party/google/protobuf/pyext/cpp_message.py
@@ -48,9 +48,9 @@ class GeneratedProtocolMessageType(_message.MessageMeta):
classes at runtime, as in this example:
mydescriptor = Descriptor(.....)
- class MyProtoClass(Message):
- __metaclass__ = GeneratedProtocolMessageType
- DESCRIPTOR = mydescriptor
+ factory = symbol_database.Default()
+ factory.pool.AddDescriptor(mydescriptor)
+ MyProtoClass = factory.GetPrototype(mydescriptor)
myproto_instance = MyProtoClass()
myproto.foo_field = 23
...
« no previous file with comments | « recipe_engine/third_party/google/protobuf/json_format.py ('k') | recipe_engine/third_party/google/protobuf/reflection.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698