관리-도구
편집 파일: xmlrpc.cpython-38.pyc
U ʗ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-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/network/xmlrpc.pyr s zPipXmlrpcTransport.__init__r )r .)�host�handler�request_body�verboser c C s� t |t�st�| j||d d d f}tj�|�}z8ddi}| jj|||dd�}t |� || _ | �|j�W S t k r� } z"| js�t�t�d| jj|� � W 5 d } ~ X Y nX d S )NzContent-Typeztext/xmlT)�data�headers�streamzHTTP error %s while getting %s)� isinstance�str�AssertionErrorr 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 r0 � __classcell__r r r r r s � � ��r )r4 �logging�urllib.parser � xmlrpc.clientZxmlrpc�typingr r �pip._internal.exceptionsr �pip._internal.network.sessionr �pip._internal.network.utilsr r r � getLoggerr1 r* �client� Transportr r r r r �<module> s