Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/self_outdated_check.pyc

σ
“tΖ_c@@s‘ddlmZddlZddlZddlZddlZddlZddlZddl	m
Zddlm
Z
ddlmZddlmZddlmZddlmZmZmZdd	lmZmZmZdd
lmZddlmZerGddl 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((sR/opt/alt/python35/lib/python3.5/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Šttt
fk
r†qŠXndS(Nt	selfcheck(tstatetNonetstatefile_pathtostpathtjoinRRtopentjsontloadtIOErrort
ValueErrortKeyError(tselft	cache_dirt	statefile((sR/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/self_outdated_check.pyt__init__2s			cC@stjS(N(tsystprefix(R(((sR/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/self_outdated_check.pyRDscC@sα|js
dSttjj|jƒƒs,dSttjj|jƒƒi|jd6|jtƒd6|d6}t	j
|dtddƒ}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((sR/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/self_outdated_check.pytsaveIs 	


(t__name__t
__module__R+tpropertyRR>(((sR/opt/alt/python35/lib/python3.5/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((sR/opt/alt/python35/lib/python3.5/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ƒ}tdtd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€:	( Rtpackaging_versiontparseRRR)tdatetimetutcnowRtstrptimeR6t
total_secondsRtcreateR8RRCRtfind_best_candidatetbest_candidatetstrRR>tbase_versionRFtformatR,t
executabletloggertwarningt	Exceptiontdebug(tsessionRGtinstalled_versiontpip_versionR/RR;R.RKRLtfinderRVtremote_versiontlocal_version_is_oldertpip_cmd((sR/opt/alt/python35/lib/python3.5/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
Rtpip._internal.utils.packagingRtpip._internal.utils.typingR
toptparsettypingRRRRtpip._internal.network.sessionRR6t	getLoggerR?R[RtobjectRRFRf(((sR/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/self_outdated_check.pyt<module>s2"	<	
Back to Directory File Manager