관리-도구
편집 파일: xmlrpc.cpython-36.pyc
3 �ReZ � @ s� d Z ddlZddlmZ ddlmZ ddlmZ ddl m Z ddlmZ erdddl mZ dd lmZ eje�ZG d d� dej�ZdS )z#xmlrpclib.Transport implementation � N)� xmlrpc_client)�parse)�NetworkConnectionError)�raise_for_status)�MYPY_CHECK_RUNNING)�Dict)� PipSessionc @ s$ e Zd ZdZddd�Zd dd�ZdS ) �PipXmlrpcTransportzRProvide a `xmlrpclib.Transport` implementation via a `PipSession` object. Fc C s* t jj| |� tj|�}|j| _|| _d S )N)r � Transport�__init__�urllib_parse�urlparse�scheme�_scheme�_session)�self� index_url�session�use_datetimeZindex_parts� r ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/network/xmlrpc.pyr s zPipXmlrpcTransport.__init__c C s� | j ||d d d f}tj|�}y6ddi}| jj|||dd�}t|� || _| j|j�S t k r� } z$| j snt�tj d| j j|� � W Y d d } ~ X nX d S )NzContent-Typeztext/xmlT)�data�headers�streamzHTTP error %s while getting %s)r r � urlunparser �postr �verbose�parse_response�rawr �response�AssertionError�logger�critical�status_code) r �host�handler�request_bodyr �parts�urlr r �excr r r �request# s zPipXmlrpcTransport.requestN)F)F)�__name__� __module__�__qualname__�__doc__r r* r r r r r s r )r. �logging�pip._vendor.six.movesr Zpip._vendor.six.moves.urllibr r �pip._internal.exceptionsr �pip._internal.network.utilsr �pip._internal.utils.typingr �typingr �pip._internal.network.sessionr � getLoggerr+ r! r r r r r r �<module> s