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

Side by Side Diff: third_party/protobuf26/internal/python_message.py

Issue 1162993005: Renamed google.protobuf to protobuf26 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Addressed comments Created 5 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Protocol Buffers - Google's data interchange format 1 # Protocol Buffers - Google's data interchange format
2 # Copyright 2008 Google Inc. All rights reserved. 2 # Copyright 2008 Google Inc. All rights reserved.
3 # http://code.google.com/p/protobuf/ 3 # http://code.google.com/p/protobuf/
4 # 4 #
5 # Redistribution and use in source and binary forms, with or without 5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are 6 # modification, are permitted provided that the following conditions are
7 # met: 7 # met:
8 # 8 #
9 # * Redistributions of source code must retain the above copyright 9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer. 10 # notice, this list of conditions and the following disclaimer.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 except ImportError: 61 except ImportError:
62 from StringIO import StringIO as BytesIO 62 from StringIO import StringIO as BytesIO
63 import copy_reg as copyreg 63 import copy_reg as copyreg
64 else: 64 else:
65 from io import BytesIO 65 from io import BytesIO
66 import copyreg 66 import copyreg
67 import struct 67 import struct
68 import weakref 68 import weakref
69 69
70 # We use "as" to avoid name collisions with variables. 70 # We use "as" to avoid name collisions with variables.
71 from google.protobuf.internal import containers 71 from protobuf26.internal import containers
72 from google.protobuf.internal import decoder 72 from protobuf26.internal import decoder
73 from google.protobuf.internal import encoder 73 from protobuf26.internal import encoder
74 from google.protobuf.internal import enum_type_wrapper 74 from protobuf26.internal import enum_type_wrapper
75 from google.protobuf.internal import message_listener as message_listener_mod 75 from protobuf26.internal import message_listener as message_listener_mod
76 from google.protobuf.internal import type_checkers 76 from protobuf26.internal import type_checkers
77 from google.protobuf.internal import wire_format 77 from protobuf26.internal import wire_format
78 from google.protobuf import descriptor as descriptor_mod 78 from protobuf26 import descriptor as descriptor_mod
79 from google.protobuf import message as message_mod 79 from protobuf26 import message as message_mod
80 from google.protobuf import text_format 80 from protobuf26 import text_format
81 81
82 _FieldDescriptor = descriptor_mod.FieldDescriptor 82 _FieldDescriptor = descriptor_mod.FieldDescriptor
83 83
84 84
85 def NewMessage(bases, descriptor, dictionary): 85 def NewMessage(bases, descriptor, dictionary):
86 _AddClassAttributesForNestedExtensions(descriptor, dictionary) 86 _AddClassAttributesForNestedExtensions(descriptor, dictionary)
87 _AddSlots(descriptor, dictionary) 87 _AddSlots(descriptor, dictionary)
88 return bases 88 return bases
89 89
90 90
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 def _FindExtensionByName(self, name): 1238 def _FindExtensionByName(self, name):
1239 """Tries to find a known extension with the specified name. 1239 """Tries to find a known extension with the specified name.
1240 1240
1241 Args: 1241 Args:
1242 name: Extension full name. 1242 name: Extension full name.
1243 1243
1244 Returns: 1244 Returns:
1245 Extension field descriptor. 1245 Extension field descriptor.
1246 """ 1246 """
1247 return self._extended_message._extensions_by_name.get(name, None) 1247 return self._extended_message._extensions_by_name.get(name, None)
OLDNEW
« no previous file with comments | « third_party/protobuf26/internal/message_listener.py ('k') | third_party/protobuf26/internal/type_checkers.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698