9ɛdZddlmZddlZddlZddlZddlmZddlm Z ddl m Z ddl m Z ddlmZdd lmZe rdd lmZdd 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)NormalizedName 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 /builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/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(). rNonecVtd|_dS)N)super__init___session)self __class__s r r'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_urlsAs 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 r get_default_sessionz'SessionCommandMixin.get_default_sessionOsE =  ..t/B/B7/K/KLLDM=,,,}r+Nretries int | Nonetimeoutc lddlm}|j}|r!tj|sJd|jvrt}nd}||r tj|dnd||n|j |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>resume_retries trusted_hostsr6 ssl_context)httphttpsF)pip._internal.network.sessionr cache_dirospathisabsdeprecated_features_enabledr!joinr>rCrDr9certverify client_certr@proxyproxies trust_env pip_proxyno_inputauth promptingkeyring_provider)r)r,r>r@r rIrEsessions r r<z"SessionCommandMixin._build_sessionYsm =<<<<<% 8 i 8 8888 !D D D8::KKK*8AK"',,y)444t&2GG"1!/++G44#     < *$\GN   /".GL ? Rg R)0)r?r@r?rr ) __name__ __module__ __qualname____doc__r' classmethodr9r=r< __classcell__)r*s@r r#r#8s000000 " " "[ "#" 222222222r+r#rZr r,rr$c*ddlm}|||dS)Nr)pip_self_version_check)!pip._internal.self_outdated_checkrb)rZr,checks r _pip_self_version_checkres,QQQQQQ E'7r+c"eZdZdZd dZd d Zd S)IndexGroupCommandz Abstract base class for commands with the index_group options. This also corresponds to the commands that permit the pip version check. r,r package_namer rboolc`|jr&|j|}|durdS|durdSdS)zM Determine if pre-releases should be excluded for a package. TF)release_controlallows_prereleases)r)r,rhallow_prereleasess r should_exclude_prereleasez+IndexGroupCommand.should_exclude_prereleasesM  "  ' 7 J J< X X  D((u"e++ttr+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@re Exceptionrrr)r)r,rZs r handle_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<rs#"""""  222222AAAAAA9::::::888888  8 $ $  ,SSSSS-SSSl /?/?/?/?/?!4/?/?/?/?/?r+