Your IP : 18.118.186.156


Current Path : /opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pyc

�
�Rec@s�ddlZddlZddlZddlmZddlmZddlm	Z	m
Z
mZddlm
Z
ddlmZddlmZmZer�ddlmZmZmZmZdd	lmZdd
lmZnde
fd��YZdS(
i����N(tparse(tWHEEL_EXTENSION(tredact_auth_from_urltsplit_auth_from_netloctsplitext(tKeyBasedCompareMixin(tMYPY_CHECK_RUNNING(tpath_to_urlturl_to_path(tOptionaltTexttTupletUnion(tHTMLPage(tHashestLinkcBs�eZdZddddddgZd"d"d"ed�Zd�Zd	�Ze	d
��Z
e	d��Ze	d��Ze	d
��Z
e	d��Ze	d��Zd�Ze	d��Ze	d��Zejd�Ze	d��Zejd�Ze	d��Zejd�Ze	d��Ze	d��Ze	d��Ze	d��Zd�Ze	d��Ze	d��Z e	d��Z!e	d ��Z"d!�Z#RS(#s?Represents a parsed link from a Package Index's simple URL
    t_parsed_urlt_urlt
comes_fromtrequires_pythont
yanked_reasontcache_link_parsingcCs�|jd�rt|�}ntj|�|_||_||_|rN|nd|_||_	t
t|�jd|dt�||_
dS(s�
        :param url: url of the resource pointed to (href of the link)
        :param comes_from: instance of HTMLPage where the link was found,
            or string.
        :param requires_python: String containing the `Requires-Python`
            metadata field, specified in PEP 345. This may be specified by
            a data-requires-python attribute in the HTML link tag, as
            described in PEP 503.
        :param yanked_reason: the reason the file has been yanked, if the
            file has been yanked, or None if the file hasn't been yanked.
            This is the value of the "data-yanked" attribute, if present, in
            a simple repository HTML link. If the file has been yanked but
            no reason was provided, this should be the empty string. See
            PEP 592 for more information and the specification.
        :param cache_link_parsing: A flag that is used elsewhere to determine
                                   whether resources retrieved from this link
                                   should be cached. PyPI index urls should
                                   generally have this set to False, for
                                   example.
        s\\tkeytdefining_classN(t
startswithRturllib_parseturlsplitRRRtNoneRRtsuperRt__init__R(tselfturlRRRR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pyR$s			cCsc|jrdj|j�}nd}|jrLdjt|j�|j|�Stt|j��SdS(Ns (requires-python:{})ts{} (from {}){}(RtformatRRRtstr(Rtrp((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pyt__str__Ss		cCs
dj|�S(Ns	<Link {}>(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/models/link.pyt__repr___scCs|jS(N(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/models/link.pyRcscCsq|jjd�}tj|�}|s@t|j�\}}|Stj|�}|smtdj	t
����|S(Nt/s&URL {self._url!r} produced no filename(tpathtrstript	posixpathtbasenameRtnetlocRtunquotetAssertionErrorR!tlocals(RR'tnameR+t	user_pass((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pytfilenamehs	cCs
t|j�S(N(RR(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/models/link.pyt	file_pathxscCs
|jjS(N(Rtscheme(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/models/link.pyR3}scCs
|jjS(s4
        This can contain auth information.
        (RR+(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/models/link.pyR+�scCstj|jj�S(N(RR,RR'(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/models/link.pyR'�scCsttj|jjd���S(NR&(RR)R*R'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/models/link.pyR�scCs|j�dS(Ni(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/models/link.pytext�scCs4|j\}}}}}tj||||df�S(N(RRt
urlunsplitR(RR3R+R'tquerytfragment((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pyturl_without_fragment�ss[#&]egg=([^&]*)cCs,|jj|j�}|sdS|jd�S(Ni(t_egg_fragment_retsearchRRtgroup(Rtmatch((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pytegg_fragment�ss[#&]subdirectory=([^&]*)cCs,|jj|j�}|sdS|jd�S(Ni(t_subdirectory_fragment_reR:RRR;(RR<((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pytsubdirectory_fragment�ss2(sha1|sha224|sha384|sha256|sha512|md5)=([a-f0-9]+)cCs,|jj|j�}|r(|jd�SdS(Ni(t_hash_reR:RR;R(RR<((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pythash�s
cCs,|jj|j�}|r(|jd�SdS(Ni(R@R:RR;R(RR<((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pyt	hash_name�s
cCs0tj|jjdd�djdd�d�S(Nt#iit?(R)R*Rtsplit(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/models/link.pytshow_url�scCs
|jdkS(Ntfile(R3(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/models/link.pytis_file�scCs|jotjj|j�S(N(RHtosR'tisdirR2(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/models/link.pytis_existing_dir�scCs
|jtkS(N(R4R(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/models/link.pytis_wheel�scCs ddlm}|j|jkS(Ni����(tvcs(tpip._internal.vcsRMR3tall_schemes(RRM((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pytis_vcs�scCs
|jdk	S(N(RR(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/models/link.pyt	is_yanked�scCs
|jdk	S(N(RBR(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/models/link.pythas_hash�scCs]|dks|jrtS|jdk	s/t�|jdk	sDt�|j|jd|j�S(sG
        Return True if the link has a hash and it is allowed.
        t
hex_digestN(RRRtFalseRBR-RAtis_hash_allowed(Rthashes((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pyRU�s
N($t__name__t
__module__t__doc__t	__slots__RtTrueRR$R%tpropertyRR1R2R3R+R'RR4R8tretcompileR9R=R>R?R@RARBRFRHRKRLRPRQRRRU(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pyRsL	)					(RIR)R]tpip._vendor.six.moves.urllibRRtpip._internal.utils.filetypesRtpip._internal.utils.miscRRRtpip._internal.utils.modelsRtpip._internal.utils.typingRtpip._internal.utils.urlsRRttypingR	R
RRtpip._internal.index.collectorR
tpip._internal.utils.hashesRR(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pyt<module>s"

?>