zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
U
H=®d{ã@s"ddlmZddlZddlZddlZddlZddlZddlZddl    m
Z ddl m Z ddlmZddlmZddlmZddlmZmZmZdd    lmZmZmZdd
lmZdd lmZerèddl Z dd l!m"Z"m#Z#m$Z$m%Z%dd l&m'Z'dZ(e )e*¡Z+dd„Z,Gdd„de-ƒZ.dd„Z/dd„Z0dS)é)Úabsolute_importN)Úversion)Ú ensure_binary)Ú LinkCollector)Ú PackageFinder)ÚSelectionPreferences)Úadjacent_tmp_fileÚcheck_path_ownerÚreplace)Ú
ensure_dirÚget_distributionÚget_installed_version)Ú get_installer)ÚMYPY_CHECK_RUNNING)ÚAnyÚDictÚTextÚUnion)Ú
PipSessionz%Y-%m-%dT%H:%M:%SZcCst|ƒ}t |¡ ¡}|S©N)rÚhashlibÚsha224Ú    hexdigest)ÚkeyÚ    key_bytesÚname©rúXD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_internal/self_outdated_check.pyÚ_get_statefile_name*src@s(eZdZdd„Zedd„ƒZdd„ZdS)ÚSelfCheckStatec
Csni|_d|_|rjtj |dt|jƒ¡|_z&t|jƒ}t     |¡|_W5QRXWnt
t t fk
rhYnXdS)NÚ    selfcheck) ÚstateÚstatefile_pathÚosÚpathÚjoinrrÚopenÚjsonÚloadÚIOErrorÚ
ValueErrorÚKeyError)ÚselfÚ    cache_dirÚ    statefilerrrÚ__init__2sÿ zSelfCheckState.__init__cCstjSr)ÚsysÚprefix)r,rrrrDszSelfCheckState.keyc    Cs¦|js
dSttj |j¡ƒs dSttj |j¡ƒ|j| t¡|dœ}t    j
|ddd}t |jƒ}|  t |ƒ¡W5QRXzt|j|jƒWntk
r YnXdS)N)rÚ
last_checkÚ pypi_versionT)ú,ú:)Ú    sort_keysÚ
separators)r"r    r#r$Údirnamer rÚstrftimeÚSELFCHECK_DATE_FMTr'ÚdumpsrÚwriterr
rÚOSError)r,r3Ú current_timer!ÚtextÚfrrrÚsaveIs û zSelfCheckState.saveN)Ú__name__Ú
__module__Ú __qualname__r/ÚpropertyrrArrrrr1s
rcCst|ƒ}|sdSdt|ƒkS)zµ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.
    FÚpip)r r)ÚpkgÚdistrrrÚwas_installed_by_pipmsrIcCsZtdƒ}|sdSt |¡}d}zt|jd}tj ¡}d|jkrzd|jkrztj |jdt    ¡}|| 
¡dkrz|jd}|dkrÜt j ||dd}t d    d    d
}    tj ||    d }
|
 d¡j} | dkrÆWdSt| jƒ}| ||¡t |¡} || ko|j| jkotdƒ} | sWdSd  tj¡}t d |||¡Wn$tk
rTtjdddYnXdS)zÛ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.
    rFN)r-r2r3i€:    T)ÚoptionsÚsuppress_no_indexF)Ú allow_yankedÚallow_all_prereleases)Úlink_collectorÚselection_prefsz    {} -m pipz‰You are using pip version %s; however, version %s is available.
You should consider upgrading via the '%s install --upgrade pip' command.z5There was an error checking the latest version of pip)Úexc_info)r Úpackaging_versionÚparserr-ÚdatetimeÚutcnowr!Ústrptimer:Ú total_secondsrÚcreaterrÚfind_best_candidateÚbest_candidateÚstrrrAÚ base_versionrIÚformatr0Ú
executableÚloggerÚwarningÚ    ExceptionÚdebug)ÚsessionrJÚinstalled_versionÚ pip_versionr3r!r>r2rNrOÚfinderrYÚremote_versionÚlocal_version_is_olderÚpip_cmdrrrÚpip_self_version_checkzsl
 
þ
ýþþ 
 
 
 
ÿý üþri)1Ú
__future__rrSrr'ÚloggingÚos.pathr#r0Zpip._vendor.packagingrrQZpip._vendor.sixrÚpip._internal.index.collectorrÚ"pip._internal.index.package_finderrÚ$pip._internal.models.selection_prefsrÚpip._internal.utils.filesystemrr    r
Úpip._internal.utils.miscr r r Úpip._internal.utils.packagingrÚpip._internal.utils.typingrÚoptparseÚtypingrrrrÚpip._internal.network.sessionrr:Ú    getLoggerrBr^rÚobjectrrIrirrrrÚ<module>s2         
<