Edit File: __init__.pyc
� ��abc�����������@��s6��d��Z��d�d�l�m�Z�d�d�l�Z�d�d�l�m�Z�d�Z�i�d�d�6d �d �6d�d�6d �d�6Z�i��Z�d����Z �d����Z �d����Z�d�e�f�d�������YZ �e �d���Z�e �d���Z�e �d���Z�d�d���Z�d����Z�e�d�d���Z�d�d���Z�d����Z�e�d�d���Z�d����Z�d �e�f�d!�������YZ�d"�e�f�d#�������YZ�d�S($���u�� webencodings ~~~~~~~~~~~~ This is a Python implementation of the `WHATWG Encoding standard <http://encoding.spec.whatwg.org/>`. See README for details. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. i����(���t���unicode_literalsNi���(���t���LABELSu���0.5u ���iso-8859-8u���iso-8859-8-iu���mac-cyrillicu���x-mac-cyrillicu ���mac-romanu ���macintoshu���cp874u���windows-874c���������C��s���|��j��d���j����j�d���S(���u9��Transform (only) ASCII letters to lower case: A-Z is mapped to a-z. :param string: An Unicode string. :returns: A new Unicode string. This is used for `ASCII case-insensitive <http://encoding.spec.whatwg.org/#ascii-case-insensitive>`_ matching of encoding labels. The same matching is also used, among other things, for `CSS keywords <http://dev.w3.org/csswg/css-values/#keywords>`_. This is different from the :meth:`~py:str.lower` method of Unicode strings which also affect non-ASCII characters, sometimes mapping them into the ASCII range: >>> keyword = u'Bac\N{KELVIN SIGN}ground' >>> assert keyword.lower() == u'background' >>> assert ascii_lower(keyword) != keyword.lower() >>> assert ascii_lower(keyword) == u'bac\N{KELVIN SIGN}ground' u���utf8(���t���encodet���lowert���decode(���t���string(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyt���ascii_lower#���s����c���������C��s����t��|��j�d�����}��t�j�|����}�|�d�k�r4�d�St�j�|���}�|�d�k�r��|�d�k�rn�d�d�l�m�}�n!�t�j�|�|���}�t �j �|���}�t�|�|���}�|�t�|�<n��|�S(���u<�� Look for an encoding by its label. This is the spec’s `get an encoding <http://encoding.spec.whatwg.org/#concept-encoding-get>`_ algorithm. Supported labels are listed there. :param label: A string. :returns: An :class:`Encoding` object, or :obj:`None` for an unknown label. u��� u���x-user-definedi���(���t ���codec_infoN(���R���t���stripR���t���gett���Nonet���CACHEt���x_user_definedR���t���PYTHON_NAMESt���codecst���lookupt���Encoding(���t���labelt���namet���encodingR���t���python_name(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyR���=���s���� c���������C��sB���t��|��d���r�|��St�|����}�|�d�k�r>�t�d�|������n��|�S(���u���� Accept either an encoding object or label. :param encoding: An :class:`Encoding` object or a label string. :returns: An :class:`Encoding` object. :raises: :exc:`~exceptions.LookupError` for an unknown label. u ���codec_infou���Unknown encoding label: %rN(���t���hasattrR���R ���t���LookupError(���t���encoding_or_labelR���(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyt ���_get_encoding[���s���� R���c�����������B��s ���e��Z�d��Z�d����Z�d����Z�RS(���uO��Reresents a character encoding such as UTF-8, that can be used for decoding or encoding. .. attribute:: name Canonical name of the encoding .. attribute:: codec_info The actual implementation of the encoding, a stdlib :class:`~codecs.CodecInfo` object. See :func:`codecs.register`. c���������C��s���|�|��_��|�|��_�d��S(���N(���R���R���(���t���selfR���R���(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyt���__init__|���s���� c���������C��s���d�|��j��S(���Nu ���<Encoding %s>(���R���(���R���(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyt���__repr__����s����(���t���__name__t ���__module__t���__doc__R���R���(����(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyR���m���s��� u���utf-8u���utf-16leu���utf-16beu���replacec���������C��sG���t��|���}�t�|����\�}�}��|�p'�|�}�|�j�j�|��|���d�|�f�S(���u��� Decode a single string. :param input: A byte string :param fallback_encoding: An :class:`Encoding` object or a label string. The encoding to use if :obj:`input` does note have a BOM. :param errors: Type of error handling. See :func:`codecs.register`. :raises: :exc:`~exceptions.LookupError` for an unknown encoding label. :return: A ``(output, encoding)`` tuple of an Unicode string and an :obj:`Encoding`. i����(���R���t���_detect_bomR���R���(���t���inputt���fallback_encodingt���errorst���bom_encodingR���(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyR�������s����c���������C��sa���|��j��d���r�t�|��d�f�S|��j��d���r:�t�|��d�f�S|��j��d���rW�t�|��d�f�Sd�|��f�S(���uB���Return (bom_encoding, input), with any BOM removed from the input.s�����i���s�����s���i���N(���t ���startswitht���_UTF16LEt���_UTF16BEt���UTF8R ���(���R ���(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyR�������s����u���strictc���������C��s���t��|���j�j�|��|���d�S(���u;�� Encode a single string. :param input: An Unicode string. :param encoding: An :class:`Encoding` object or a label string. :param errors: Type of error handling. See :func:`codecs.register`. :raises: :exc:`~exceptions.LookupError` for an unknown encoding label. :return: A byte string. i����(���R���R���R���(���R ���R���R"���(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyR�������s����c���������C��s4���t��|�|���}�t�|��|���}�t�|���}�|�|�f�S(���u��� "Pull"-based decoder. :param input: An iterable of byte strings. The input is first consumed just enough to determine the encoding based on the precense of a BOM, then consumed on demand when the return value is. :param fallback_encoding: An :class:`Encoding` object or a label string. The encoding to use if :obj:`input` does note have a BOM. :param errors: Type of error handling. See :func:`codecs.register`. :raises: :exc:`~exceptions.LookupError` for an unknown encoding label. :returns: An ``(output, encoding)`` tuple. :obj:`output` is an iterable of Unicode strings, :obj:`encoding` is the :obj:`Encoding` that is being used. (���t���IncrementalDecodert���_iter_decode_generatort���next(���R ���R!���R"���t���decodert ���generatorR���(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyt���iter_decode����s����c���������c��s����|�j��}�t�|����}��x��|��D]>�}�|�|���}�|�r�|�j�d�k �sI�t���|�j�V|�VPq�q�W|�d�d�t��}�|�j�d�k �s��t���|�j�V|�r��|�Vn��d�Sx(�|��D] �}�|�|���}�|�r��|�Vq��q��W|�d�d�t��}�|�r��|�Vn��d�S(���uq���Return a generator that first yields the :obj:`Encoding`, then yields output chukns as Unicode strings. t����t���finalN(���R���t���iterR���R ���t���AssertionErrort���True(���R ���R+���R���t���chunckt���output(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyR)�������s,���� c���������C��s���t��|�|���j�}�t�|��|���S(���uY�� “Pull”-based encoder. :param input: An iterable of Unicode strings. :param encoding: An :class:`Encoding` object or a label string. :param errors: Type of error handling. See :func:`codecs.register`. :raises: :exc:`~exceptions.LookupError` for an unknown encoding label. :returns: An iterable of byte strings. (���t���IncrementalEncoderR���t���_iter_encode_generator(���R ���R���R"���R���(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyt���iter_encode����s����c���������c��sO���x(�|��D] �}�|�|���}�|�r�|�Vq�q�W|�d�d�t���}�|�rK�|�Vn��d��S(���Nu����R/���(���R2���(���R ���R���R3���R4���(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyR6�����s���� R(���c�����������B��s&���e��Z�d��Z�d�d���Z�e�d���Z�RS(���uO�� “Push”-based decoder. :param fallback_encoding: An :class:`Encoding` object or a label string. The encoding to use if :obj:`input` does note have a BOM. :param errors: Type of error handling. See :func:`codecs.register`. :raises: :exc:`~exceptions.LookupError` for an unknown encoding label. u���replacec���������C��s7���t��|���|��_�|�|��_�d�|��_�d��|��_�d��|��_�d��S(���NR.���(���R���t���_fallback_encodingt���_errorst���_bufferR ���t���_decoderR���(���R���R!���R"���(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyR�����s ���� c���������C��s����|��j��}�|�d�k �r"�|�|�|���S|��j�|�}�t�|���\�}�}�|�d�k�r�t�|���d�k��rs�|�rs�|�|��_�d�S|��j�}�n��|�j�j�|��j���j �}�|�|��_��|�|��_ �|�|�|���S(���u����Decode one chunk of the input. :param input: A byte string. :param final: Indicate that no more input is available. Must be :obj:`True` if this is the last call. :returns: An Unicode string. i���u����N(���R;���R ���R:���R���t���lenR8���R���t���incrementaldecoderR9���R���R���(���R���R ���R/���R+���R���(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyR���'��s���� (���R���R���R���R���t���FalseR���(����(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyR(�����s��� R5���c�����������B��s���e��Z�d��Z�e�d�d���Z�RS(���u��� “Push”-based encoder. :param encoding: An :class:`Encoding` object or a label string. :param errors: Type of error handling. See :func:`codecs.register`. :raises: :exc:`~exceptions.LookupError` for an unknown encoding label. .. method:: encode(input, final=False) :param input: An Unicode string. :param final: Indicate that no more input is available. Must be :obj:`True` if this is the last call. :returns: A byte string. u���strictc���������C��s(���t��|���}�|�j�j�|���j�|��_�d��S(���N(���R���R���t���incrementalencoderR���(���R���R���R"���(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyR���T��s����(���R���R���R���R'���R���(����(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyR5���C��s���(���R���t ���__future__R����R���t���labelsR���t���VERSIONR ���R���R���R���R���t���objectR���R'���R%���R&���R���R���R���R-���R)���R7���R6���R(���R5���(����(����(����sE���/usr/lib/python2.7/site-packages/pip/_vendor/webencodings/__init__.pyt���<module> ���s4��� 3