????

Your IP : 216.73.216.152


Current Path : /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/rfc3986/
Upload File :
Current File : //usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/rfc3986/uri.pyc

�
}�\]c@sdZddlmZddlmZddlmZddlmZddlmZdedej	�efd	��YZ
d
S(s?Module containing the implementation of the URIReference class.i����(t
namedtuplei(tcompat(tmisc(tnormalizers(tURIMixintURIReferencecBsMeZdZdZdd�ZejZd�Zd�Ze	dd��Z
RS(s�Immutable object representing a parsed URI Reference.

    .. note::

        This class is not intended to be directly instantiated by the user.

    This object exposes attributes for the following components of a
    URI:

    - scheme
    - authority
    - path
    - query
    - fragment

    .. attribute:: scheme

        The scheme that was parsed for the URI Reference. For example,
        ``http``, ``https``, ``smtp``, ``imap``, etc.

    .. attribute:: authority

        Component of the URI that contains the user information, host,
        and port sub-components. For example,
        ``google.com``, ``127.0.0.1:5000``, ``username@[::1]``,
        ``username:password@example.com:443``, etc.

    .. attribute:: path

        The path that was parsed for the given URI Reference. For example,
        ``/``, ``/index.php``, etc.

    .. attribute:: query

        The query component for a given URI Reference. For example, ``a=b``,
        ``a=b%20c``, ``a=b+c``, ``a=b,c=d,e=%20f``, etc.

    .. attribute:: fragment

        The fragment component of a URI. For example, ``section-3.1``.

    This class also provides extra attributes for easier access to information
    like the subcomponents of the authority component.

    .. attribute:: userinfo

        The user information parsed from the authority.

    .. attribute:: host

        The hostname, IPv4, or IPv6 adddres parsed from the authority.

    .. attribute:: port

        The port parsed from the authority.
    sutf-8c
CsFtt|�j||pd|p$d|p-d||�}||_|S(sCreate a new URIReference.N(tsuperRt__new__tNonetencoding(tclstschemet	authoritytpathtquerytfragmentR	tref((sG/tmp/pip-install-ewDPok/pip/pip/_vendor/urllib3/packages/rfc3986/uri.pyRUs					cCs�|}t|t�r$t|�}nWt|t�s{ytj|�}Wq{tk
rwtdjt|�j���q{Xnt|�t|�k}|p�|j|�S(s"Compare this reference to another.s)Unable to compare URIReference() to {0}()(	t
isinstancettupleRtfrom_stringt	TypeErrortformatttypet__name__tnormalized_equality(tselftothert	other_reftnaive_equality((sG/tmp/pip-install-ewDPok/pip/pip/_vendor/urllib3/packages/rfc3986/uri.pyt__eq__ds
c	Cssttj|jpd�tj|j|j|jf�tj|j	pHd�tj
|j�tj|j
�|j�S(sNormalize this reference as described in Section 6.2.2.

        This is not an in-place normalization. Instead this creates a new
        URIReference.

        :returns: A new reference object with normalized components.
        :rtype: URIReference
        t(RRtnormalize_schemeRtnormalize_authoritytuserinfothosttporttnormalize_pathR
tnormalize_queryRtnormalize_fragmentRR	(R((sG/tmp/pip-install-ewDPok/pip/pip/_vendor/urllib3/packages/rfc3986/uri.pyt	normalizeuscCs{tj||�}tjj|�j�}||d|dtj|d|�tj|d|�tj|d|�|�S(s	Parse a URI reference from the given unicode URI string.

        :param str uri_string: Unicode URI to be parsed into a reference.
        :param str encoding: The encoding of the string provided
        :returns: :class:`URIReference` or subclass thereof
        RRR
RR(Rtto_strRtURI_MATCHERtmatcht	groupdictRtencode_component(R
t
uri_stringR	t	split_uri((sG/tmp/pip-install-ewDPok/pip/pip/_vendor/urllib3/packages/rfc3986/uri.pyR�s((Rt
__module__t__doc__tslotsRRt__hash__RR'tclassmethodR(((sG/tmp/pip-install-ewDPok/pip/pip/_vendor/urllib3/packages/rfc3986/uri.pyRs8			N(R0tcollectionsRRRRRt_mixinRtURI_COMPONENTSR(((sG/tmp/pip-install-ewDPok/pip/pip/_vendor/urllib3/packages/rfc3986/uri.pyt<module>s