관리-도구
편집 파일: xmlrpc.cpython-39.pyc
a ��Re� � @ s� d Z ddlZddlZddlZddlmZmZ ddl m Z ddlmZ ddl mZ erdddlmZmZ e�e�ZG dd � d ejj�ZdS ) z#xmlrpclib.Transport implementation � N)� TYPE_CHECKING�Tuple)�NetworkConnectionError)� PipSession)�raise_for_status)� _HostType� _Marshallablec sJ e Zd ZdZdeeedd�� fdd� Zd deeee d d �d d�Z � ZS )�PipXmlrpcTransportzRProvide a `xmlrpclib.Transport` implementation via a `PipSession` object. FN)� index_url�session�use_datetime�returnc 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-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/network/xmlrpc.pyr s zPipXmlrpcTransport.__init__r )r .)�host�handler�request_body�verboser c C s� t |t�sJ �| j||d d d f}tj�|�}z8ddi}| jj|||dd�}t|� || _ | � |j�W S ty� } z*| j s~J �t�d| j j|� � W Y d } ~ n d } ~ 0 0 d S )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 s, � �zPipXmlrpcTransport.request)F)F)�__name__� __module__�__qualname__�__doc__r# r �boolr �bytesr r/ � __classcell__r r r r r s �� ��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