U
    @vg                     @   s<   d dl mZmZ d dlmZ er,d dlmZ efddZdS )    )CONTENT_CHUNK_SIZEResponse)MYPY_CHECK_RUNNING)Iteratorc                 c   sT   z | j j|ddD ]
}|V  qW n. tk
rN   | j |}|sBqJ|V  q0Y nX dS )z8Given a requests Response, provide the data chunks.
    F)decode_contentN)rawstreamAttributeErrorread)response
chunk_sizechunk r   ?/tmp/pip-unpacked-wheel-gw11q0wt/pip/_internal/network/utils.pyresponse_chunks	   s    
r   N)pip._vendor.requests.modelsr   r   pip._internal.utils.typingr   typingr   r   r   r   r   r   <module>   s   