Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
ray / purelib / ray / thirdparty_files / psutil / __pycache__ / _compat.cpython-310.pyc
Size: Mime:
o

‚‚õbÃ:ã@sdZddlZddlZddlZddlZddlZddlZddlZgd¢Zej	ddkZ
eƒZe
rAe
ZeZeZeZeZdd„Zdd„ZneZeZeZeZd	d„Zd
d„Ze
rVeZn
eZeedfdd
„Ze
roeZeZeZeZeZeZnZddlZefdd„Z e e!ƒdd„ƒZe e!ƒdd„ƒZe e!ƒdd„ƒZe e!ƒdd„ƒZe e!ƒdd„ƒZe e!ƒdd„ƒZe "¡dkrÉze#ej$dƒ‚ey¾Yne#yÈe%dƒ‚wzddlm&Z&WnLe'yzdd l(m)Z)Wne'yðdd l*m)Z)Ynwe +d!gd"¢¡Z,Gd#d$„d$e-ƒZ.eƒfe/e
ee0e1dƒfƒe2e3e1e4fd%d&„Z5d8d)d*„Z&Ynwzdd+l6m7Z7Wne'y;ej8ej9Bdfd,d-„Z7Ynwzdd.l6m:Z:Wne'ySd9d0d1„Z:Ynwzdd2l;m<Z=Wne'ymGd3d4„d4ƒZ=Ynwz	dd5lm>Z>WdSe'y‰ej?d6d7„ƒZ>YdSw):z¦Module which provides compatibility with older Python versions.
This is more future-compatible rather than the opposite (prefer latest
Python 3 way of doing things).
éN)ÚPY3ÚlongÚrangeÚsuperÚunicodeÚ
basestringÚuÚbÚ	lru_cacheÚwhichÚget_terminal_sizeÚredirect_stderrÚFileNotFoundErrorÚPermissionErrorÚProcessLookupErrorÚInterruptedErrorÚChildProcessErrorÚFileExistsErrorécCó|S©N©©Úsrrú5/tmp/pip-target-wec6zj2z/lib/python/psutil/_compat.pyr/órcCs
| d¡S)Nzlatin-1)Úencoderrrrr	2ó
r	cCs
t|dƒS)NÚunicode_escape)rrrrrr:rcCrrrrrrrr	=récCsJ|tur˜t |¡}z|j|jjd}Wn
ttfy!tdƒ‚wz|j	}Wnt
tfyDz|jj	}Wnt
yAtdƒ‚wYnw|D]L}|j 
¡D]B}z,t|tjƒs{t|tƒr`|j}nz|j}Wnt
yt| ||¡}Ynwt|tjƒrWWnt
tfy‡YqNw|j|jurq’qNqGq˜tdƒ‚|tur¡t||ƒSt|ƒS)zuLike Python 3 builtin super(). If called without any arguments
        it attempts to infer them at runtime.
        rz'super() used in a function with no argsz$super() used in a non-newstyle classzsuper() called outside a methodN)Ú	_SENTINELÚsysÚ	_getframeÚf_localsÚf_codeÚco_varnamesÚ
IndexErrorÚKeyErrorÚRuntimeErrorÚ__mro__ÚAttributeErrorÚ	__class__Ú__dict__ÚvaluesÚ
isinstanceÚtypesÚFunctionTypeÚpropertyÚfgetÚ__func__Ú__get__Ú	TypeErrorÚ	func_codeÚ_builtin_super)Útype_Ztype_or_objZ
framedepthÚfÚmroÚmethrrrrLsT
ÿ
ÿÿþ

ÿ÷€ÿÿ
rcs‡fdd„}|S)Ncs*G‡‡fdd„dˆƒ‰ˆjˆ_ˆjˆ_ˆS)Ncs2eZdZ‡‡fdd„ZG‡fdd„deƒZ‡ZS)zE_instance_checking_exception.<locals>.wrapped.<locals>.TemporaryClasscsjt|ƒdkr(t|dˆƒr(|d}t|ƒD]}| d¡s%t||t||ƒƒqdStˆ|ƒj|i|¤ŽdS)NrrÚ__)Úlenr.ÚdirÚ
startswithÚsetattrÚgetattrrÚ__init__)ÚselfÚargsÚkwargsZ	unwrap_meÚattr)ÚTemporaryClassr+rrrB”s
€þzN_instance_checking_exception.<locals>.wrapped.<locals>.TemporaryClass.__init__cs eZdZ‡fdd„Zdd„ZdS)zS_instance_checking_exception.<locals>.wrapped.<locals>.TemporaryClass.__metaclass__csˆ|ƒSrr)ÚclsÚinst©Úinstance_checkerrrÚ__instancecheck__žsze_instance_checking_exception.<locals>.wrapped.<locals>.TemporaryClass.__metaclass__.__instancecheck__cSst ¡d}t||ƒS©Nr)r!Úexc_infor.)rHZ	classinfoÚvaluerrrÚ__subclasscheck__¡s
ze_instance_checking_exception.<locals>.wrapped.<locals>.TemporaryClass.__metaclass__.__subclasscheck__N)Ú__name__Ú
__module__Ú__qualname__rLrPrrJrrÚ
__metaclass__srT)rQrRrSrBÚtyperTÚ
__classcell__r©rGrK)r+rrG’s	rG)rQÚ__doc__rJ©Úbase_exceptionrWrÚwrapped‘sz-_instance_checking_exception.<locals>.wrappedr)rZr[rrYrÚ_instance_checking_exceptionsr\cCót|dtƒtjkS©NÚerrno)rAr r_ÚENOENT©rIrrrr«órcCr]r^)rAr r_ZESRCHrarrrr¯rbrcCst|dtƒtjtjfvSr^)rAr r_ÚEACCESÚEPERMrarrrr³s
ÿrcCr]r^)rAr r_ZEINTRrarrrr¸rbrcCr]r^)rAr r_ZECHILDrarrrr¼rbrcCr]r^)rAr r_ÚEEXISTrarrrrÀrbrÚCPythonÚpermzbbroken or incompatible Python implementation, see: https://github.com/giampaolo/psutil/issues/1659)r
)ÚRLockÚ	CacheInfo)ÚhitsÚmissesÚmaxsizeÚcurrsizec@s$eZdZdZefdd„Zdd„ZdS)Ú
_HashedSeqÚ	hashvaluecCs||dd…<||ƒ|_dSr©ro)rCÚtupÚhashrrrrBãsz_HashedSeq.__init__cCs|jSrrp)rCrrrÚ__hash__çsz_HashedSeq.__hash__N)rQrRrSÚ	__slots__rrrBrsrrrrrnàsrnc	sž|}	|r|| ¡ƒ}
|	|7}	|
D]}|	|7}	q|r9|	|‡fdd„|Dƒƒ7}	|r5|	|‡fdd„|
Dƒƒ7}	t|	ƒS||	ƒdkrKˆ|	dƒ|vrK|	dSt|	ƒS)Nc3s|]}ˆ|ƒVqdSrr)Ú.0Úv©rUrrÚ	<genexpr>õs€z_make_key.<locals>.<genexpr>c3s|]	\}}ˆ|ƒVqdSrr)ruÚkrvrwrrrx÷s€rr)Úitemsrn)rDÚkwdsÚtypedÚkwd_markÚ	fasttypesÚsortedÚtuplerUr=ÚkeyÚsorted_itemsÚitemrrwrÚ	_make_keyês
þr„édFcs‡‡fdd„}|S)z~Least-recently-used cache decorator, see:
        http://docs.python.org/3/library/functools.html#functools.lru_cache
        cstƒ‰ddg‰
d\‰‰t‰
ˆj‰t‰tƒ‰	g‰ˆˆddgˆdd…<ˆg‰d\‰‰‰‰ˆdkr7‡‡
‡fdd„}n(ˆdurJ‡‡‡‡‡
‡‡
‡‡f	dd„}n‡‡‡‡‡‡‡‡‡‡	‡
‡‡‡
‡‡fdd„}‡‡‡‡	‡‡
fdd	„}‡‡	‡‡
fd
d„}ˆ|_||_||_t 	|ˆ¡S)Nr)rr)rrércs"ˆ|i|¤Ž}ˆˆd7<|SrMr)rDr{Úresult)ÚMISSESÚstatsÚ
user_functionrrÚwrapper
sz7lru_cache.<locals>.decorating_function.<locals>.wrappercs\ˆ||ˆƒ}ˆ|ˆƒ}|ˆurˆˆd7<|Sˆ|i|¤Ž}|ˆ|<ˆˆd7<|SrMr)rDr{rr‡)	ÚHITSrˆÚcacheÚ	cache_getÚmake_keyÚrootr‰r|rŠrrr‹s
cs†|sˆrˆ
||ˆƒ}n|}ˆ	 ¡zBˆ|ƒ}|durNˆ\}|\}}}}||ˆ<||ˆ<|ˆ}||ˆ<|ˆ<||ˆ<||ˆ<ˆ
ˆd7<|Wˆ	 ¡SWˆ	 ¡nˆ	 ¡wˆ|i|¤Ž}ˆ	 ¡zYˆ\}|ˆvrmnBˆˆƒˆkr™|}	||	ˆ<||	ˆ<|	ˆ}ˆd<|ˆ}
d|ˆ<|ˆ<ˆ|
=|	ˆ|<n|ˆ}||||g}||ˆ<|ˆ<ˆ|<ˆ
ˆd7<Wˆ	 ¡|Sˆ	 ¡w)Nrr)ÚacquireÚrelease)rDr{rÚlinkrZ	link_prevZ	link_nextr‡ÚlastZoldrootZoldkey)rŒÚKEYrˆÚNEXTÚPREVÚRESULTÚ_lenrrŽÚlockrrlÚ
nonlocal_rootr‰r|rŠrrr‹sT
ô

ÿcs8ˆ ¡ztˆˆˆˆˆtˆƒƒWˆ ¡Sˆ ¡w)zReport cache statisticsN)r‘Ú
_CacheInfor=r’r)rŒrˆrršrlr‰rrÚ
cache_infoJsÿz:lru_cache.<locals>.decorating_function.<locals>.cache_infocsVˆ ¡z!ˆ ¡ˆd}||ddg|dd…<ddgˆdd…<Wˆ ¡dSˆ ¡w)z$Clear the cache and cache statisticsrN)r‘Úclearr’)r)rršr›r‰rrÚcache_clearSsz;lru_cache.<locals>.decorating_function.<locals>.cache_clear)
Údictr„Úgetr=rhÚ__wrapped__rrŸÚ	functoolsÚupdate_wrapper)rŠr‹rrŸ©rlr|)rŒr•rˆr–r—r˜r™rrŽršrr›rr‰rŠrÚdecorating_functions,*-	z&lru_cache.<locals>.decorating_functionNr)rlr|r¦rr¥rr
üscr
)rcs"dd„}tj ˆ¡r|ˆ|ƒrˆSdS|durtj dtj¡}|s#dS| tj¡}tj	dkr^tj
|vr:| dtj
¡tj dd¡ tj¡}t‡fd	d
„|DƒƒrTˆg}n
‡fdd„|Dƒ}nˆg}t
ƒ}|D](}tj |¡}||vrŽ| |¡|D]}	tj ||	¡}
||
|ƒr|
SqyqfdS)
aJGiven a command, mode, and a PATH string, return the path which
        conforms to the given mode on the PATH, or None if there is no such
        file.

        `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
        of os.environ.get("PATH"), or can be overridden with a custom search
        path.
        cSs&tj |¡ot ||¡otj |¡Sr)ÚosÚpathÚexistsÚaccessÚisdir)ÚfnÚmoderrrÚ
