\e[c@s]ddlZddlmZddlZddlZddlmZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZyddlZWnek rdZnXddlZddlZddlZddlZddlZyddlZWnek r-ddlZnXddlZddlmZddlmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1e j2e3Z4e j5dZ6e j5dZ7e j5d Z8e j5d Z9e j5d Z:e j5d Z;e j5d Z<e j5dZ=dZ>dZ?dZ@dZAdZBdddZCdZDdZEdZFejGdZHejGdZIejGddZJdeKfdYZLdZMdeKfd YZNd!ZOd"eKfd#YZPe j5d$e jQZRd%ZSdd&ZTd'ZUd(ZVd)ZWd*ZXd+ZYe j5d,e jZZ[e j5d-Z\dd.Z]e j5d/Z^d0Z_d1Z`d2Zad3Zbd4Zcd5Zdd6eKfd7YZed8eKfd9YZfd:eKfd;YZgdqZhdeidCZjdDZkdrZldKeKfdLYZme j5dMZne j5dNZoe j5dOZpdPZdQZqer.ddRlmrZsmtZtmuZudSe%jvfdTYZvdUesfdVYZrdWere(fdXYZwnejxdY Zyeydskrd[e%jzfd\YZzerd]e%j{fd^YZ{qnd_e&j|fd`YZ|erdae&j}fdbYZ}ndce&j~fddYZ~deZdfeKfdgYZdhefdiYZdjefdkYZdle)fdmYZdneKfdoYZdpZdS(tiN(tdeque(tiglobi(tDistlibException(t string_typest text_typetshutilt raw_inputtStringIOtcache_from_sourceturlopenturljointhttplibt xmlrpclibt splittypet HTTPHandlertBaseConfiguratort valid_identt Containert configparsertURLErrortZipFiletfsdecodetunquoteturlparses^([\w\.-]+)\s*s^([\w\.*+-]+)\s*s^(<=?|>=?|={2,3}|[~!]=)\s*s*^((<=?)|(>=?)|={2,3}|[~!]=|in|not\s+in)\s*s^or\b\s*s ^and\b\s*s(\S+)\s*s(([\s\w\.{}()*+#:;,/?!~`@$%^&=|<>\[\]-]+)csCdfdfdfd|S(se Parse a marker string and return a dictionary containing a marker expression. The dictionary will contain keys "op", "lhs" and "rhs" for non-terminals in the expression grammar, or strings. A string contained in quotes is to be interpreted as a literal string, and a string not contained in quotes is a variable (such as os_name). cSstj|}|r8|jd}||j}nH|sMtdn3|d}|dkrvtd|ndj|d}|d}|g}x|r4|d|krPq|d|kr|j||d}qtj|}|s td|n|j|jd||j}qWdj|}td||j|dj|}|dj }||fS( Nisunexpected end of inputs'"sinvalid expression: %stiserror in string literal: %ssunterminated string: %s( t IDENTIFIERtmatchtgroupstendt SyntaxErrortreplacetappendt STRING_CHUNKtjointlstrip(t remainingtmtresulttqtoqtpartsts((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt marker_varAs:        cs|rh|ddkrh|dj\}}|ddkrUtd|n|dj}n|\}}xp|rtj|}|sPn|jd}||j}|\}}i|d6|d6|d6}q}W|}||fS( Nit(it)sunterminated parenthesis: %stoptlhstrhs(R"Rt MARKER_OPRRR(R#R%R.R$R-R/(tmarkerR*(s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt marker_expres  cs|\}}x`|rttj|}|s4Pn||j}|\}}idd6|d6|d6}qW||fS(NtandR-R.R/(tANDRR(R#R.R$R/(R2(s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt marker_andxs cs|\}}x`|rttj|}|s4Pn||j}|\}}idd6|d6|d6}qW||fS(NtorR-R.R/(tORRR(R#R.R$R/(R5(s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyR1s ((t marker_string((R1R5R2R*s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt parse_marker8s $  c Cs?|j}| s"|jdr&dStj|}|sNtd|n|jd}||j}d}}}}|r|ddkr|jdd}|dkrtd|n|d|!} ||dj }g}x| rtj| }|std| n|j |jd| |j} | sPPn| dd krstd | n| dj } qW|sd}qn|r^|dd krA|dj }t j|}|std |n|jd}t |} | j o| js(td |n||jj }q^d} |ddkro| |\}}q^|jdd}|dkrtd|n|d|!} ||dj }tj| r| | \}} q^tj| }|s td| n|jd} | |jj } | rLtd| nd| fg}n|r|ddkrtd|n|dj }t|\}}n|r|ddkrtd|n|s|}n0d|djg|D]}d|^qf}td|d|d|d|d|d|S( s Parse a requirement passed in as a string. Return a Container whose attributes contain the various parts of the requirement. t#sname expected: %sit[t]isunterminated extra: %ssmalformed extra: %st,scomma expected in extras: %st@sinvalid URI: %ssInvalid URL: %scSstj|}d}|rg}xtr|jd}||j}tj|}|srtd|n|jd}|j||f||j}| s|ddkrPn|dj }tj|}|s$td|q$q$W|sd}qn||fS(s| Return a list of operator, version tuples if any are specified, else None. isinvalid version: %sR=isinvalid constraint: %sN( t COMPARE_OPRtNonetTrueRRtVERSION_IDENTIFIERRRR"(t ver_remainingR$tversionsR-tv((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt get_versionss,  R+R,sunterminated parenthesis: %ssinvalid constraint: %ss~=t;sinvalid requirement: %ssunexpected trailing data: %ss%s %ss, tnametextrast constraintsR1turlt requirementN(tstript startswithR@RRRRRtfindR"Rt NON_SPACERtschemetnetlocR?RBR9R!R(treqR#R$tdistnameRIt mark_exprRDturitiR)ttRFt_REtrstcon((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytparse_requirements          0cCsd}i}x|D]\}}}tjj||}xt|D]}tjj||} xt| D]v} ||| } |dkr|j| dqo||| } |jtjjdjd} | d| || s     cCsVt|tr|j}ni}x+|D]#}||kr+||||;scCstjj|}||jkrtjj| r|jj|tjj|\}}|j|tj d||j stj |n|j r|j j|qndS(Ns Creating %s(R^R_RRRRRRRRRtmkdirRR(RR_RR((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyR=s"   cCst|| }tjd|||js|sD|j||r{|sSd}q{|j|sht|t|}nt j |||t n|j ||S(NsByte-compiling %s to %s( RRRRRR@RNRaRbt py_compiletcompileRAR(RR_toptimizetforceRmtdpathtdiagpath((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt byte_compileIs   cCstjj|rtjj|rtjj| rtjd||js`tj |n|j r ||j kr|j j |qq qtjj|rd}nd}tjd|||jstj |n|j r||j kr |j j |q qndS(NsRemoving directory tree at %stlinktfilesRemoving %s %s(R^R_RRRRtdebugRRRRRRR(RR_R)((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytensure_removedWs"%     cCsjt}x]|setjj|r:tj|tj}Pntjj|}||kr\Pn|}q W|S(N(RR^R_RtaccesstW_OKR(RR_R%tparent((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt is_writablels   cCs/|jst|j|jf}|j|S(sV Commit recorded changes, turn off recording, return changes. (RRaRRR(RR%((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytcommitxs cCs|jsx9t|jD](}tjj|rtj|qqWt|jdt }xq|D]f}tj |}|r|dgkst tjj ||d}tj |ntj |qaWn|jdS(Ntreverset __pycache__i(RtlistRR^R_RRtsortedRRAtlistdirRaR!trmdirR(RRtdirsRtflisttsd((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytrollbacks  N(RRRRRRRRARR@RRRRtset_executable_modeRR RRRR (((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRs             cCs|tjkrtj|}n t|}|dkr@|}nG|jd}t||jd}x|D]}t||}qnW|S(Nt.i(Rxtmodulest __import__R@RRyRe(t module_namet dotted_pathtmodR%R(R((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytresolves    t ExportEntrycBs;eZdZedZdZdZejZRS(cCs(||_||_||_||_dS(N(RHRmRkR(RRHRmRkR((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRs   cCst|j|jS(N(R(RmRk(R((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRscCs d|j|j|j|jfS(Ns(RHRmRkR(R((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt__repr__scCsdt|tst}nH|j|jko]|j|jko]|j|jko]|j|jk}|S(N(R}R)RRHRmRkR(RtotherR%((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt__eq__s ( RRRRRR*R,Rt__hash__(((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyR)s    s(?P(\w|[-.+])+) \s*=\s*(?P(\w+)([:\.]\w+)*) \s*(\[\s*(?P\w+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])? c CsStj|}|sId}d|ks3d|krOtd|qOn|j}|d}|d}|jd}|dkr|d}}n4|dkrtd|n|jd\}}|d } | dkrd|ksd|kr td|ng} n(g| jd D]} | j^q"} t|||| }|S( NR;R<sInvalid specification '%s'RHtcallablet:iiRR=( tENTRY_REtsearchR@Rt groupdicttcountRRMR)( t specificationR$R%RRHR_tcolonsRmRkRR((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRs2          (cCs|d krd}ntjdkrHdtjkrHtjjd}ntjjd}tjj|rtj|tj }|st j d|qnGytj |t }Wn-tk rt j d|dt t}nX|s tj}t j d |ntjj||S( s Return the default base location for distlib caches. If the directory does not exist, it is created. Use the suffix provided for the base directory, and default to '.distlib' if it isn't provided. On Windows, if LOCALAPPDATA is defined in the environment, then it is assumed to be a directory, and will be the parent directory of the result. On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home directory - using os.expanduser('~') - will be the parent directory of the result. The result is just the directory '.distlib' in the parent directory as determined above, or with the name specified with ``suffix``. s.distlibtntt LOCALAPPDATAs $localappdatat~s(Directory exists but is not writable: %ssUnable to create %stexc_infos#Default location unusable, using %sN(R@R^RHtenvironR_t expandvarst expanduserRRRRtwarningtmakedirsRAtOSErrorRRRR!(RkR%tusable((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytget_cache_bases&       cCs`tjjtjj|\}}|r?|jdd}n|jtjd}||dS(s Convert an absolute path to a directory name for use in a cache. The algorithm used is: #. On Windows, any ``':'`` in the drive is replaced with ``'---'``. #. Any occurrence of ``os.sep`` is replaced with ``'--'``. #. ``'.cache'`` is appended. R/s---s--s.cache(R^R_t splitdriveRRR`(R_RR((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytpath_to_cache_dir s $cCs|jds|dS|S(NR](tendswith(R)((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt ensure_slashscCskd}}d|kr^|jdd\}}d|krC|}q^|jdd\}}n|||fS(NR>iR/(R@R(RRtusernametpasswordRm((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytparse_credentials#s    cCs tjd}tj||S(Ni(R^tumask(R%((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytget_process_umask.s cCsXt}d}x3t|D]%\}}t|tst}PqqW|dk sTt|S(N(RAR@t enumerateR}RRRa(tseqR%RWR)((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytis_string_sequence3ss3([a-z0-9_]+([.-][a-z_][a-z0-9_]*)*)-([a-z0-9_.+-]+)s -py(\d\.?\d?)cCsd}d}t|jdd}tj|}|r[|jd}||j }n|rt|t|dkrtj tj |d|}|r|j }|| ||d|f}qn|dkrt j |}|r|jd|jd|f}qn|S(sw Extract name, version, python version from a filename (no extension) Return name, version, pyver or None t t-is\biN( R@RRtPYTHON_VERSIONR1RtstartRbtreRtescapeRtPROJECT_NAME_AND_VERSION(tfilenamet project_nameR%tpyverR$tn((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytsplit_filenameBs"" ! 's-(?P[\w .-]+)\s*\(\s*(?P[^\s)]+)\)$cCsRtj|}|s(td|n|j}|djj|dfS(s A utility method used to get name and version from a string. From e.g. a Provides-Dist value. :param p: A value in a form 'foo (1.0)' :return: The name and version as a tuple. s$Ill-formed name/version string: '%s'RHtver(tNAME_VERSION_RERRR2RMR(RR$R((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytparse_name_and_version^s  cCs t}t|pg}t|p'g}d|krS|jd||O}nx|D]}|dkr||j|qZ|jdr|d}||krtjd|n||kr|j|qqZ||krtjd|n|j|qZW|S(Nt*ROisundeclared extra: %s(RRRRNRR=(t requestedt availableR%trtunwanted((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt get_extrasms&          cCsi}yqt|}|j}|jd}|jdsRtjd|n$tjd|}tj |}Wn&t k r}tj d||nX|S(Ns Content-Typesapplication/jsons(Unexpected response for JSON request: %ssutf-8s&Failed to get external data for %s: %s( R RtgetRNRRRRRRRt exception(RKR%tresptheaderstcttreaderte((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt_get_external_datas  s'https://www.red-dove.com/pypi/projects/cCs9d|dj|f}tt|}t|}|S(Ns%s/%s/project.jsoni(tupperR t_external_data_base_urlRj(RHRKR%((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytget_project_datas cCs6d|dj||f}tt|}t|S(Ns%s/%s/package-%s.jsoni(RkR RlRj(RHtversionRK((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytget_package_datastCachecBs)eZdZdZdZdZRS(s A class implementing a cache for resources that need to live in the file system e.g. shared libraries. This class was moved from resources to here because it could be used by other modules, e.g. the wheel module. cCsvtjj|s"tj|ntj|jd@dkrQtjd|ntjjtjj ||_ dS(su Initialise an instance. :param base: The base directory where the cache should be located. i?isDirectory '%s' is not privateN( R^R_RR>RRRR=RtnormpathRj(RRj((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRs cCs t|S(sN Converts a resource prefix to a directory name in the cache. (RC(RRm((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt prefix_to_dirscCsg}xtj|jD]}tjj|j|}yZtjj|s^tjj|rntj|n"tjj|rt j |nWqt k r|j |qXqW|S(s" Clear the cache. ( R^RRjR_R!RRRRRRRR(Rt not_removedtfn((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytclears$ (RRt__doc__RRrRu(((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRps  t EventMixincBs>eZdZdZedZdZdZdZRS(s1 A very simple publish/subscribe system. cCs i|_dS(N(t _subscribers(R((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRscCs\|j}||kr+t|g|| %s;s %s;t}s (RRRR!(RR%RRRR((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytdots    ( RRRRRRRRRRtpropertyRR(((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRs      3s.tar.gzs.tar.bz2s.tars.zips.tgzs.tbzs.whlc sfd}tjjtd}|dkr|jdrZd}q|jdrxd}d}q|jdrd }d }q|jd rd}d}qtd|nz|dkrt|d}|rZ|j}x|D]}||qWqZnBt j ||}|rZ|j }x|D]}||qCWn|dkrt j ddkrxA|jD]0} t| jts| jjd| _qqWn|jWd|r|jnXdS(Ncs|t|ts!|jd}ntjjtjj|}|j se|tjkrxt d|ndS(Nsutf-8spath outside destination: %r( R}RtdecodeR^R_RR!RNR`R(R_R(tdest_dirtplen(s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt check_paths !#s.zips.whltzips.tar.gzs.tgzttgzsr:gzs.tar.bz2s.tbzttbzsr:bz2s.tarttarR`sUnknown format for %riisutf-8(s.zips.whl(s.tar.gzs.tgz(s.tar.bz2s.tbz(R^R_RRbR@RDRRtnamelistttarfileRtgetnamesRxRt getmembersR}RHRRt extractallR( tarchive_filenameRtformatRRtarchiveRtnamesRHttarinfo((RRs7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt unarchivesH           c Cstj}t|}t|d}xutj|D]d\}}}xR|D]J}tjj||}||} tjj| |} |j|| qPWq:WWdQX|S(s*zip a directory tree into a BytesIO objectRN( tiotBytesIORbRR^twalkR_R!R( t directoryR%tdlentzfRcRRRHtfulltrelRl((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytzip_dirs    RtKtMtGtTtPtProgresscBseZdZdddZdZdZdZdZedZ ed Z d Z ed Z ed Z RS( tUNKNOWNiidcCsV|dks||kst||_|_||_d|_d|_t|_dS(Ni( R@RaRtcurtmaxtstartedtelapsedRtdone(Rtminvaltmaxval((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRs    cCs}|j|kst|jdks9||jks9t||_tj}|jdkri||_n||j|_dS(N(RRaRR@RttimeRR(Rtcurvaltnow((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytupdates$   cCs*|dkst|j|j|dS(Ni(RaRR(Rtincr((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt increment scCs|j|j|S(N(RR(R((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRQ scCs/|jdk r"|j|jnt|_dS(N(RR@RRAR(R((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytstopscCs|jdkr|jS|jS(N(RR@tunknown(R((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytmaximumscCsZ|jrd}nD|jdkr*d}n,d|j|j|j|j}d|}|S(Ns100 %s ?? %gY@s%3d %%(RRR@RR(RR%RE((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt percentages   " cCsU|dkr|jdks-|j|jkr6d}ntjdtj|}|S(Nis??:??:??s%H:%M:%S(RR@RRRtstrftimetgmtime(RtdurationR%((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytformat_duration%s- cCs|jrd}|j}nd}|jdkr9d}ne|jdksZ|j|jkrcd}n;t|j|j}||j|j:}|d|j}d||j|fS(NtDonesETA iiis%s: %s(RRRR@RRtfloatR(RRmRX((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytETA.s   ! cCsh|jdkrd}n|j|j|j}x(tD] }|dkrLPn|d:}q6Wd||fS(Nigig@@s%d %sB/s(RRRtUNITS(RR%tunit((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytspeedAs   (RRRRRRRQRRRRRRR(((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRs    s \{([^}]*)\}s[^/\\,{]\*\*|\*\*[^/\\,}]s^[^{]*\}|\{[^}]*$cCsZtj|r(d}t||ntj|rPd}t||nt|S(sAExtended globbing function that supports ** and {opt1,opt2,opt3}.s7invalid glob %r: recursive glob "**" must be used alones2invalid glob %r: mismatching set marker '{' or '}'(t_CHECK_RECURSIVE_GLOBR1Rt_CHECK_MISMATCH_SETt_iglob(t path_globR((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRVsc cstj|d}t|dkrt|dksBt||\}}}x3|jdD]4}x+tdj|||fD] }|VqWqaWnd|krxt|D] }|VqWn|jdd\}}|dkrd}n|dkr d}n|jd}|jd }x]tj |D]L\}}} tj j |}x(ttj j||D] } | VqtWq7WdS( NiiR=Rs**R"R]R]s\( t RICH_GLOBRRbRaRR!t std_iglobR"R^RR_Rq( Rtrich_path_globRmRRktitemR_tradicaltdirRRt((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRas*%      "(t HTTPSHandlertmatch_hostnametCertificateErrortHTTPSConnectioncBseZdZeZdZRS(c Cstj|j|jf|j}t|dtrI||_|jnt t ds|j rmt j }n t j }t j||j|jd|dt jd|j |_nt jt j}|jt jO_|jr|j|j|jni}|j rHt j |_|jd|j tt dtrH|j|d!           N(RRR@RRARR(((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRsRcBs&eZedZdZdZRS(cCs#tj|||_||_dS(N(tBaseHTTPSHandlerRRR(RRR((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRs  cOs7t||}|jr3|j|_|j|_n|S(s This is called to create a connection instance. Normally you'd pass a connection class to do_open, but it doesn't actually check for a class, and just expects a callable. As long as we behave just as a constructor would have, we should be OK. If it ever changes so that we *must* pass a class, we'll create an UnsafeHTTPSConnection class which just sets check_domain to False in the class definition, and choose which one to pass to do_open. (RRR(RRRR%((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt _conn_makers   cCs_y|j|j|SWnAtk rZ}dt|jkrTtd|jq[nXdS(Nscertificate verify faileds*Unable to verify server certificate for %s(tdo_openRRtstrtreasonRR(RRSRi((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt https_opens(RRRARRR(((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRs  tHTTPSOnlyHandlercBseZdZRS(cCstd|dS(NsAUnexpected HTTP request on what should be a secure connection: %s(R(RRS((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyt http_opens(RRR(((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRsiitHTTPcBseZdddZRS(RcKs5|dkrd}n|j|j|||dS(Ni(R@t_setupt_connection_class(RRRR((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRs  N(RRR@R(((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRstHTTPScBseZdddZRS(RcKs5|dkrd}n|j|j|||dS(Ni(R@RR(RRRR((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRs  N(RRR@R(((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyR st TransportcBseZddZdZRS(icCs ||_tjj||dS(N(RR R!R(RRt use_datetime((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRs cCs|j|\}}}tdkr<t|d|j}nN|j sY||jdkr}||_|tj|f|_n|jd}|S(NiiRii(ii(t get_host_infot _ver_infoRRt _connectiont_extra_headersR tHTTPConnection(RRthtehtx509R%((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pytmake_connections   (RRRR+(((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyR!s t SafeTransportcBseZddZdZRS(icCs ||_tjj||dS(N(RR R,R(RRR"((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRs cCs|j|\}}}|s'i}n|j|dR?t__next__(((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyR<Gs  t CSVWritercBseZdZdZRS(cKs1t|d|_tj|j|j|_dS(NR(R3RR=twriterR;(RRtR((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRascCsutjddkrag}x<|D]4}t|trG|jd}n|j|q W|}n|jj|dS(Niisutf-8(RxRR}RRRRBtwriterow(RtrowR`R((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRCes  (RRRRC(((s7/tmp/pip-install-0xiv62/pip/pip/_vendor/distlib/util.pyRA`s t ConfiguratorcBsHeZeejZdeds                    Y y   /       )           ,H6 ] *)   7.