Re2ddlZddlZddlZddlZddlZddlZddlZddlm Z m Z ddl m Z ddlmZddlmZddlmZddlmZddlmZdd lmZmZmZdd lmZd Zeje Z!d e"d e"fdZ#GddZ$de"d e%fdZ&dedej'd dfdZ(dS)N)AnyDict)parse) LinkCollector) PackageFinder)get_default_environment)SelectionPreferences) PipSession)adjacent_tmp_filecheck_path_ownerreplace) ensure_dirz%Y-%m-%dT%H:%M:%SZkeyreturncz|}tj|}|SN)encodehashlibsha224 hexdigest)r key_bytesnames /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/self_outdated_check.py_get_statefile_namers/ I >) $ $ . . 0 0D KcXeZdZdeddfdZedefdZdedejddfdZdS) SelfCheckState cache_dirrNchi|_d|_|rtj|dt |j|_ t|jd5}tj ||_ddddS#1swxYwYdS#tttf$rYdSwxYwdS)N selfcheckzutf-8)encoding) statestatefile_pathospathjoinrropenjsonloadOSError ValueErrorKeyError)selfr statefiles r__init__zSelfCheckState.__init__!s%' "  "$',,;(;DH(E(E##D  $-@@@6I!%9!5!5DJ666666666666666666Z2      s6 B B: BB  BB BB/.B/ctjSr)sysprefix)r-s rrzSelfCheckState.key2s zr pypi_version current_timecR|jsdSttj|jsdSt tj|j|j|t|d}tj |dd}t|j5}| | dddn #1swxYwY t|j|jdS#t $rYdSwxYw)N)r last_checkr3T),:) sort_keys separators)r#r r$r%dirnamerrstrftimeSELFCHECK_DATE_FMTr(dumpsr writerr rr*)r-r3r4r"textfs rsavezSelfCheckState.save6s\"  F 0C D DEE  F 27??4#677888 8&//0BCC(   z%4JGGG t2 3 3 #q GGDKKMM " " " # # # # # # # # # # # # # # #  AFD/ 0 0 0 0 0    DD s$<(C00C47C4<D D&%D&) __name__ __module__ __qualname__strr/propertyrdatetimerBrrrr s#$"SX  H4E $      rrpkgcbt|}|duo d|jkS)zChecks 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. Npip)rget_distribution installer)rJdists rwas_installed_by_piprPYs4 # $ $ 5 5c : :D t  7 77rsessionoptionsctd}|sdS|j}d} t|j}t j}d|jvrad|jvrXt j|jdt}||z dkr |jd}|tj ||d}td d } tj || } | dj} | dSt#| j}|||t'|} || ko|j| jkot+d} | sdSt,jd }t0d |||dS#t4$r t0ddYdSwxYw)zCheck 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. rLN)rr6r3i: T)rRsuppress_no_indexF) allow_yankedallow_all_prereleases)link_collectorselection_prefsz -m pipzYou 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)rrMversionrrrHutcnowr"strptimer= total_secondsrcreater rfind_best_candidatebest_candidaterFrB parse_version base_versionrPr1 executableloggerwarning Exceptiondebug)rQrRinstalled_dist pip_versionr3r"r4r6rWrXfinderr`remote_versionlocal_version_is_olderpip_cmds rpip_self_version_checkrncsV-..??FFN  (KLE ):;;;(//11 5; & &>U[+H+H!*33 L)+=Jz)88::=MMM${>:   *1"&N3"&+O #)- /F$77>>MN%~566L JJ|\ 2 2 2&|44 . ( ,(N,GG ,$U++ &  F ^,,, 2              C        sC9F;+A F; ,F;;&G%$G%))rHrr(loggingoptparseos.pathr$r1typingrrpip._vendor.packaging.versionrrapip._internal.index.collectorr"pip._internal.index.package_finderrpip._internal.metadatar$pip._internal.models.selection_prefsr pip._internal.network.sessionr pip._internal.utils.filesystemr r r pip._internal.utils.miscrr= getLoggerrCrdrFrrboolrPValuesrnrIrrr~s  @@@@@@777777<<<<<<::::::EEEEEE444444WWWWWWWWWW//////)  8 $ $SS 66666666r8c8d8888S JS S TS S S S S S r