ó ïRec@`sÜdZddlmZmZddlZddlZddlZddlZddlZddl Z ddl Z ddl m Z m Z ddlmZerõddlmZmZmZmZmZmZmZedƒZdefd „ƒYZnyddlZWn]ek rdydd lmZWqeek r`ddlZeje_ej e_!qeXnXd d d dddddgZ"ej#e$ƒZ%e rÚddl&Z&y e&j'Z'Wne(k rÊdZ'nXe'dk Z*ne+Z*ddl,m'Z'e rd„Z-ej.de-ƒdZ/ndZ/d„Z0dd„Z1d„Z2d„Z3d„Z4dddhZ5e j6j7dƒpŠe j6d koŠej8d!kZ9d"„Z:e;e dƒr±d#„Z<n d$„Z<dd%„Z=e>ed&e=ƒZ?dS('sKStuff that differs in different Python versions and platform distributions.i(tabsolute_importtdivisionN(tPY2t text_type(tMYPY_CHECK_RUNNING(tCallabletOptionaltProtocoltTexttTupletTypeVartUniontFtLruCachecB`seZdd„ZRS(cC`s t‚dS(N(tNotImplementedError(tselftmaxsize((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/compat.pyt__call__sN(t__name__t __module__tNoneR(((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/compat.pyR s(t ipaddressRt uses_pycachetconsole_to_strt get_path_uidt stdlib_pkgstWINDOWStsamefiletget_terminal_size(tcache_from_sourcec`sW‡fd†tˆjˆjƒDƒ}d„|Dƒ}djtdj|ƒƒˆjfS(Nc3`s|]}ˆj|VqdS(N(tobject(t.0ti(terr(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/compat.pys Iscs`s|]}t|ƒVqdS(N(tord(Rtb((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/compat.pys Ksuu\x{:x}(trangetstarttendtjointmaptformat(R!t raw_bytes((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/compat.pytbackslashreplace_decode_fnHs%tbackslashreplace_decodetbackslashreplacecC`s<yddl}tSWntk r'nXddlm}|S(Ni(t IS_PYOPENSSL(t_ssltTruet ImportErrortpip._vendor.urllib3.utilR.(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/compat.pythas_tlsVs  cC`sët|tƒr|Stjƒ}| s>tj|ƒjdkrGd}ny|j|ƒ}Wn?tk r›t j d|p|d|ƒ|j|dt ƒ}nXt t t dd ƒdd ƒ}|rç|j|ddƒ}|j|ƒ}n|S( sµ For display or logging purposes, convert a bytes object (or text) to text (e.g. unicode in Python 2) safe for output. :param desc: An optional phrase describing the input data, for use in the log message if a warning is logged. Defaults to "Bytes object". This function should never error out and so can take a best effort approach. It is okay to be lossy if needed since the return value is just for display. We assume the data is in the locale preferred encoding. If it won't decode properly, we warn the user but decode as best we can. We also ensure that the output can be safely written to standard output without encoding errors. tasciisutf-8s&%s does not appear to be encoded as %ss Bytes objectterrorst __stderr__tencodingR-N(t isinstanceRtlocaletgetpreferredencodingtcodecstlookuptnametdecodetUnicodeDecodeErrortloggertwarningR,tgetattrtsysRtencode(tdatatdescR7t decoded_datatoutput_encodingtoutput_encoded((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/compat.pytstr_to_displaybs*      cC`st|ddƒS(s<Return a string, safe for output, of subprocess output. RFsSubprocess output(RJ(RE((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/compat.pyR¥scC`sttdƒrMtj|tjtjBƒ}tj|ƒj}tj|ƒn<tjj |ƒsttj |ƒj}nt dj |ƒƒ‚|S(s) Return path's uid. Does not follow symlinks: https://github.com/pypa/pip/pull/935#discussion_r5307003 Placed this function in compat due to differences on AIX and Jython, that should eventually go away. :raises OSError: When path is a symlink or can't be read. t O_NOFOLLOWs1{} is a symlink; Will not return uid for symlinks( thasattrtostopentO_RDONLYRKtfstattst_uidtclosetpathtislinktstattOSErrorR)(RStfdtfile_uid((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/compat.pyR¬s  cC`sAtjj|ƒ}|jdƒr=|jdƒr=|d}n|S(sm Expand ~ and ~user constructions. Includes a workaround for https://bugs.python.org/issue14768 s~/s//i(RMRSt expandusert startswith(RStexpanded((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/compat.pyRYËs tpythontwsgireftargparsetwintclitntcC`sottjdƒr%tjj||ƒStjjtjj|ƒƒ}tjjtjj|ƒƒ}||kSdS(s>Provide an alternative for os.path.samefile on Windows/Python2RN(RLRMRSRtnormcasetabspath(tfile1tfile2tpath1tpath2((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/compat.pyRås cC`sttjƒƒS(s‚ Returns a tuple (x, y) representing the width(x) and the height(y) in characters of the terminal window. (ttupletshutilR(((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/compat.pyRñscC`såd„}|dƒp*|dƒp*|dƒ}|s”tjdkr”y8tjtjƒtjƒ}||ƒ}tj|ƒWq‘tk rq‘Xq”n|sÇtjj ddƒtjj dd ƒf}nt |dƒt |dƒfS( s‚ Returns a tuple (x, y) representing the width(x) and the height(y) in characters of the terminal window. cS`suyLddl}ddl}ddl}|jd|j||jdƒƒ}Wntk r`dSX|dkrqdS|S(Nithht12345678(ii(tfcntlttermioststructt unpack_fromtioctlt TIOCGWINSZt ExceptionR(RWRlRmRntcr((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/compat.pyt ioctl_GWINSZÿs     iiitwin32tLINESitCOLUMNSiP( RCtplatformRMRNtctermidRORRRrtenvirontgettint(RtRsRW((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/compat.pyRùs $   -cC`s d„}|S(NcS`s|S(N((tf((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/compat.pyt_wrappers((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/compat.pytnoop_lru_caches t lru_cache(@t__doc__t __future__RRR;t functoolsR9tloggingRMRiRCtpip._vendor.sixRRtpip._internal.utils.typingRttypingRRRRR R R R R RR1t pip._vendortipaddrt IPAddresst ip_addresst IPNetworkt ip_networkt__all__t getLoggerRR@timpRtAttributeErrorRRR0timportlib.utilR+tregister_errorR,R3RJRRRYRRxRZR=RRRLRRRBR€(((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/compat.pytsp       4             C      $