Viewing File: /opt/alt/python38/lib64/python3.8/site-packages/psutil/__pycache__/_compat.cpython-38.opt-1.pyc
U
xe_8 @ s d Z ddlZddlZddlZddlZddlZddlZddddddd d
ddd
ddddddgZejd dkZ e
Ze reZ
eZeZeZeZdd Zdd
Zn e
Z
eZeZeZdd Zdd
Ze reZneZeedfddZe reZeZeZeZeZeZnddlZefddZee dd Zee dd Zee dd Zee d d Zee d!d Zee d"d Ze! d#krze"ej#d$W n2 ek
r Y n e"k
r e$d%Y nX zdd&lm%Z% W n e&k
rl zdd'l'm(Z( W n" e&k
r dd'l)m(Z( Y nX e*d(d)d*d+d,gZ+G d-d. d.e,Z-e
fe.eee/e0dfe1e2e0e3fd/d0Z4d9d3dZ%Y nX zdd4l5m6Z6 W n, e&k
r ej7ej8B dfd5dZ6Y nX zdd6l5m9Z9 W n e&k
r d:d8d
Z9Y nX dS );zModule which provides compatibility with older Python versions.
This is more future-compatible rather than the opposite (prefer latest
Python 3 way of doing things).
NPY3longrangesuperunicode
basestringub lru_cachewhichget_terminal_sizeFileNotFoundErrorPermissionErrorProcessLookupErrorInterruptedErrorChildProcessErrorFileExistsError c C s | S N sr r A/opt/alt/python38/lib64/python3.8/site-packages/psutil/_compat.pyr + s c C s
| dS )Nzlatin-1)encoder r r r r . s c C s
t | dS )NZunicode_escape)r r r r r r 6 s c C s | S r r r r r r r 9 s c C sb | t krFt|}z|j|jjd }W n ttfk
rJ tdY nX z
|j }W nB t
tfk
r z|jj }W n t
k
r tdY nX Y nX |D ]} | j
D ]}zPt|tjst|tr|j}qz
|j}W q t
k
r ||| }Y qX qW n t
tfk
r Y qY nX |j|jkr q6qq qFqtd|t k rZt| |S t| S )zuLike Python 3 builtin super(). If called without any arguments
it attempts to infer them at runtime.
r z'super() used in a function with no argsz$super() used in a non-newstyle classzsuper() called outside a method) _SENTINELsys _getframef_localsf_codeco_varnames
IndexErrorKeyErrorRuntimeError__mro__AttributeError __class____dict__values
isinstancetypesFunctionTypepropertyfget__func____get__ TypeErrorZ func_code_builtin_super)Ztype_Ztype_or_objZ
framedepthfmroZmethr r r r H sB
c s fdd}|S )Nc s* G fddd j _ j _ S )Nc s2 e Zd Z fddZG fdddeZ ZS )zE_instance_checking_exception.<locals>.wrapped.<locals>.TemporaryClassc sd t |dkrNt|d rN|d }t|D ] }|ds*t| |t|| q*nt | j|| d S )Nr r __)lenr) dir
startswithsetattrgetattrr __init__)selfargskwargsZ unwrap_meattr)TemporaryClassr&