OXIESEC PANEL
- Current Dir:
/
/
lib
/
python3.9
/
site-packages
/
google
/
protobuf
/
internal
/
__pycache__
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/14/2024 03:59:29 PM
rwxr-xr-x
📄
__init__.cpython-39.opt-1.pyc
160 bytes
10/15/2022 12:19:30 PM
rw-r--r--
📄
__init__.cpython-39.pyc
160 bytes
10/15/2022 12:19:30 PM
rw-r--r--
📄
api_implementation.cpython-39.opt-1.pyc
2.17 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
api_implementation.cpython-39.pyc
2.17 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
containers.cpython-39.opt-1.pyc
23.29 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
containers.cpython-39.pyc
23.29 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
decoder.cpython-39.opt-1.pyc
24.17 KB
10/15/2022 12:19:31 PM
rw-r--r--
📄
decoder.cpython-39.pyc
24.21 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
encoder.cpython-39.opt-1.pyc
22.46 KB
10/15/2022 12:19:31 PM
rw-r--r--
📄
encoder.cpython-39.pyc
22.54 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
enum_type_wrapper.cpython-39.opt-1.pyc
3.34 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
enum_type_wrapper.cpython-39.pyc
3.34 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
extension_dict.cpython-39.opt-1.pyc
5.31 KB
10/15/2022 12:19:31 PM
rw-r--r--
📄
extension_dict.cpython-39.pyc
5.44 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
message_listener.cpython-39.opt-1.pyc
2.27 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
message_listener.cpython-39.pyc
2.27 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
python_message.cpython-39.opt-1.pyc
39.69 KB
10/15/2022 12:19:31 PM
rw-r--r--
📄
python_message.cpython-39.pyc
40 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
type_checkers.cpython-39.opt-1.pyc
10.43 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
type_checkers.cpython-39.pyc
10.43 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
well_known_types.cpython-39.opt-1.pyc
25.73 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
well_known_types.cpython-39.pyc
25.73 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
wire_format.cpython-39.opt-1.pyc
6.24 KB
10/15/2022 12:19:30 PM
rw-r--r--
📄
wire_format.cpython-39.pyc
6.24 KB
10/15/2022 12:19:30 PM
rw-r--r--
Editing: python_message.cpython-39.pyc
Close
a �Jc$� � @ s� d Z dZddlmZ ddlZddlZddlZddlZddlm Z ddl mZ ddl mZ ddl m Z dd l mZ dd l mZ ddl mZ ddl mZ dd l mZ ddl mZ ddl mZ ddlmZ ddlmZ ddlmZ ejZdZejZG dd� de �Z!dd� Z"dd� Z#dd� Z$dd� Z%dd� Z&d d!� Z'd"d#� Z(d$d%� Z)d&d'� Z*d(d)� Z+d*d+� Z,d,d-� Z-d.d/� Z.d0d1� Z/d2d3� Z0d4d5� Z1G d6d7� d7e2�Z3d8d9� Z4d:d;� Z5d<d=� Z6d>d?� Z7d@dA� Z8dBdC� Z9dDdE� Z:dFZ;dGZ<dHdI� Z=dJdK� Z>dLdM� Z?dNdO� Z@dPdQ� ZAdRdS� ZBdTdU� ZCdVdW� ZDdXdY� ZEdZd[� ZFd\d]� ZGd^d_� ZHd`da� ZIdbdc� ZJddde� ZKdfdg� ZLdhdi� ZMdjdk� ZNdldm� ZOdndo� ZPdpdq� ZQdrds� ZRdtdu� ZSG dvdw� dweT�ZUG dxdy� dyeU�ZVdS )za Contains a metaclass and helper functions used to create protocol message classes from Descriptor objects at runtime. Recall that a metaclass is the "type" of a class. (A class is to a metaclass what an instance is to a class.) In this case, we use the GeneratedProtocolMessageType metaclass to inject all the useful functionality into the classes output by the protocol compiler at compile-time. The upshot of all this is that the real implementation details for ALL pure-Python protocol buffers are *here in this file*. z#robinson@google.com (Will Robinson)� )�BytesION)�range)�api_implementation)� containers)�decoder)�encoder)�enum_type_wrapper)�extension_dict)�message_listener)� type_checkers)�well_known_types)�wire_format)� descriptor��message)�text_formatzgoogle.protobuf.Anyc s0 e Zd ZdZdZ� fdd�Z� fdd�Z� ZS )�GeneratedProtocolMessageTypeaQ Metaclass for protocol message classes created at runtime from Descriptors. We add implementations for all methods described in the Message class. We also create properties to allow getting/setting all fields in the protocol message. Finally, we create slots to prevent users from accidentally "setting" nonexistent fields in the protocol message, which then wouldn't get serialized / deserialized properly. The protocol compiler currently uses this metaclass to create protocol message classes at runtime. Clients can also manually create their own classes at runtime, as in this example: mydescriptor = Descriptor(.....) factory = symbol_database.Default() factory.pool.AddDescriptor(mydescriptor) MyProtoClass = factory.GetPrototype(mydescriptor) myproto_instance = MyProtoClass() myproto.foo_field = 23 ... � DESCRIPTORc s� |t j }t|t�rtd��t|dd�}|r0|S |jtjv rN|tj|j f7 }t ||� t ||� tt | �}|�| |||�}|S )ak Custom allocation for runtime-generated class types. We override __new__ because this is apparently the only place where we can meaningfully set __slots__ on the class we're creating(?). (The interplay between metaclasses and slots is not very well-documented). Args: name: Name of the class (ignored, but required by the metaclass protocol). bases: Base classes of the class we're constructing. (Should be message.Message). We ignore this field, but it's required by the metaclass protocol dictionary: The class dictionary of the class we're constructing. dictionary[_DESCRIPTOR_KEY] must contain a Descriptor object describing this protocol message type. Returns: Newly-allocated class. Raises: RuntimeError: Generated code only work with python cpp extension. z\The generated code only work with python cpp extension, but it is using pure python runtime.�_concrete_classN) r �_DESCRIPTOR_KEY� isinstance�str�RuntimeError�getattr� full_namer ZWKTBASES�&_AddClassAttributesForNestedExtensions� _AddSlots�super�__new__)�cls�name�bases� dictionaryr � new_class� superclass�� __class__� �K/usr/lib/python3.9/site-packages/google/protobuf/internal/python_message.pyr k s z$GeneratedProtocolMessageType.__new__c s� |t j }t|dd�}|r4|| u s0J d|j ��dS i | _|jr`|�� jr`t� |�df| jtj <