%"d4N dZddlmZddlZddlZddlZddlmZddlm Z ddl m Z ddl m Z ddlmZdd lmZe r dd lmZdd lmZejeZeddZGddeZddZGddeeZdS)a& Contains command classes which may interact with an index / the network. Unlike its sister module, req_command, this module still uses lazy imports so commands which don't always hit the network (e.g. list w/o --outdated or --uptodate) don't need waste time importing PipSession and friends. ) annotationsN) lru_cache)Values) TYPE_CHECKING)certifi)Command)CommandContextMixIn) SSLContext PipSessionreturnSSLContext | NonectjdkrtddS ddl}n+#t $rtdYdSwxYw ddlm}n+#t $rtdYdSwxYw| |j }| tj |S)N) z7Disabling truststore because Python version isn't 3.10+rz1Disabling truststore since ssl support is missing) truststorez5Disabling truststore because platform isn't supported)sys version_infologgerdebugssl ImportErrorwarning pip._vendorrr PROTOCOL_TLS_CLIENTload_verify_locationsrwhere)rrctxs q/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pip/_internal/cli/index_command.py_create_truststore_ssl_contextr s '!! NOOOt JKKKtt******* NOOOtt    7 8 8Cgmoo... Js!3$AAA&&$B BcReZdZdZdfd ZeddZdd Z dddZxZ S)SessionCommandMixinzE A class mixin for command classes needing _build_session(). r NonecVtd|_dS)N)super__init___session)self __class__s rr&zSessionCommandMixin.__init__;s$ +/ optionsrlist[str] | Nonecg}t|dds(t|dd}|r||t|dd}|r|||pdS)z7Return a list of index urls from user-provided options.no_indexF index_urlNextra_index_urls)getattrappendextend)clsr+ index_urlsurlurlss r_get_index_urlsz#SessionCommandMixin._get_index_urls?s w E22 '';55C '!!#&&&w 2D99  $   d # # #!T!r*r c|j6||||_|jJ|jS)zGet a default-managed session.)r' enter_context_build_session)r(r+s rget_default_sessionz'SessionCommandMixin.get_default_sessionMsE =  ..t/B/B7/K/KLLDM=,,,}r*Nretries int | Nonetimeoutc`ddlm}|j}|r!tj|sJd|jvrt}nd}||r tj|dnd||n|j |j | ||}|j r |j |_ |jr |j|_ |js|r||n|j|_|jr'|j|jd|_d|_|j|_|j |j_|j|j_|S)Nrr z legacy-certszhttp-v2)cacher= trusted_hostsr5 ssl_context)httphttpsF)pip._internal.network.sessionr cache_dirospathisabsdeprecated_features_enabledr joinr=rBr8certverify client_certr?proxyproxies trust_env pip_proxyno_inputauth promptingkeyring_provider)r(r+r=r?r rGrCsessions rr;z"SessionCommandMixin._build_sessionWsg =<<<<<% 8 i 8 8888 !D D D8::KKK*8AK"',,y)444t&2GG!/++G44#     < *$\GN   /".GL ? Rg R)0)r?r>r r ) __name__ __module__ __qualname____doc__r& classmethodr8r<r; __classcell__)r)s@rr"r"6s000000 " " "[ "#" 111111111r*r"rXr r+rr#c*ddlm}|||dS)Nr)pip_self_version_check)!pip._internal.self_outdated_checkr`)rXr+checks r_pip_self_version_checkrcs,QQQQQQ E'7r*ceZdZdZddZdS) IndexGroupCommandz Abstract base class for commands with the index_group options. This also corresponds to the commands that permit the pip version check. r+rr r#ct|dsJ|js|jrdS ||dt d|j}|5t ||ddddS#1swxYwYdS#t$r:t dt dd YdSwxYw) z Do the pip version check if not disabled. This overrides the default behavior of not doing the check. r.Nr)r=r?z6There was an error checking the latest version of pip.zSee below for errorT)exc_info) hasattrdisable_pip_version_checkr.r;minr?rc Exceptionrrr)r(r+rXs rhandle_pip_version_checkz*IndexGroupCommand.handle_pip_version_checks2w +++++  , 0@  F ?))Aw//*G  : :'999 : : : : : : : : : : : : : : : : : : ? ? ? NNS T T T LL.L > > > > > > ?s6-A<A/" A</A33A<6A37A<rws#"""""  222222AAAAAA9888888  8 $ $  ,RRRRR-RRRj ?????!4?????r*