Rec@@s\ddlmZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl mZddlmZddlmZddlmZddlmZddlmZmZdd lmZmZmZmZmZdd l m!Z"dd l#m$Z%dd l&m'Z'dd l(m)Z)ddl*m+Z+m,Z,m-Z-m.Z.ddl/m0Z0m1Z1m2Z2m3Z3ddl4m5Z5m6Z6ddl7m8Z8m9Z9erddlm:Z;nddlm;Z;e5rddl<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHddlImJZJeFeKeKeKfZLeGdZMndddddddddd d!d"d#d$gZNejOePZQd%ZRd&ZSd'ZTd(ZUed)d*d+d,eVd-ZWd.ZXd/ZYd0ZZd1d2Z[d3Z\d4Z]d5Z^d6Z_d7Z`d8Zad9Zbd:Zcejdd;Zeefd<Zgd=Zhd>Zid?Zjd@ZkdAZldBZmdCZndDZoefe2efeVeVddEZqdFZrdGZsdHZtdIZudJZvdKewfdLYZxdMe;fdNYZyejzdOZ{dPZ|dQZ}ddRZ~dSZdTZdUZdVdWZdXZdYZdZZd[Zd\Zd]Zd^Zd_Zd`ZdaewfdbYZdcZddZdeZdfZdmdiZdjZdkZdlZdS(ni(tabsolute_importN(tdeque(ttee(t pkg_resources(tcanonicalize_name(tretry(tPY2t text_type(tfiltert filterfalsetinputtmapt zip_longest(tparse(tunquote(t __version__(t CommandError(tdistutils_schemetget_major_minor_versiont site_packagest user_site(tWINDOWSt expandusert stdlib_pkgststr_to_display(tMYPY_CHECK_RUNNINGtcast(trunning_under_virtualenvtvirtualenv_no_global(tBytesIO(tStringIO( tAnytAnyStrtCallablet ContainertIterabletIteratortListtOptionaltTexttTupletTypeVartUnion(t DistributiontTtrmtreet display_patht backup_dirtasktsplitextt format_sizetis_installable_dirtnormalize_pathtrenamestget_progtcaptured_stdoutt ensure_dirtget_installed_versiontremove_auth_from_urlcC@sLtjjtjjtdd}tjj|}djt|tS(Ns..spip {} from {} (python {})( tostpathtjointdirnamet__file__tabspathtformatRR(t pip_pkg_dir((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pytget_pip_versionOs$cC@sYt|dkr-|dt|d7}nt|dkrL|d }ntd|S(sx Convert a tuple of ints representing a Python version to one of length three. :param py_version_info: a tuple of ints representing a Python version, or None to specify no version. The tuple can have any length. :return: a tuple of length three if `py_version_info` is non-None. Otherwise, return `py_version_info` unchanged (i.e. None). iit VersionInfo(i(tlenR(tpy_version_info((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pytnormalize_version_info[s  cC@sUytj|Wn=tk rP}|jtjkrQ|jtjkrQqQnXdS(s os.path.makedirs without EEXIST.N(R;tmakedirstOSErrorterrnotEEXISTt ENOTEMPTY(R<te((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyR8os $cC@s^y=tjjtjd}|dkr8djtjS|SWnttt fk rYnXdS(Nis __main__.pys-cs {} -m piptpip(s __main__.pys-c( R;R<tbasenametsystargvRAt executabletAttributeErrort TypeErrort IndexError(tprog((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyR6zs tstop_max_delayi t wait_fixedicC@stj|d|dtdS(Nt ignore_errorstonerror(tshutilR-trmtree_errorhandler(tdirRY((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyR-scC@sgytj|jtj@ }Wnttfk r8dSX|r`tj|tj||dSdS(sOn Windows, the files in .svn are read-only, so when rmtree() tries to remove them, an exception is thrown. We catch that here, remove the read-only attribute, and hopefully continue without problems.N(R;tstattst_modetS_IWRITEtIOErrorRItchmod(tfuncR<texc_infothas_attr_readonly((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyR\s cC@s|dkrdSt|tr#|Sy|jtjd}Wn;tk r|trmtdj |}q}t |}nX|S(s Convert a bytes (or text) path to text (unicode in Python 2) for display and logging purposes. This function should never error out. Also, this function is mainly needed for Python 2 since in Python 3 str paths are already text. tstrictsb{!r}N( tNonet isinstanceRtdecodeRPtgetfilesystemencodingtUnicodeDecodeErrorRRRAtascii(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/utils/misc.pytpath_to_displays  cC@stjjtjj|}tjddkrd|jtjd}|jtj d}n|j tj tjj rd|t tj }n|S(sTGives the display value for a given path, making it relative to cwd if possible.iitreplacet.(R;R<tnormcaseR@RPt version_infoRiRjtencodetgetdefaultencodingt startswithtgetcwdtsepRE(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/utils/misc.pyR.ss.bakcC@sKd}|}x4tjj||rB|d7}|t|}qW||S(s\Figure out the name of a directory to back up the given dir to (adding .bak, .bak2, etc)i(R;R<texistststr(R]texttnt extension((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyR/s  cC@sCx3tjjddjD]}||kr|SqWt||S(NtPIP_EXISTS_ACTIONt(R;tenvirontgettsplitR0(tmessagetoptionstaction((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pytask_path_existss" cC@s.tjjdr*tdj|ndS(s&Raise an error if no input is allowed.t PIP_NO_INPUTs7No input was expected ($PIP_NO_INPUT set); question: {}N(R;R~Rt ExceptionRA(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/utils/misc.pyt_check_no_inputscC@s`xYt|t|}|jj}||krTdj|dj|GHq|SqWdS(s@Ask the message interactively, with the given possible responsess>Your response ({!r}) was not one of the expected responses: {}s, N(RR tstriptlowerRAR=(RRtresponse((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyR0s   cC@st|t|S(sAsk for input interactively.(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/utils/misc.pyt ask_inputs cC@st|tj|S(s!Ask for a password interactively.(Rtgetpass(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/utils/misc.pyt ask_passwords cC@sx|dkr!dj|ddS|d krDdjt|dS|dkradj|dSdjt|SdS( Nis {:.1f} MBg@@i s{} kBs {:.1f} kBs{} bytesi@Bi'(RAtint(tbytes((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyR2s   cC@sg|D]}ttt|^q}gtdd|D]}ttt|^q;}g|D]*}djttj||j^qc}||fS(sReturn a list of formatted rows and a list of column sizes. For example:: >>> tabulate([['foobar', 2000], [0xdeadbeef]]) (['foobar 2000', '3735928559'], [10, 4]) t fillvalueR}t ( ttupleR RxR tmaxRER=tljusttrstrip(trowstrowtcoltsizesttable((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyttabulates (47cC@sptjj|stStjj|d}tjj|rAtStjj|d}tjj|rltStS(sBIs path is a directory containing setup.py or pyproject.toml? ssetup.pyspyproject.toml(R;R<tisdirtFalseR=tisfiletTrue(R<tsetup_pytpyproject_toml((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyR3)scc@s/x(tr*|j|}|s"Pn|VqWdS(s7Yield pieces of data from a file-like object until EOF.N(Rtread(tfiletsizetchunk((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyt read_chunks8s  cC@sIt|}|r'tjj|}ntjj|}tjj|S(sN Convert a path to its canonical, case-normalized, absolute version. (RR;R<trealpathR@Rp(R<tresolve_symlinks((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyR4As  cC@sOtj|\}}|jjdrE|d|}|d }n||fS(s,Like os.path.splitext, but take off .tar toos.tari(t posixpathR1Rtendswith(R<tbaseRy((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyR1Os  cC@stjj|\}}|rG|rGtjj| rGtj|ntj||tjj|\}}|r|rytj|Wqtk rqXndS(s7Like os.renames(), but handles renaming across devices.N( R;R<RRwRHR[tmovet removedirsRI(toldtnewtheadttail((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyR5Ys  cC@s#ts tS|jttjS(s Return True if path is within sys.prefix, if we're running in a virtualenv. If we're not in a virtualenv, all paths are considered "local." Caution: this function assumes the head of path has been normalized with normalize_path. (RRRtR4RPtprefix(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/utils/misc.pytis_localks cC@stt|S(s Return True if given Distribution object is installed locally (i.e. within current virtualenv). Always True if we're not in a virtualenv. (Rt dist_location(tdist((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyt dist_is_localzs cC@st|jttS(sF Return True if given Distribution is installed in user site. (RRtR4R(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/utils/misc.pytdist_in_usersitescC@st|jttS(s[ Return True if given Distribution is installed in sysconfig.get_python_lib(). (RRtR4R(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/utils/misc.pytdist_in_site_packagesscC@s<tt|}|jttddjddS(sf Return True if given Distribution is installed in path matching distutils_scheme layout. R}tpurelibtpythoni(R4RRtRR(Rt norm_path((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pytdist_in_install_paths cC@sJxCtjD]8}tjj||jd}tjj|r tSq WtS(sC Return True if given Distribution is an editable install. s .egg-link(RPR<R;R=t project_nameRRR(Rt path_itemtegg_link((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pytdist_is_editables c C@s|rtj|}n tj}|r0t}n d}|rKd}n d}|rfd} n d} |r~t} n d} g|D]K} || r| j|kr|| r| | r| | r| ^qS(s^ Return a list of installed Distribution objects. If ``local_only`` is True (default), only return installations local to the current virtualenv, if in a virtualenv. ``skip`` argument is an iterable of lower-case project names to ignore; defaults to stdlib_pkgs If ``include_editables`` is False, don't report editables. If ``editables_only`` is True , only report editables. If ``user_only`` is True , only report installations in the user site directory. If ``paths`` is set, only report the distributions present at the specified list of locations. cS@stS(N(R(td((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyt local_testscS@stS(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/utils/misc.pyt editable_testscS@s t| S(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/utils/misc.pyRscS@s t|S(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/utils/misc.pyteditables_only_testscS@stS(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/utils/misc.pyRscS@stS(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/utils/misc.pyt user_tests(Rt WorkingSett working_setRRtkey( t local_onlytskiptinclude_editablesteditables_onlyt user_onlytpathsRRRRRR((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pytget_installed_distributionss*             c C@sVt|}tdtdddtdtdtdd }d|D}|j|S( sFind a distribution matching the ``req_name`` in the environment. This searches from *all* distributions available in the environment, to match the behavior of ``pkg_resources.get_distribution()``. RRRRRRcS@s"i|]}|t|jqS((RR(t.0tp((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pys s (N(RRRRRgR(treq_nametpackagestpkg_dict((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyt_search_distributions  cC@sKt|}|sAytjj|WqAtjk r=dSXnt|S(sGiven a requirement name, return the installed Distribution object. This searches from *all* distributions available in the environment, to match the behavior of ``pkg_resources.get_distribution()``. N(RRRtrequiretDistributionNotFoundRg(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/utils/misc.pytget_distributions cC@sg}tr?|jtt rbtrb|jtqbn#trU|jtn|jtx@|D]8}tjj||jd}tjj |ri|SqiWdS(s Return the path for the .egg-link file if it exists, otherwise, None. There's 3 scenarios: 1) not in a virtualenv try to find in site.USER_SITE, then site_packages 2) in a no-global virtualenv try to find in site_packages 3) in a yes-global virtualenv try to find in site_packages, then site.USER_SITE (don't look in global location) For #1 and #3, there could be odd cases, where there's an egg-link in 2 locations. This method will just return the first one found. s .egg-linkN( RtappendRRRR;R<R=RRRg(Rtsitestsitetegglink((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyt egg_link_path$s    cC@s)t|}|rt|St|jS(sO Get the site-packages location of this distribution. Generally this is dist.location, except in the case of develop-installed packages, where dist.location is the source code location, and we want to know where the egg-link file is. The returned location is normalized (in particular, with symlinks removed). (RR4tlocation(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/utils/misc.pyRHs  cG@stj||dS(N(tloggertinfo(tmsgtargs((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyt write_outputXstFakeFilecB@s)eZdZdZdZdZRS(sQWrap a list of lines in an object with readline() to make ConfigParser happy.cC@st||_dS(N(titert_gen(tselftlines((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyt__init__`scC@s*yt|jSWntk r%dSXdS(NR}(tnextRt StopIteration(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/utils/misc.pytreadlinecs cC@s|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/utils/misc.pyt__iter__is(t__name__t __module__t__doc__RRR(((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyR]s  t StreamWrappercB@s&eZedZedZRS(cC@s||_|S(N(t orig_stream(tclsR((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyt from_streamos cC@s |jjS(N(Rtencoding(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/utils/misc.pyRus(RRt classmethodRtpropertyR(((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyRmscc@sRtt|}tt|tj|ztt|VWdtt||XdS(sReturn a context manager used by captured_stdout/stdin/stderr that temporarily replaces the sys stream *stream_name* with a StringIO. Taken from Lib/support/__init__.py in the CPython repo. N(tgetattrRPtsetattrRR(t stream_namet orig_stdout((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pytcaptured_outputzs cC@s tdS(sCapture the output of sys.stdout: with captured_stdout() as stdout: print('hello') self.assertEqual(stdout.getvalue(), 'hello ') Taken from Lib/support/__init__.py in the CPython repo. tstdout(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/utils/misc.pyR7s cC@s tdS(s See captured_stdout(). tstderr(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/utils/misc.pytcaptured_stderrscC@sMtjj|}|dkr-tj}n|j|}|rI|jSdS(sCGet the installed version of dist_name avoiding pkg_resources cacheN(Rt RequirementR RgRtfindtversion(t dist_nameRtreqR((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyR9s  cC@st|dddS(sConsume an iterable at C speed.tmaxleniN(R(titerator((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pytconsumescO@sTtt|tt||}d|jD}||ds treverse_mappingtEnum((tdicttziptrangeREtitemsttype(t sequentialtnamedtenumstreverse((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pytenums$ cC@s>|dkr|Sd|kr.dj|}ndj||S(s. Build a netloc from a host-port pair t:s[{}]s{}:{}N(RgRA(thosttport((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyt build_netlocs   thttpscC@sO|jddkr?d|kr?d|kr?dj|}ndj||S(s) Build a full URL from a netloc. Rit@t[s[{}]s{}://{}(tcountRA(tnetloctscheme((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pytbuild_url_from_netlocs-cC@s+t|}tj|}|j|jfS(s2 Return the host-port pair from a netloc. (Rt urllib_parseturlparsethostnameR(Rturltparsed((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyt parse_netlocs cC@s{d|kr|dfS|jdd\}}d|krO|jdd}n |df}td|D}||fS(sp Parse out and remove the auth information from a netloc. Returns: (netloc, (username, password)). RiRcs@s-|]#}|dkrdn t|VqdS(N(Rgturllib_unquote(Rtx((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pys sN(NN(RgtrsplitRR(Rtautht 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/utils/misc.pytsplit_auth_from_netlocs    cC@stt|\}\}}|dkr(|S|dkrCd}d}ntj|}d}djd|d|d|S( s Replace the sensitive data in a netloc with "****", if it exists. For example: - "user:pass@example.com" returns "user:****@example.com" - "accesstoken@example.com" returns "****@example.com" s****R}s:****s{user}{password}@{netloc}tusertpasswordRN(R+RgR tquoteRA(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/utils/misc.pyt redact_netlocs    cC@s\tj|}||j}|j|d|j|j|jf}tj|}||fS(sRTransform and replace netloc in a url. transform_netloc is a function taking the netloc and returning a tuple. The first element of this tuple is the new netloc. The entire tuple is returned. Returns a tuple containing the transformed url as item 0 and the original tuple returned by transform_netloc as item 1. i(R turlsplitRRR<tquerytfragmentt urlunsplit(R#ttransform_netloctpurlt netloc_tuplet url_piecestsurl((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyt_transform_urls %cC@s t|S(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/utils/misc.pyt _get_netloc$scC@s t|fS(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/utils/misc.pyt_redact_netloc(scC@s(t|t\}\}}|||fS(s Parse a url into separate netloc, auth, and url with no auth. Returns: (url_without_auth, netloc, (username, password)) (R9R:(R#turl_without_authRR)((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pytsplit_auth_netloc_from_url,scC@st|tdS(s7Return a copy of url with 'username:password@' removed.i(R9R:(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/utils/misc.pyR:7scC@st|tdS(s.Replace the password in a given url with ****.i(R9R;(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/utils/misc.pytredact_auth_from_url?st HiddenTextcB@s5eZdZdZdZdZdZRS(cC@s||_||_dS(N(tsecrettredacted(RR@RA((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyRFs cC@sdjt|S(Ns(RARx(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/utils/misc.pyt__repr__OscC@s|jS(N(RA(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/utils/misc.pyt__str__SscC@s,t|t|krtS|j|jkS(N(RRR@(Rtother((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyt__eq__XscC@s ||k S(N((RRD((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyt__ne__cs(RRRRBRCRERF(((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyR?Es    cC@st|ddS(NRAs****(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/utils/misc.pyt hide_valuehscC@st|}t|d|S(NRA(R>R?(R#RA((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pythide_urlms cC@sddjtjddjtjd g}|oWtoWtjjtjd|k}|rtjddgtjd}t d jd j |nd S( sProtection of pip.exe from modification on Windows On Windows, any operation modifying pip should be run as: python -m pip ... spip.exes pip{}.exeis pip{}.{}.exeis-mRNis3To modify pip, please run the following command: {}RN( RARPRqRR;R<RORQRRRR=(t modifying_pipt pip_namestshould_show_use_python_msgt new_command((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyt(protect_pip_from_modification_on_windowssscC@stjdk otjjS(s!Is this console interactive? N(RPtstdinRgtisatty(((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pytis_console_interactivesiicC@sntj}d}t|dA}x7t|d|D]#}|t|7}|j|q7WWdQX||fS(s:Return (hash, length) for path using hashlib.sha256() itrbRN(thashlibtsha256topenRREtupdate(R<t blocksizethtlengthtftblock((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyt hash_files cC@s)yddl}Wntk r$tSXtS(s8 Return whether the wheel package is installed. iN(twheelt ImportErrorRR(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/utils/misc.pytis_wheel_installeds  cC@st|}t||S(sb Return paired elements. For example: s -> (s0, s1), (s2, s3), (s4, s5), ... (RR (titerable((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pytpairwises cC@s.t|\}}t||t||fS(s Use a predicate to partition entries into false entries and true entries, like partition(is_odd, range(10)) --> 0 2 4 6 8 and 1 3 5 7 9 (RR R(tpredR_tt1tt2((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyt partitions i(t __future__Rt contextlibRJRRRtiotloggingR;RR[R^RPt collectionsRt itertoolsRt pip._vendorRtpip._vendor.packaging.utilsRtpip._vendor.retryingRtpip._vendor.sixRRtpip._vendor.six.movesRR R R R tpip._vendor.six.moves.urllibR R t"pip._vendor.six.moves.urllib.parseRR&RNRtpip._internal.exceptionsRtpip._internal.locationsRRRRtpip._internal.utils.compatRRRRtpip._internal.utils.typingRRtpip._internal.utils.virtualenvRRRRttypingRR R!R"R#R$R%R&R'R(R)R*tpip._vendor.pkg_resourcesR+RRDR,t__all__t getLoggerRRRCRGR8R6RR-R\RmR.R/RRR0RRR2RR3tDEFAULT_BUFFER_SIZERRR4R1R5RRRRRRRgRRRRRRtobjectRRtcontextmanagerRR7RR9RRRRR%R+R/R9R:R;R=R:R>R?RGRHRMRPR[R^R`Rd(((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/misc.pyts           (""R      "            >   $              #