_access_checkssÿzwhich.<locals>._access_checkNÚPATHÚwin32rÚPATHEXTÚc3s"|]}ˆ ¡ | ¡¡VqdSr)ÚlowerÚendswith©ruÚext©Úcmdrrrx‡s€ zwhich.<locals>.<genexpr>csg|]}ˆ|‘qSrrrµr·rrÚ
<listcomp>Šszwhich.<locals>.<listcomp>)r§r¨ÚdirnameÚenvironr¡ÚdefpathÚsplitÚpathsepr!ÚplatformÚcurdirÚinsertÚanyÚsetÚnormcaseÚaddÚjoin)r¸r­r¨r®ÚpathextÚfilesÚseenr>ÚnormdirÚthefileÚnamerr·rrjs<	




ÿ€r)r©éPécCsvzddl}ddl}ddl}Wnty|YSwz| d| d|jd¡¡}|d|dfWSty:|YSw)NrÚhhrZ1234)ÚfcntlÚstructÚtermiosÚImportErrorÚunpackÚioctlÚ
TIOCGWINSZÚ	Exception)ÚfallbackrÑrÒrÓÚresrrrržsÿÿÿr)ÚTimeoutExpiredc@seZdZdS)ÚSubprocessTimeoutExpiredN)rQrRrSrrrrrܳsrÜ)r
c
cs@ttdƒ}zttd|ƒ|VWttd|ƒdSttd|ƒw)NÚstderr)rAr!r@)Ú
new_targetÚoriginalrrrr
»s€
r
)r…F)rÍ)@rXÚcollectionsÚ
contextlibr_r£r§r!r/Ú__all__Úversion_inforÚobjectr ÚintrrÚxrangeÚstrrrrr	rr7rrrrrrr¿rØr\ÚEnvironmentErrorÚpython_implementationÚOSErrorrer(r
rÔÚ	threadingrhZdummy_threadingÚ
namedtuplerœÚlistrnrÃÚ	frozensetrUrr€r=r„ÚshutilrÚF_OKÚX_OKrÚ
subprocessrÛrÜr
ÚcontextmanagerrrrrÚ<module>sÈ

8





ÿÿÿÿ
ýÛÿ2ÿÿþ