관리-도구
편집 파일: xmlrpc.cpython-310.pyc
o ƚRe� � @ s� d Z ddlZddlZddlZddlmZmZ ddl m Z ddlmZ ddl mZ er2ddlmZmZ e�e�ZG dd � d ejj�ZdS ) z#xmlrpclib.Transport implementation � N)� TYPE_CHECKING�Tuple)�NetworkConnectionError)� PipSession)�raise_for_status)� _HostType� _Marshallablec s\ e Zd ZdZ ddedededdf� fdd � Z dd dded edede d f dd�Z � ZS )�PipXmlrpcTransportzRProvide a `xmlrpclib.Transport` implementation via a `PipSession` object. F� index_url�session�use_datetime�returnNc s* t � �|� tj�|�}|j| _|| _d S )N)�super�__init__�urllib�parse�urlparse�scheme�_scheme�_session)�selfr r r Zindex_parts�� __class__� ��/builddir/build/BUILDROOT/alt-python310-pip-21.3.1-3.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_internal/network/xmlrpc.pyr s zPipXmlrpcTransport.__init__�hostr �handler�request_body�verbose)r .c C s� t |t�sJ �| j||d d d f}tj�|�}zddi}| jj|||dd�}t|� || _ | � |j�W S tyM } z| j s?J �t�d| j j|� � d } ~ ww )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( �excr r r �request s0 � ���zPipXmlrpcTransport.request)F)�__name__� __module__�__qualname__�__doc__r# r �boolr �bytesr r/ � __classcell__r r r r r s0 ����� ������r )r3 �logging�urllib.parser � xmlrpc.clientZxmlrpc�typingr r �pip._internal.exceptionsr �pip._internal.network.sessionr �pip._internal.network.utilsr r r � getLoggerr0 r) �client� Transportr r r r r �<module> s