uawdijnntqw1x1x1
IP : 3.15.223.129
Hostname : host45.registrar-servers.com
Kernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
.
/
..
/
lib64
/
nss
/
..
/
lua
/
..
/
bpf
/
..
/
python3.8
/
__pycache__
/
functools.cpython-38.opt-1.pyc
/
/
U e5d�� @s�dZddddddddd d ddd g ZddlmZddlmZddlmZddlm Z dZ dZe efdd�Ze efdd�Z efdd�Zefdd�Zefdd�Zefdd�Zefdd �Zefd!d"�Zefd#d$�Zefd%d&�Zefd'd(�Zefd)d*�Zefd+d,�Zefd-d.�Zd/efd0efd1efgd1efd2efd/efgd2efd1efd0efgd0efd/efd2efgd3�Zd4d�Zd5d�Zzdd6lmZWnek �r�YnXe �Z!e!fd7d�Z"zdd8lm"Z"Wnek �r�YnXGd9d �d �Z#zdd:lm#Z#Wnek �rYnXGd;d �d e �Z$d<d=�Z%ed>d?d@dAdBg�Z&GdCdD�dDe'�Z(e �fe)e*he+e,e-fdEdF�Z.dYdId�Z/dJdK�Z0zddLlm0Z0Wnek �r�YnXdMdN�Z1dZdPdQ�Z2dRdS�Z3dTdU�Z4dVd�Z5GdWd�d�Z6e �Z7GdXd �d �Z8dOS)[zEfunctools.py - Tools for working with functions and callable objects �update_wrapper�wraps�WRAPPER_ASSIGNMENTS�WRAPPER_UPDATES�total_ordering� cmp_to_key� lru_cache�reduce�partial� partialmethod�singledispatch�singledispatchmethod�cached_property�)�get_cache_token)� namedtuple)�recursive_repr)�RLock)� __module__�__name__�__qualname__�__doc__�__annotations__)�__dict__c Csf|D]4}zt||�}Wntk r*YqXt|||�q|D]}t||��t||i��q>||_|S)aUpdate a wrapper function to look like the wrapped function wrapper is the function to be updated wrapped is the original function assigned is a tuple naming the attributes assigned directly from the wrapped function to the wrapper function (defaults to functools.WRAPPER_ASSIGNMENTS) updated is a tuple naming the attributes of the wrapper that are updated with the corresponding attribute from the wrapped function (defaults to functools.WRAPPER_UPDATES) )�getattr�AttributeError�setattr�update�__wrapped__)�wrapper�wrapped�assigned�updated�attr�value�r$�!/usr/lib64/python3.8/functools.pyr"scCstt|||d�S)a�Decorator factory to apply update_wrapper() to a wrapper function Returns a decorator that invokes update_wrapper() with the decorated function as the wrapper argument and the arguments to wraps() as the remaining arguments. Default arguments are as for update_wrapper(). This is a convenience function to simplify applying partial() to update_wrapper(). �rr r!)r rr&r$r$r%r@s�cCs$|�|�}||kr|S|o"||kS)zIReturn a > b. Computed by @total_ordering from (not a < b) and (a != b).��__lt__��self�other�NotImplemented� op_resultr$r$r%�_gt_from_ltXs r.cCs|�|�}|p||kS)zEReturn a <= b. Computed by @total_ordering from (a < b) or (a == b).r'r)r$r$r%�_le_from_lt_s r/cCs|�|�}||kr|S|S)z=Return a >= b. Computed by @total_ordering from (not a < b).r'r)r$r$r%�_ge_from_ltds r0cCs$|�|�}||kr|S|p"||kS)zJReturn a >= b. Computed by @total_ordering from (not a <= b) or (a == b).��__le__r)r$r$r%�_ge_from_leks r3cCs"|�|�}||kr|S|o ||kS)zFReturn a < b. Computed by @total_ordering from (a <= b) and (a != b).r1r)r$r$r%�_lt_from_lers r4cCs|�|�}||kr|S|S)z=Return a > b. Computed by @total_ordering from (not a <= b).r1r)r$r$r%�_gt_from_leys r5cCs$|�|�}||kr|S|o"||kS)zIReturn a < b. Computed by @total_ordering from (not a > b) and (a != b).��__gt__r)r$r$r%�_lt_from_gt�s r8cCs|�|�}|p||kS)zEReturn a >= b. Computed by @total_ordering from (a > b) or (a == b).r6r)r$r$r%�_ge_from_gt�s r9cCs|�|�}||kr|S|S)z=Return a <= b. Computed by @total_ordering from (not a > b).r6r)r$r$r%�_le_from_gt�s r:cCs$|�|�}||kr|S|p"||kS)zJReturn a <= b. Computed by @total_ordering from (not a >= b) or (a == b).��__ge__r)r$r$r%�_le_from_ge�s r=cCs"|�|�}||kr|S|o ||kS)zFReturn a > b. Computed by @total_ordering from (a >= b) and (a != b).r;r)r$r$r%�_gt_from_ge�s r>cCs|�|�}||kr|S|S)z=Return a < b. Computed by @total_ordering from (not a >= b).r;r)r$r$r%�_lt_from_ge�s r?r7r2r<r()r(r2r7r<csV�fdd�tD�}|std��t|�}t|D]"\}}||kr.||_t�||�q.�S)z6Class decorator that fills in missing ordering methodscs(h|] }t�|d�tt|d�k r|�qS�N)r�object)�.0�op��clsr$r%� <setcomp>�sz!total_ordering.<locals>.<setcomp>z6must define at least one ordering operation: < > <= >=)�_convert� ValueError�maxrr)rE�roots�root�opname�opfuncr$rDr%r�scsG�fdd�dt�}|S)z,Convert a cmp= function into a key= functioncsZeZdZdgZdd�Z�fdd�Z�fdd�Z�fdd �Z�fd d�Z�fdd �Z dZ dS)zcmp_to_key.<locals>.K�objcSs ||_dSr@�rN)r*rNr$r$r%�__init__�szcmp_to_key.<locals>.K.__init__cs�|j|j�dkS�NrrO�r*r+��mycmpr$r%r(�szcmp_to_key.<locals>.K.__lt__cs�|j|j�dkSrQrOrRrSr$r%r7�szcmp_to_key.<locals>.K.__gt__cs�|j|j�dkSrQrOrRrSr$r%�__eq__�szcmp_to_key.<locals>.K.__eq__cs�|j|j�dkSrQrOrRrSr$r%r2�szcmp_to_key.<locals>.K.__le__cs�|j|j�dkSrQrOrRrSr$r%r<�szcmp_to_key.<locals>.K.__ge__N)rrr� __slots__rPr(r7rUr2r<�__hash__r$rSr$r%�K�srX)rA)rTrXr$rSr%r�s)rcCsZt|�}|tkr>zt|�}WqBtk r:td�d�YqBXn|}|D]}|||�}qF|S)a� reduce(function, sequence[, initial]) -> value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty. z0reduce() of empty sequence with no initial valueN)�iter�_initial_missing�next� StopIteration� TypeError)ZfunctionZsequence�initial�itr#Zelementr$r$r%r�s)rcsJeZdZdZdZ�fdd�Zdd�Ze�dd��Zd d �Z dd�Z �ZS) r zSNew function with partial application of the given arguments and keywords. )�func�args�keywordsr�__weakref__csZt|�std��t|d�r4|j|}|j|�}|j}tt|��|�}||_||_||_|S)Nz#the first argument must be callabler`) �callabler]�hasattrrarbr`�superr �__new__)rEr`rarbr*�� __class__r$r%rgs zpartial.__new__cOs|j|�}|j|j|�|�Sr@�rbr`ra)r*rarbr$r$r%�__call__%s zpartial.__call__cCs�t|�j}t|j�g}|�dd�|jD��|�dd�|j��D��t|�jdkrld|�dd� |��d�S|�dd� |��d�S) Ncss|]}t|�VqdSr@)�repr)rB�xr$r$r%� <genexpr>-sz#partial.__repr__.<locals>.<genexpr>css |]\}}|�d|��VqdS)�=Nr$�rB�k�vr$r$r%rn.s� functoolsz functools.�(�, �)) �typerrlr`�extendrarb�itemsr�join)r*�qualnamerar$r$r%�__repr__)s zpartial.__repr__cCs*t|�|jf|j|j|jpd|jp$dffSr@)rwr`rarbr�r*r$r$r%� __reduce__3s�zpartial.__reduce__cCs�t|t�std��t|�dkr0tdt|�����|\}}}}t|�rrt|t�rr|dk r`t|t�rr|dk rzt|t�sztd��t|�}|dkr�i}nt|�tk r�t|�}|dkr�i}||_||_||_ ||_ dS)Nz(argument to __setstate__ must be a tuple�zexpected 4 items in state, got zinvalid partial state)� isinstance�tupler]�lenrd�dictrwrr`rarb)r*�stater`ra�kwds� namespacer$r$r%�__setstate__7s4 ����zpartial.__setstate__)rrrrrVrgrkrr|r~r�� __classcell__r$r$rhr%r s )r c@sDeZdZdZdd�Zde_dd�Zdd�Zdd d�Ze dd ��Z d S)r z�Method descriptor with partial application of the given arguments and keywords. Supports wrapping existing descriptors and handles non-descriptor callables as instance methods. cOs�t|�dkr|^}}}nV|s&td��nHd|krZ|�d�}|^}}ddl}|jdtdd�ntdt|�d��t|�}t|�s�t|d �s�td � |���t |t�r�|j|_|j ||_ |j|�|_n||_||_ ||_dS)N�z8descriptor '__init__' of partialmethod needs an argumentr`rz0Passing 'func' as keyword argument is deprecated)� stacklevelz8type 'partialmethod' takes at least one argument, got %d��__get__z${!r} is not callable or a descriptor)r�r]�pop�warnings�warn�DeprecationWarningr�rdre�formatr�r r`rarb)rarbr*r`r�r$r$r%rP]s6 � �� zpartialmethod.__init__z#($self, func, /, *args, **keywords)cCsNd�tt|j��}d�dd�|j��D��}d}|j|jj|jj |j ||d�S)Nrucss|]\}}d�||�VqdS)z{}={!r}N)r�rpr$r$r%rn�s�z)partialmethod.__repr__.<locals>.<genexpr>z*{module}.{cls}({func}, {args}, {keywords}))�modulerEr`rarb)rz�maprlrarbryr�rirrr`)r*rarb� format_stringr$r$r%r|�s � �zpartialmethod.__repr__cs�fdd�}�j|_�|_|S)Ncs �j|�}�j|f�j|�|�Sr@rj)�cls_or_selfrarbr}r$r%�_method�s z3partialmethod._make_unbound_method.<locals>._method)�__isabstractmethod__�_partialmethod)r*r�r$r}r%�_make_unbound_method�sz"partialmethod._make_unbound_methodNcCs�t|jdd�}d}|dk rd|||�}||jk rdt|f|j�|j�}z|j|_Wntk rbYnX|dkr||���||�}|S)Nr�) rr`r rarb�__self__rr�r�)r*rNrE�get�result�new_funcr$r$r%r��s zpartialmethod.__get__cCst|jdd�S�Nr�F�rr`r}r$r$r%r��sz"partialmethod.__isabstractmethod__)N)rrrrrP�__text_signature__r|r�r��propertyr�r$r$r$r%r Us" cCst|t�r|j}q|Sr@)r�r r`�r`r$r$r%�_unwrap_partial�s r�� CacheInfo�hits�misses�maxsize�currsizec@s(eZdZdZdZefdd�Zdd�ZdS)� _HashedSeqz� This class guarantees that hash() will be called no more than once per element. This is important because the lru_cache() will hash the key multiple times on a cache miss. � hashvaluecCs||dd�<||�|_dSr@�r�)r*�tup�hashr$r$r%rP�sz_HashedSeq.__init__cCs|jSr@r�r}r$r$r%rW�sz_HashedSeq.__hash__N)rrrrrVr�rPrWr$r$r$r%r��sr�c s�|}|r&||7}|��D]} || 7}q|rh||�fdd�|D��7}|r�||�fdd�|��D��7}n$||�dkr��|d�|kr�|dSt|�S)a�Make a cache key from optionally typed positional and keyword arguments The key is constructed in a way that is flat as possible rather than as a nested structure that would take more memory. If there is only a single argument and its data type is known to cache its hash value, then that argument is returned without a wrapper. This saves space and improves lookup speed. c3s|]}�|�VqdSr@r$�rBrr�rwr$r%rn�sz_make_key.<locals>.<genexpr>c3s|]}�|�VqdSr@r$r�r�r$r%rn�sr�r)ry�valuesr�) rar��typed�kwd_mark� fasttypesr�rwr��key�itemr$r�r%� _make_key�s r��Fcsnt�t�r�dkr\d�nDt��rLt�t�rL�d}�t|��t�}t||�S�dk r\td����fdd�}|S)a�Least-recently-used cache decorator. If *maxsize* is set to None, the LRU features are disabled and the cache can grow without bound. If *typed* is True, arguments of different types will be cached separately. For example, f(3.0) and f(3) will be treated as distinct calls with distinct results. Arguments to the cached function must be hashable. View the cache statistics named tuple (hits, misses, maxsize, currsize) with f.cache_info(). Clear the cache and statistics with f.cache_clear(). Access the underlying function with f.__wrapped__. See: http://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU) rr�Nz=Expected first argument to be an integer, a callable, or Nonecst|��t�}t||�Sr@)�_lru_cache_wrapper� _CacheInfor)� user_functionr�r�r�r$r%�decorating_function sz&lru_cache.<locals>.decorating_function)r��intrd�boolr�r�rr])r�r�r�rr�r$r�r%r�s �cs�t��t�d\����i�d� � d��j��j�t�� g���ddg�dd�<�dkrh� �fdd�}nN�dkr���� �� ���fdd�}n*��������� � ��� ���fdd�}��� � �� fdd �}��� � � �fd d�}||_||_|S)N)rr�r��rFcs�d7��||�}|S�Nr�r$)rar�r�)r�r�r$r%r$s z#_lru_cache_wrapper.<locals>.wrappercsH�||��}�|��}|�k r*�d7�|S�d7��||�}|�|<|Sr�r$)rar�r�r�)�cache� cache_getr��make_keyr��sentinelr�r�r$r%r-s c s>� ||��}� �z�|�}|dk r~|\}}}}||�<||�<� �}||�<� �<||�<� |�<�d7�|W5QR�S�d7�W5QRX�||�}� ��|�kr�n��r�� } || �<|| �<| �� � �} � �}d� �<� �<�| =| �|<n6� �}|� ||g}||�<� �<�|<���k�W5QRX|Sr�r$)rar�r��linkZ link_prevZ link_nextZ_keyr�ZlastZoldrootZoldkeyZ oldresult)�KEY�NEXT�PREV�RESULTr�r�� cache_len�fullr��lockr�r�r�rKr�r�r$r%r<sB c s,���������W5QR�SQRXdS)zReport cache statisticsNr$r$)r�r�r�r�r�r�r$r%� cache_infousz&_lru_cache_wrapper.<locals>.cache_infoc s<��.�����ddg�dd�<d��d�W5QRXdS)z$Clear the cache and cache statisticsNrF)�clearr$)r�r�r�r�r�rKr$r%�cache_clearzs z'_lru_cache_wrapper.<locals>.cache_clear)rAr�r��__len__rr�r�)r�r�r�r�rr�r�r$)r�r�r�r�r�r�r�r�r�r�r�r�r�r�rKr�r�r�r%r�s**9 r�)r�cCs�g}dd�|D�}|s|S|D]2}|d}|D]}||dd�kr.d}qq.qRq|dkrbtd��|�|�|D]}|d|krp|d=qpqdS)z�Merges MROs in *sequences* to a single MRO using the C3 algorithm. Adapted from http://www.python.org/download/releases/2.3/mro/. cSsg|]}|r|�qSr$r$�rB�sr$r$r%� <listcomp>�sz_c3_merge.<locals>.<listcomp>rr�NzInconsistent hierarchy)�RuntimeError�append)� sequencesr��s1� candidate�s2�seqr$r$r%� _c3_merge�s" r�Nc stt|j��D]$\}�t�d�rt|j�|}q8qd}�rDt��ng�t|jd|��}g}t|j|d��}�D]0�t|��rtt�fdd�|jD��st|���qt|D]��� ��q��fdd�|D�}�fdd�|D�}�fd d�|D�} t |gg||| |g|g|g�S) a�Computes the method resolution order using extended C3 linearization. If no *abcs* are given, the algorithm works exactly like the built-in C3 linearization used for method resolution. If given, *abcs* is a list of abstract base classes that should be inserted into the resulting MRO. Unrelated ABCs are ignored and don't end up in the result. The algorithm inserts ABCs where their functionality is introduced, i.e. issubclass(cls, abc) returns True for the class itself but returns False for all its direct base classes. Implicit ABCs for a given class (either registered or inferred from the presence of a special method like __len__) are inserted directly after the last ABC explicitly listed in the MRO of said class. If two implicit ABCs end up next to each other in the resulting MRO, their ordering depends on the order of types in *abcs*. �__abstractmethods__rNc3s|]}t|��VqdSr@)� issubclass)rB�b)�baser$r%rn�sz_c3_mro.<locals>.<genexpr>csg|]}t|�d��qS���abcs��_c3_mro�rBr�r�r$r%r��sz_c3_mro.<locals>.<listcomp>csg|]}t|�d��qSr�r�r�r�r$r%r��scsg|]}t|�d��qSr�r�r�r�r$r%r��s)� enumerate�reversed� __bases__rer��listr��anyr��remover�) rEr��i�boundary�explicit_bases�abstract_bases�other_bases�explicit_c3_mros�abstract_c3_mros� other_c3_mrosr$)r�r�r%r��sD ��������r�cs�t�j����fdd���fdd��D���fdd���fdd��D��t���g}�D]�}g}|��D]0}|�krht�|�rh|��fdd�|jD��qh|s�|�|�qX|jtd d �|D] }|D]}||kr�|�|�q�q�qXt�|d�S)z�Calculates the method resolution order for a given class *cls*. Includes relevant abstract base classes (with their respective bases) from the *types* iterable. Uses a modified C3 linearization algorithm. cs|�kot|d�ot�|�S)N�__mro__)rer�)�typ)�basesrEr$r%� is_related�s�z _compose_mro.<locals>.is_relatedcsg|]}�|�r|�qSr$r$�rB�n)r�r$r%r��sz _compose_mro.<locals>.<listcomp>cs&�D]}||kr||jkrdSqdS)NTF)r�)r�r+)�typesr$r%�is_strict_base�sz$_compose_mro.<locals>.is_strict_basecsg|]}�|�s|�qSr$r$r�)r�r$r%r��scsg|]}|�kr|�qSr$r$r�)�type_setr$r%r��sT)r��reverser�)�setr��__subclasses__r�r��sortr�r�)rEr��mror��found�sub�subclsr$)r�rEr�r�r�r�r%�_compose_mro�s* rcCstt||���}d}|D]R}|dk r\||krX||jkrX||jkrXt||�sXtd�||���qj||kr|}q|�|�S)a^Returns the best matching implementation from *registry* for type *cls*. Where there is no registered implementation for a specific type, its method resolution order is used to find a more generic implementation. Note: if *registry* does not contain an implementation for the base *object* type, this function may return None. NzAmbiguous dispatch: {} or {})r�keysr�r�r�r�r�)rE�registryr�match�tr$r$r%� _find_impls" ���r cs�ddl}ddl}i�|���d����fdd��d����fdd� ���fdd�}t|d d ��|�t<�|_�|_|���|_�j |_ t||�|S)akSingle-dispatch generic function decorator. Transforms a function into a generic function, which can have different behaviours depending upon the type of its first argument. The decorated function acts as the default implementation, and additional implementations can be registered using the register() attribute of the generic function. rNcs|�dk r"t�}�|kr"���|�z�|}WnHtk rvz�|}Wntk rht|��}YnX|�|<YnX|S)z�generic_func.dispatch(cls) -> <function implementation> Runs the dispatch algorithm to return the best available implementation for the given *cls* registered on *generic_func*. N)rr��KeyErrorr )rE� current_token�impl)�cache_token�dispatch_cacherr$r%�dispatch.sz singledispatch.<locals>.dispatchcs�|dkr�t�t�r ��fdd�St�di�}|s@td��d����}ddlm}tt||�����\}�t�t�s�td |�d ��d���|��<�dkr�t �d�r�t �����|S) z�generic_func.register(cls, func) -> func Registers a new implementation for the given *cls* on a *generic_func*. Ncs ��|�Sr@r$)�f)rE�registerr$r%�<lambda>N�z2singledispatch.<locals>.register.<locals>.<lambda>rz(Invalid first argument to `register()`: zS. Use either `@register(some_class)` or plain `@register` on an annotated function.r)�get_type_hintszInvalid annotation for z. z is not a class.r�)r�rwrr]�typingrr[rYryrerr�)rEr`�annr�argname)rrrrrDr%rEs( � �z singledispatch.<locals>.registercs&|st��d����|dj�||�S)Nz( requires at least 1 positional argumentr)r]ri)ra�kw)r�funcnamer$r%rfszsingledispatch.<locals>.wrapperrzsingledispatch function)N)r��weakref�WeakKeyDictionaryrrArr�MappingProxyTyperr��_clear_cacher)r`r�rrr$)rrrrrrr%rs! c@s8eZdZdZdd�Zddd�Zddd�Zed d ��ZdS) rz�Single-dispatch generic method descriptor. Supports wrapping existing descriptors and handles non-descriptor callables as instance methods. cCs4t|�s t|d�s t|�d���t|�|_||_dS)Nr�z is not callable or a descriptor)rdrer]r� dispatcherr`�r*r`r$r$r%rPs zsingledispatchmethod.__init__NcCs|jj||d�S)z�generic_method.register(cls, func) -> func Registers a new implementation for the given *cls* on a *generic_method*. r�)rr)r*rE�methodr$r$r%r�szsingledispatchmethod.registercs0���fdd�}�j|_�j|_t|�j�|S)Ncs$�j�|dj�}|����||�SrQ)rrrir�)ra�kwargsr!�rErNr*r$r%r��sz-singledispatchmethod.__get__.<locals>._method)r�rrr`)r*rNrEr�r$r#r%r��s zsingledispatchmethod.__get__cCst|jdd�Sr�r�r}r$r$r%r��sz)singledispatchmethod.__isabstractmethod__)N)N) rrrrrPrr�r�r�r$r$r$r%rxs c@s&eZdZdd�Zdd�Zddd�ZdS) r cCs ||_d|_|j|_t�|_dSr@)r`�attrnamerrr�r r$r$r%rP�szcached_property.__init__cCs8|jdkr||_n"||jkr4td|j�d|�d���dS)Nz?Cannot assign the same cached_property to two different names (z and z).)r$r])r*�owner�namer$r$r%�__set_name__�s �zcached_property.__set_name__Nc Cs�|dkr|S|jdkrtd��z |j}Wn8tk r`dt|�j�d|j�d�}t|�d�YnX|�|jt�}|tkr�|j�n|�|jt�}|tkr�|� |�}z|||j<Wn8tk r�dt|�j�d|j�d�}t|�d�YnXW5QRX|S)NzGCannot use cached_property instance without calling __set_name__ on it.zNo '__dict__' attribute on z instance to cache z property.zThe '__dict__' attribute on z7 instance does not support item assignment for caching ) r$r]rrrwrr�� _NOT_FOUNDr�r`)r*�instancer%r��msg�valr$r$r%r��s2 � � �zcached_property.__get__)N)rrrrPr'r�r$r$r$r%r �s )r�F)N)9r�__all__�abcr�collectionsr�reprlibr�_threadrrrrrr,r.r/r0r3r4r5r8r9r:r=r>r?rGrr� _functools�ImportErrorrArZrr r r�r�r�r�r��strr�rwr�r�rr�r�r�rr rrr(r r$r$r$r%�<module>s�� � � �����AX � ,t -)\(
/home/./../lib64/nss/../lua/../bpf/../python3.8/__pycache__/functools.cpython-38.opt-1.pyc