σ οRec@@s‘ddlmZddlZddlZddlZddlZddlZddlZddl m Z ddl m Z ddlmZddlmZddlmZddlmZmZmZdd lmZmZmZdd lmZdd lmZerGddl Z dd l!m"Z"m#Z#m$Z$m%Z%dd l&m'Z'ndZ(ej)e*ƒZ+d„Z,de-fd„ƒYZ.d„Z/d„Z0dS(i(tabsolute_importN(tversion(t ensure_binary(t LinkCollector(t PackageFinder(tSelectionPreferences(tadjacent_tmp_filetcheck_path_ownertreplace(t ensure_dirtget_distributiontget_installed_version(t get_installer(tMYPY_CHECK_RUNNING(tAnytDicttTexttUnion(t PipSessions%Y-%m-%dT%H:%M:%SZcC@s%t|ƒ}tj|ƒjƒ}|S(N(Rthashlibtsha224t hexdigest(tkeyt key_bytestname((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/self_outdated_check.pyt_get_statefile_name*s tSelfCheckStatecB@s)eZd„Zed„ƒZd„ZRS(cC@sŽi|_d|_|rŠtjj|dt|jƒƒ|_y.t|jƒ}t j |ƒ|_WdQXWqŠt t t fk r†qŠXndS(Nt selfcheck(tstatetNonetstatefile_pathtostpathtjoinRRtopentjsontloadtIOErrort ValueErrortKeyError(tselft cache_dirt statefile((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/self_outdated_check.pyt__init__2s   cC@stjS(N(tsystprefix(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/self_outdated_check.pyRDscC@sα|js dSttjj|jƒƒs,dSttjj|jƒƒi|jd6|jtƒd6|d6}t j |dt ddƒ}t |jƒ}|j t|ƒƒWdQXyt|j|jƒWntk rάnXdS( NRt last_checkt pypi_versiont sort_keyst separatorst,t:(R2R3(RRRR tdirnameR RtstrftimetSELFCHECK_DATE_FMTR#tdumpstTrueRtwriteRRRtOSError(R(R/t current_timeRttexttf((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/self_outdated_check.pytsaveIs     (t__name__t __module__R+tpropertyRR>(((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/self_outdated_check.pyR1s cC@s&t|ƒ}|stSdt|ƒkS(s΅Checks whether pkg was installed by pip This is used not to display the upgrade message when pip is in fact installed by system package manager, such as dnf on Fedora. tpip(R tFalseR (tpkgtdist((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/self_outdated_check.pytwas_installed_by_pipms cC@sαtdƒ}|sdStj|ƒ}d}y‹td|jƒ}tjjƒ}d|jkr²d|jkr²tjj |jdt ƒ}||j ƒdkr²|jd}q²n|dkrJt j |d |d tƒ}td td tƒ} tj d |d| ƒ} | jdƒj} | dkr(dSt| jƒ}|j||ƒntj|ƒ} || ko€|j| jko€tdƒ} | sdSdjtjƒ}tjd|||ƒWn$tk rάtjddtƒnXdS(sΫCheck for an update for pip. Limit the frequency of checks to once per week. State is stored either in the active virtualenv or in the user's USER_CACHE_DIR keyed off the prefix of the pip script path. RBNR)R.R/iii<toptionstsuppress_no_indext allow_yankedtallow_all_prereleasestlink_collectortselection_prefss {} -m pips‰You are using pip version %s; however, version %s is available. You should consider upgrading via the '%s install --upgrade pip' command.s5There was an error checking the latest version of piptexc_infoi¨i`'i€: ( R tpackaging_versiontparseRRR)tdatetimetutcnowRtstrptimeR6t total_secondsRtcreateR8RRCRtfind_best_candidatetbest_candidatetstrRR>t base_versionRFtformatR,t executabletloggertwarningt Exceptiontdebug(tsessionRGtinstalled_versiont pip_versionR/RR;R.RKRLtfinderRVtremote_versiontlocal_version_is_oldertpip_cmd((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/self_outdated_check.pytpip_self_version_checkzsX             (1t __future__RRPRR#tloggingtos.pathRR,tpip._vendor.packagingRRNtpip._vendor.sixRtpip._internal.index.collectorRt"pip._internal.index.package_finderRt$pip._internal.models.selection_prefsRtpip._internal.utils.filesystemRRRtpip._internal.utils.miscR R R tpip._internal.utils.packagingR tpip._internal.utils.typingR toptparsettypingRRRRtpip._internal.network.sessionRR6t getLoggerR?R[RtobjectRRFRf(((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/self_outdated_check.pyts2       " <