관리-도구
편집 파일: _inputstream.cpython-36.pyc
3 �Rea~ � @ s� d dl mZmZmZ d dlmZ d dlmZmZ d dl Z d dl Z d dlmZm Z d dlmZ ddlmZmZmZmZ dd lmZ dd lmZ edd� eD ��Zed d� eD ��Zedd� eD ��Zeeddg�B ZdZej�redE dkr�ejd�dks�t �e j!eddF� e"d� d �Z#n e j!e�Z#ddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3h Z$e j!d4�Z%i Z&G d5d6� d6e'�Z(d7d8� Z)G d9d:� d:e'�Z*G d;d<� d<e*�Z+G d=d>� d>e,�Z-G d?d@� d@e'�Z.G dAdB� dBe'�Z/dCdD� Z0dS )G� )�absolute_import�division�unicode_literals)� text_type)�http_client�urllibN)�BytesIO�StringIO)�webencodings� )�EOF�spaceCharacters�asciiLetters�asciiUppercase)�_ReparseException)�_utilsc C s g | ]}|j d ��qS )�ascii)�encode)�.0�item� r ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/html5lib/_inputstream.py� <listcomp> s r c C s g | ]}|j d ��qS )r )r )r r r r r r s c C s g | ]}|j d ��qS )r )r )r r r r r r s � >� <u� [----]�]z"\uD800-\uDFFF"i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� i�� z[ - -/:-@\[-`{-~]c @ sH e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dS )�BufferedStreamz�Buffering for streams that do not have buffering of their own The buffer is implemented as a list of chunks on the assumption that joining many strings will be slow since it is O(n**2) c C s || _ g | _ddg| _d S )Nr r ���)�stream�buffer�position)�selfr r r r �__init__: s zBufferedStream.__init__c C s@ d}x(| j d | jd � D ]}|t|�7 }qW || jd 7 }|S )Nr r )r r �len)r! �pos�chunkr r r �tell? s zBufferedStream.tellc C sX || j � kst�|}d}x0t| j| �|k rH|t| j| �8 }|d7 }qW ||g| _d S )Nr r )�_bufferedBytes�AssertionErrorr# r r )r! r$ �offset�ir r r �seekF s zBufferedStream.seekc C sT | j s| j|�S | jd t| j �krF| jd t| j d �krF| j|�S | j|�S d S )Nr r r )r �_readStreamr r# �_readFromBuffer)r! �bytesr r r �readO s zBufferedStream.readc C s t dd� | jD ��S )Nc S s g | ]}t |��qS r )r# )r r r r r r Y s z1BufferedStream._bufferedBytes.<locals>.<listcomp>)�sumr )r! r r r r'