OwlCyberSecurity - MANAGER
Edit File: lazy_wheel.pyc
� �Rec�����������@���sZ��d��Z��d�d�g�Z�d�d�l�m�Z�m�Z�d�d�l�m�Z�d�d�l�m�Z�d�d�l �m �Z �m�Z�d�d�l�m �Z �d�d �l�m�Z�d�d �l�m�Z�m�Z�m�Z�d�d�l�m�Z�d�d�l�m�Z�e�r!d�d �l�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�d�d�l�m �Z �d�d�l�m!�Z!�d�d�l"�m#�Z#�n��d�e$�f�d�������YZ%�d����Z&�d�e'�f�d�������YZ(�d�S(���s���Lazy ZIP over HTTPt���HTTPRangeRequestUnsupportedt���dist_from_wheel_urli����(���t���bisect_leftt���bisect_right(���t���contextmanager(���t���NamedTemporaryFile(���t ���BadZipfilet���ZipFile(���t���CONTENT_CHUNK_SIZE(���t���range(���t���HEADERSt���raise_for_statust���response_chunks(���t���MYPY_CHECK_RUNNING(���t$���pkg_resources_distribution_for_wheel(���t���Anyt���Dictt���Iteratort���Listt���Optionalt���Tuple(���t���Distribution(���t���Response(���t ���PipSessionc�����������B���s���e��Z�RS(����(���t���__name__t ���__module__(����(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyR�������s���c���������C���s;���t��|�|����&�}�t�|���}�t�|�|��|�j���SWd�QXd�S(���s%��Return a pkg_resources.Distribution from the given wheel URL. This uses HTTP range requests to only fetch the potion of the wheel containing metadata, just enough for the object to be constructed. If such requests are not supported, HTTPRangeRequestUnsupported is raised. N(���t���LazyZipOverHTTPR���R���t���name(���R���t���urlt���sessiont���wheelt���zip_file(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyR���"���s���� R���c�����������B���s����e��Z�d��Z�e�d���Z�e�d������Z�e�d������Z�d����Z�d����Z �e�d������Z �d�d���Z�d ����Z�d �d���Z �d����Z�d�d ���Z�d����Z�d����Z�d����Z�e�d������Z�d����Z�e�d���Z�d����Z�d����Z�RS(���s��File-like object mapped to a ZIP file over HTTP. This uses HTTP range requests to lazily fetch the file's content, which is supposed to be fed to ZipFile. If such requests are not supported by the server, raise HTTPRangeRequestUnsupported during initialization. c���������C���s����|�j��|�d�t��}�t�|���|�j�d�k�s4�t���|�|�|�|��_�|��_�|��_�t�|�j �d���|��_ �t����|��_�|��j �|��j ���g��|��_�g��|��_�d�|�j �j�d�d���k�r��t�d�����n��|��j����d��S(���Nt���headersi����s���Content-Lengtht���bytess ���Accept-Rangest���nones���range request is not supported(���t���headR ���R���t���status_codet���AssertionErrort���_sessiont���_urlt���_chunk_sizet���intR ���t���_lengthR���t���_filet���truncatet���_leftt���_rightt���getR����t ���_check_zip(���t���selfR���R���t ���chunk_sizeR#���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyt���__init__=���s���� c���������C���s���d�S(���s!���Opening mode, which is always rb.t���rb(����(���R1���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyt���modeL���s����c���������C���s ���|��j��j�S(���s���Path to the underlying file.(���R+���R���(���R1���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyR���R���s����c���������C���s���t��S(���s9���Return whether random access is supported, which is True.(���t���True(���R1���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyt���seekableX���s����c���������C���s���|��j��j����d�S(���s���Close the file.N(���R+���t���close(���R1���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyR8���]���s����c���������C���s ���|��j��j�S(���s���Whether the file is closed.(���R+���t���closed(���R1���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyR9���b���s����i����c���������C���s����t��|�|��j���}�|��j����|��j�}�}�|�d�k��r:�|�n�t�|�|�|���}�t��d�|�|���}�|��j�|�|�d���|��j�j�|���S(���s����Read up to size bytes from the object and return them. As a convenience, if size is unspecified or -1, all bytes until EOF are returned. Fewer than size bytes may be returned if EOF is reached. i����i���(���t���maxR(���t���tellR*���t���mint ���_downloadR+���t���read(���R1���t���sizet ���download_sizet���startt���lengtht���stop(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyR>���h���s����%c���������C���s���t��S(���s3���Return whether the file is readable, which is True.(���R6���(���R1���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyt���readablew���s����i����c���������C���s���|��j��j�|�|���S(���s-��Change stream position and return the new absolute position. Seek to offset relative position indicated by whence: * 0: Start of stream (the default). pos should be >= 0; * 1: Current position - pos may be negative; * 2: End of stream - pos usually negative. (���R+���t���seek(���R1���t���offsett���whence(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyRE���|���s���� c���������C���s ���|��j��j����S(���s���Return the current possition.(���R+���R;���(���R1���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyR;�������s����c���������C���s���|��j��j�|���S(���s����Resize the stream to the given size in bytes. If size is unspecified resize to the current position. The current stream position isn't changed. Return the new file size. (���R+���R,���(���R1���R?���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyR,�������s���� c���������C���s���t��S(���s ���Return False.(���t���False(���R1���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyt���writable����s����c���������C���s���|��j��j����|��S(���N(���R+���t ���__enter__(���R1���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyRJ�������s���� c���������G���s���|��j��j�|����S(���N(���R+���t���__exit__(���R1���t���exc(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyRK�������s����c���������c���s*���|��j�����}�z �d�VWd�|��j�|���Xd�S(���sy���Return a context manager keeping the position. At the end of the block, seek back to original position. N(���R;���RE���(���R1���t���pos(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyt���_stay����s���� c������ ���C���s}���|��j��d�}�xi�t�t�d�|�|��j�����D]L�}�|��j�|�|���|��j�����(�y�t�|����Wn�t�k �rm�n�XPWd�QXq)�Wd�S(���s1���Check and download until the file is a valid ZIP.i���i����N(���R*���t���reversedR ���R(���R=���RN���R���R���(���R1���t���endRA���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyR0�������s���� " c���������C���sK���|�j�����}�d�j�|�|���|�d�<d�|�d�<|��j�j�|��j�d�|�d�t��S(���s:���Return HTTP response to a range request from start to end.s���bytes={}-{}t���Ranges���no-caches ���Cache-ControlR ���t���stream(���t���copyt���formatR&���R/���R'���R6���(���R1���RA���RP���t���base_headersR ���(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyt���_stream_response����s���� c��� ������c���s����|��j��|�|�!|��j�|�|�!}�}�t�|�g�|�d� ��}�}�t�|�g�|�d���}�xE�t�|�|���D]4�\�}�} �|�|�k�r��|�|�d�f�Vn��| �d�}�qc�W|�|�k�r��|�|�f�Vn��|�g�|�g�|��j��|�|�+|��j�|�|�+d�S(���s/��Return an iterator of intervals to be fetched. Args: start (int): Start of needed interval end (int): End of needed interval left (int): Index of first overlapping downloaded data right (int): Index after last overlapping downloaded data i���i����N(���R-���R.���R<���R:���t���zip( ���R1���RA���RP���t���leftt���rightt���lslicet���rslicet���it���jt���k(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyt���_merge����s���� !c������ ���C���s����|��j��������t�|��j�|���}�t�|��j�|���}�x|�|��j�|�|�|�|���D]b�\�}�}�|��j�|�|���}�|�j����|��j�|���x*�t �|�|��j ���D]�}�|��j�j�|���q��WqJ�WWd�QXd�S(���s-���Download bytes from start to end inclusively.N( ���RN���R���R.���R���R-���R_���RV���R���RE���R���R(���R+���t���write(���R1���RA���RP���RX���RY���t���responset���chunk(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyR=�������s���� % N(���R���R���t���__doc__R���R3���t���propertyR5���R���R7���R8���R9���R>���RD���RE���R;���t���NoneR,���RI���RJ���RK���R���RN���R0���R ���RV���R_���R=���(����(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyR���4���s(��� N()���Rc���t���__all__t���bisectR���R���t ���contextlibR���t���tempfileR���t���zipfileR���R���t���pip._vendor.requests.modelsR���t���pip._vendor.six.movesR ���t���pip._internal.network.utilsR ���R���R���t���pip._internal.utils.typingR ���t���pip._internal.utils.wheelR���t���typingR���R���R���R���R���R���t���pip._vendor.pkg_resourcesR���R���t���pip._internal.network.sessionR���t ���ExceptionR����R���t���objectR���(����(����(����s����/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/lazy_wheel.pyt���<module>���s$���.