관리-도구
편집 파일: xmlrpc.cpython-311.pyc
� �Re� � � � d Z ddlZddlZddlZddlmZmZ ddl m Z ddlmZ ddl mZ erddlmZmZ ej e� � Z G d� d ej j � � ZdS ) z#xmlrpclib.Transport implementation � N)� TYPE_CHECKING�Tuple)�NetworkConnectionError)� PipSession)�raise_for_status)� _HostType� _Marshallablec �d � � e Zd ZdZ ddedededdf� fd� Z dd d deded ede d f d�Z � xZS )�PipXmlrpcTransportzRProvide a `xmlrpclib.Transport` implementation via a `PipSession` object. F� index_url�session�use_datetime�returnNc � �� t � � � |� � t j � |� � }|j | _ || _ d S )N)�super�__init__�urllib�parse�urlparse�scheme�_scheme�_session)�selfr r r �index_parts� __class__s ���/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/network/xmlrpc.pyr zPipXmlrpcTransport.__init__ sG �� � ������&�&�&��l�+�+�I�6�6��"�)����� � � � �hostr �handler�request_body�verbose)r .c � � t |t � � sJ �| j ||d d d f}t j � |� � } ddi}| j � |||d�� � }t |� � || _ | � |j � � S # t $ r5} | j sJ �t � d| j j |� � � d } ~ ww xY w)NzContent-Typeztext/xmlT)�data�headers�streamzHTTP error %s while getting %s)� isinstance�strr r r � urlunparser �postr r! �parse_response�rawr �response�logger�critical�status_code) r r r r r! �parts�urlr$ r, �excs r �requestzPipXmlrpcTransport.request s� � � �$��$�$�$�$�$���t�W�d�D�$�?���l�%�%�e�,�,�� �%�z�2�G��}�)�)��!��� *� � �H� �X�&�&�&�"�D�L��&�&�x�|�4�4�4��%� � � ��<�����O�O�0���(�� � � � ����� ���s �AB � C�!0C�C)F)�__name__� __module__�__qualname__�__doc__r'