관리-도구
편집 파일: descriptor_pool.cpython-311.pyc
� P�Dg� � �� � d Z dZddlZddlZddlmZ ddlmZ ddlmZ ej Zd� Z d� Z d � Zd � Z G d� de � � Zd � Zer ej j Zn e� � Zd� ZdS )aK Provides DescriptorPool to use as a container for proto2 descriptors. The DescriptorPool is used in conjection with a DescriptorDatabase to maintain a collection of protocol buffer descriptors for use when dynamically creating message types at runtime. For most applications protocol buffers should be used via modules generated by the protocol buffer compiler tool. This should only be used when the type of protocol buffers used in an application or library cannot be predetermined. Below is a straightforward example on how to use this class:: pool = DescriptorPool() file_descriptor_protos = [ ... ] for file_descriptor_proto in file_descriptor_protos: pool.Add(file_descriptor_proto) my_message_descriptor = pool.FindMessageTypeByName('some.package.MessageType') The message descriptor can be used in conjunction with the message_factory module in order to create a protocol buffer class that can be encoded and decoded. If you want to get a Python class for the specified proto, use the helper functions inside google.protobuf.message_factory directly instead of this class. z"matthewtoia@google.com (Matt Toia)� N)� descriptor)�descriptor_database)� text_encodingc � � � � fd�}� j |_ � j |_ |j � � j � � |S )zMark functions as deprecated.c �Z �� t j d�j z t �� � �| i |��S )Nz�Call to deprecated function %s(). Note: Do add unlinked descriptors to descriptor_pool is wrong. Use Add() or AddSerializedFile() instead.)�category)�warnings�warn�__name__�DeprecationWarning)�args�kwargs�funcs ���/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/google/protobuf/descriptor_pool.py�NewFuncz_Deprecated.<locals>.NewFuncJ sG �� ��M� ��]� #� $� %� %� %� %� �4�� �� � � � )r �__doc__�__dict__�update)r r s ` r �_Deprecatedr G sO �� �!� !� !� !� !� �]�'���L�'�/� ����$�-�(�(�(� �.r c �, � | � d� � S )aI Remove leading period from fully-qualified type name. Due to b/13860351 in descriptor_database.py, types in the root namespace are generated with a leading period. This function removes that prefix. Args: name (str): The fully-qualified symbol name. Returns: str: The normalized fully-qualified symbol name. �.)�lstrip��names r �_NormalizeFullyQualifiedNamer W s � � ���S� � �r c �>