관리-도구
편집 파일: xmlrpc.cpython-37.pyc
B ��ReZ � @ s� d Z ddlZddlmZ ddlmZ ddlmZ ddl m Z ddlmZ erdddl mZ dd lmZ e�e�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 j�| |� t�|�}|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-python37-pip-20.2.4-6.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/pip/_internal/network/xmlrpc.pyr s zPipXmlrpcTransport.__init__c C s� | j ||d d d f}t�|�}y6ddi}| jj|||dd�}t|� || _| �|j�S t k r� } z"| j snt�t� d| j j|� � W d d } ~ X Y 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