add-determinism 0.7.3

RPM buildroot helper to strip nondeterministic bits in files
Documentation
a

Z��^s�c@s�gd�ZddlmZddlmZddlmZddlmZddl	m
Z
dZdZeefd	d
�Z
eefdd�Zefd
d�Zefdd�Zefdd�Zefdd�Zefdd�Zefdd�Zefdd�Zefdd�Zefdd�Zefdd �Zefd!d"�Zefd#d$�Zd%efd&efd'efgd'efd(efd%efgd(efd'efd&efgd&efd%efd(efgd)�Zd*d+�Zd,d-�Zzdd.lmZWne �y�Yn0e!�Z"e"fd/d0�Z#zdd1lm#Z#Wne �y�Yn0Gd2d3�d3�Z$zdd4lm$Z$Wne �y�Yn0Gd5d6�d6e!�Z%d7d8�Z&ed9gd:��Z'Gd;d<�d<e(�Z)e!�fe*e+he,e-e.fd=d>�Z/dWdAdB�Z0dCdD�Z1zddElm1Z1Wne �yxYn0dFdG�Z2dHdI�Z3dXdKdL�Z4dMdN�Z5dOdP�Z6dQdR�Z7GdSdT�dT�Z8e!�Z9GdUdV�dV�Z:dJS)Y)�update_wrapper�wraps�WRAPPER_ASSIGNMENTS�WRAPPER_UPDATES�total_ordering�cache�
cmp_to_key�	lru_cache�reduce�partial�
partialmethod�singledispatch�singledispatchmethod�cached_property�)�get_cache_token)�
namedtuple)�recursive_repr)�RLock)�GenericAlias)�
__module__�__name__�__qualname__�__doc__�__annotations__)�__dict__c	Csd|D]2}zt||�}Wnty(Yq0t|||�q|D]}t||��t||i��q<||_|S�N)�getattr�AttributeError�setattrZupdateZ__wrapped__)�wrapper�wrapped�assigned�updatedZattr�value�r#�!/usr/lib64/python3.9/functools.pyr#srcCstt|||d�S)N�rr r!)r	rr%r#r#r$rAs�rcC�$|�|�}||ur|S|o"||kSr��__lt__��self�other�NotImplementedZ	op_resultr#r#r$�_gt_from_ltY�
r-cC�"|�|�}||ur|S|p ||kSrr'r)r#r#r$�_le_from_lt`r.r0cC�|�|�}||ur|S|Srr'r)r#r#r$�_ge_from_ltgr.r2cC�$|�|�}||ur|S|p"||kSr��__le__r)r#r#r$�_ge_from_lenr.r6cC�"|�|�}||ur|S|o ||kSrr4r)r#r#r$�_lt_from_leur.r8cCr1rr4r)r#r#r$�_gt_from_le|r.r9cCr&r��__gt__r)r#r#r$�_lt_from_gt�r.r<cCr/rr:r)r#r#r$�_ge_from_gt�r.r=cCr1rr:r)r#r#r$�_le_from_gt�r.r>cCr3r��__ge__r)r#r#r$�_le_from_ge�r.rAcCr7rr?r)r#r#r$�_gt_from_ge�r.rBcCr1rr?r)r#r#r$�_lt_from_ge�r.rCr;r5r@r()r(r5r;r@csV�fdd�tD�}|std��t|�}t|D]"\}}||vr.||_t�||�q.�S)Ncs(h|] }t�|d�tt|d�ur|�qSr)r�object)�.0Zop��clsr#r$Z	<setcomp>��z!total_ordering.<locals>.<setcomp>z6must define at least one ordering operation: < > <= >=)�_convertZ
ValueErrorZmaxrr)rGZroots�rootZopnameZopfuncr#rFr$r�srcsG�fdd�dt�}|S)NcsZeZdZdgZdd�Z�fdd�Z�fdd�Z�fdd	�Z�fd
d�Z�fdd
�Z	dZ
dS)zcmp_to_key.<locals>.K�objcSs
||_dSr�rK)r*rKr#r#r$�__init__��zcmp_to_key.<locals>.K.__init__cs�|j|j�dkS�NrrL�r*r+��mycmpr#r$r(�rNzcmp_to_key.<locals>.K.__lt__cs�|j|j�dkSrOrLrPrQr#r$r;�rNzcmp_to_key.<locals>.K.__gt__cs�|j|j�dkSrOrLrPrQr#r$�__eq__�rNzcmp_to_key.<locals>.K.__eq__cs�|j|j�dkSrOrLrPrQr#r$r5�rNzcmp_to_key.<locals>.K.__le__cs�|j|j�dkSrOrLrPrQr#r$r@�rNzcmp_to_key.<locals>.K.__ge__N)rrr�	__slots__rMr(r;rSr5r@�__hash__r#rQr#r$�K�srV)rD)rRrVr#rQr$r�sr)rcCsXt|�}|tur<zt|�}Wq@ty8td�d�Yq@0n|}|D]}|||�}qD|S)Nz0reduce() of empty sequence with no initial value)�iter�_initial_missing�nextZ
StopIteration�	TypeError)ZfunctionZsequenceZinitialZitr"Zelementr#r#r$r�sr)rcsFeZdZdZ�fdd�Zdd�Ze�dd��Zdd	�Zd
d�Z	�Z
S)r	)�func�args�keywordsrZ__weakref__cs^t|�std��t|d�r8|j|}i|j�|�}|j}tt|��|�}||_||_||_|S)Nz#the first argument must be callabler[)	�callablerZ�hasattrr\r]r[Zsuperr	�__new__)rGr[r\r]r*��	__class__r#r$r`s

zpartial.__new__cOs*i|j�|�}|jg|j�|�Ri|��Sr�r]r[r\)r*r\r]r#r#r$�__call__*�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)rEZxr#r#r$�	<genexpr>2rHz#partial.__repr__.<locals>.<genexpr>css |]\}}|�d|��VqdS)z=Nr#�rEZk�vr#r#r$rg3rHZ	functoolsz
functools.z(�, z))
�typerrfr[Zextendr\r]�itemsr�join)r*Zqualnamer\r#r#r$�__repr__.s
zpartial.__repr__cCs*t|�|jf|j|j|jpd|jp$dffSr)rkr[r\r]r�r*r#r#r$�
__reduce__8s�zpartial.__reduce__cCs�t|t�std��t|�dkr0tdt|�����|\}}}}t|�rrt|t�rr|dur`t|t�rr|durzt|t�sztd��t|�}|dur�i}nt|�tur�t|�}|dur�i}||_||_||_	||_
dS)Nz(argument to __setstate__ must be a tupleizexpected 4 items in state, got zinvalid partial state)�
isinstance�tuplerZ�lenr^Zdictrkrr[r\r])r*Zstater[r\�kwdsZ	namespacer#r#r$�__setstate__<s4
����zpartial.__setstate__)rrrrTr`rdrrnrpruZ
__classcell__r#r#rar$r	s
	r	)r	c@sBeZdZdd�Zdd�Zdd�Zddd	�Zed
d��Ze	e
�ZdS)
r
cOsft|�s t|d�s td�|���t|t�rP|j|_|j||_i|j�|�|_n||_||_||_dS)N�__get__z${!r} is not callable or a descriptor)	r^r_rZ�formatrqr
r[r\r])r*r[r\r]r#r#r$rMbs�
zpartialmethod.__init__cCsNd�tt|j��}d�dd�|j��D��}d}|j|jj|jj	|j
||d�S)Nrjcss|]\}}d�||�VqdS)z{}={!r}N)rwrhr#r#r$rgws�z)partialmethod.__repr__.<locals>.<genexpr>z*{module}.{cls}({func}, {args}, {keywords}))ZmodulerGr[r\r])rmZmaprfr\r]rlrwrbrrr[)r*r\r]Z
format_stringr#r#r$rnus
�
�zpartialmethod.__repr__cs�fdd�}�j|_�|_|S)Ncs,i�j�|�}�j|g�j�|�Ri|��Srrc)Zcls_or_selfr\r]ror#r$�_method�rez3partialmethod._make_unbound_method.<locals>._method)�__isabstractmethod__Z_partialmethod)r*rxr#ror$�_make_unbound_method�sz"partialmethod._make_unbound_methodNcCs�t|jdd�}d}|durh|||�}||jurht|g|j�Ri|j��}z|j|_WntyfYn0|dur�|���||�}|S)Nrv)	rr[r	r\r]Z__self__rrzrv)r*rKrG�get�resultZnew_funcr#r#r$rv�s

zpartialmethod.__get__cC�t|jdd�S�NryF�rr[ror#r#r$ry��z"partialmethod.__isabstractmethod__r)rrrrMrnrzrv�propertyry�classmethodr�__class_getitem__r#r#r#r$r
Zs

r
cCst|t�r|j}q|Sr)rqr	r[�r[r#r#r$�_unwrap_partial�s
r�Z	CacheInfo)�hits�misses�maxsizeZcurrsizec@s$eZdZdZefdd�Zdd�ZdS)�
_HashedSeq�	hashvaluecCs||dd�<||�|_dSr�r�)r*Ztup�hashr#r#r$rM�sz_HashedSeq.__init__cCs|jSrr�ror#r#r$rU�rNz_HashedSeq.__hash__N)rrrrTr�rMrUr#r#r#r$r��sr�c
s�|}|r&||7}|��D]}	||	7}q|rh||�fdd�|D��7}|r�||�fdd�|��D��7}n$||�dkr��|d�|vr�|dSt|�S)Nc3�|]}�|�VqdSrr#�rEri�rkr#r$rg�rHz_make_key.<locals>.<genexpr>c3r�rr#r�r�r#r$rg�rH�r)rlZvaluesr�)
r\rt�typedZkwd_markZ	fasttypesrrrkrs�keyZitemr#r�r$�	_make_key�s
 r��Fcs~t�t�r�dkrld�nTt��r\t�t�r\�d}�t|��t�}��fdd�|_t||�S�durltd����fdd�}|S)Nrr�c�
��d�S�N�r�r�r#r#r�r#r$�<lambda>�rHzlru_cache.<locals>.<lambda>z=Expected first argument to be an integer, a callable, or Nonecs(t|��t�}��fdd�|_t||�S)Ncr�r�r#r#r�r#r$r�rHz8lru_cache.<locals>.decorating_function.<locals>.<lambda>)�_lru_cache_wrapper�
_CacheInfo�cache_parametersr)�
user_functionrr�r#r$�decorating_functionsz&lru_cache.<locals>.decorating_function)	rq�intr^Zboolr�r�r�rrZ)r�r�r�rr�r#r�r$r�s


�rcs�t��t�d\����i�d�	�
d��j��j�t��
g���ddg�dd�<�dkrh�
�fdd�}nN�dur����	��
���fdd�}n*���������	�
���
���fdd�}���	�
��
fdd	�}���	�
�
�fd
d�}||_||_|S)N)rr�iirFcs�d7��|i|��}|S�Nr�r#)r\rtr|)r�r�r#r$rsz#_lru_cache_wrapper.<locals>.wrappercsL�||��}�|��}|�ur*�d7�|S�d7��|i|��}|�|<|Sr�r#)r\rtr�r|)r�	cache_getr��make_keyr��sentinelr�r�r#r$r&s
csp�
||��}�	���|�}|dur�|\}}}}||�<||�<�
�}||�<�
�<||�<�
|�<�d7�|Wd�S�d7�Wd�n1s�0Y�|i|��}�	��|�vr�n���r�
}	||	�<||	�<|	��
�
�}
�
�}d�
�<�
�<�|
=|	�|<n6�
�}|�
||g}||�<�
�<�|<���k�Wd�n1�sb0Y|Sr�r#)r\rtr�ZlinkZ	link_prevZ	link_nextZ_keyr|ZlastZoldrootZoldkeyZ	oldresult)�KEY�NEXT�PREV�RESULTrr��	cache_len�fullr��lockr�r�r�rJr�r�r#r$r5sB&
*cs8�� �������Wd�S1s*0YdSrr#r#)r�r�r�r�r�r�r#r$�
cache_infonsz&_lru_cache_wrapper.<locals>.cache_infocsP��8�����ddg�dd�<d��d�Wd�n1sB0YdS)NrF)�clearr#)rr�r�r�r�rJr#r$�cache_clearss
z'_lru_cache_wrapper.<locals>.cache_clear)rDr�r{Z__len__rr�r�)r�r�r�r�rr�r�r#)r�r�r�r�r�rr�r�r�r�r�r�r�r�rJr�r�r�r$r�s**9	r�)r�cCstdd�|�S)N)r�)r)r�r#r#r$r�r�rcCs�g}dd�|D�}|s|S|D]2}|d}|D]}||dd�vr.d}qq.qRq|durbtd��|�|�|D]}|d|krp|d=qpqdS)NcSsg|]}|r|�qSr#r#�rEZsr#r#r$�
<listcomp>�rHz_c3_merge.<locals>.<listcomp>rr�zInconsistent hierarchy)�RuntimeError�append)Z	sequencesr|Zs1Z	candidateZs2Zseqr#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�}�fdd�|D�}	t
|gg|||	|g|g|g�S)	N�__abstractmethods__rc3s|]}t|��VqdSr)�
issubclass)rEZb)�baser#r$rg�sz_c3_mro.<locals>.<genexpr>c�g|]}t|�d��qS���abcs��_c3_mro�rEr�r�r#r$r��rHz_c3_mro.<locals>.<listcomp>cr�r�r�r�r�r#r$r��rHcr�r�r�r�r�r#r$r��rH)Z	enumerateZreversedZ	__bases__r_rs�listr�Zanyr�Zremover�)
rGr�ZiZboundaryZexplicit_basesZabstract_basesZother_basesZexplicit_c3_mrosZabstract_c3_mrosZ
other_c3_mrosr#)r�r�r$r��sD
��������r�cs�t�j����fdd���fdd��D���fdd���fdd��D��t���g}�D]�}g}|��D]0}|�vrht�|�rh|��fdd�|jD��qh|s�|�|�qX|jtd	d
�|D] }|D]}||vr�|�|�q�q�qXt�|d�S)Ncs|�vot|d�ot�|�S)N�__mro__)r_r�)�typ)�basesrGr#r$�
is_related�s�z _compose_mro.<locals>.is_relatedcsg|]}�|�r|�qSr#r#�rEZn)r�r#r$r��rHz _compose_mro.<locals>.<listcomp>cs&�D]}||kr||jvrdSqdS)NTF)r�)r�r+)�typesr#r$�is_strict_base�sz$_compose_mro.<locals>.is_strict_basecsg|]}�|�s|�qSr#r#r�)r�r#r$r��rHcsg|]}|�vr|�qSr#r#r�)�type_setr#r$r��rHT)r�Zreverser�)Zsetr�Z__subclasses__r�r�Zsortrsr�)rGr��mror�ZfoundZsubZsubclsr#)r�rGr�r�r�r�r$�_compose_mro�s*

r�cCstt||���}d}|D]R}|dur\||vrX||jvrX||jvrXt||�sXtd�||���qj||vr|}q|�|�S)NzAmbiguous dispatch: {} or {})r�Zkeysr�r�r�rwr{)rG�registryr�ZmatchZtr#r#r$�
_find_impls 
���r�cs�ddl}ddl}i�|���d����fdd��d
����fdd�	���fdd�}t|dd	��|�t<�|_�|_|���|_�j	|_
t||�|S)Nrcsx�dur"t�}�|kr"���|�z�|}WnDtyrz�|}Wntydt|��}Yn0|�|<Yn0|Sr)rr�ZKeyErrorr�)rGZ
current_tokenZimpl)�cache_token�dispatch_cacher�r#r$�dispatch0sz singledispatch.<locals>.dispatchcs�|dur�t�t�r ��fdd�St�di�}|s@td��d����}ddlm}tt||�����\}�t�t�s�td|�d	��d
���|��<�dur�t	�d�r�t
�����|S)Ncs
��|�Srr#)Zf)rG�registerr#r$r�PrHz2singledispatch.<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�)rqrkrrZZtypingr�rYrWrlr_rr�)rGr[Zannr�Zargname)r�r�r�r�rFr$r�Gs4
��
���z singledispatch.<locals>.registercs*|st��d����|dj�|i|��S)Nz( requires at least 1 positional argumentr)rZrb)r\Zkw)r��funcnamer#r$rhs
�
zsingledispatch.<locals>.wrapperrzsingledispatch functionr)r��weakrefZWeakKeyDictionaryrrDr�r�ZMappingProxyTyper�r�Z_clear_cacher)r[r�r�rr#)r�r�r�r�r�r�r$rs!
rc@s4eZdZdd�Zd
dd�Zddd�Zedd	��ZdS)rcCs4t|�s t|d�s t|�d���t|�|_||_dS)Nrvz  is not callable or a descriptor)r^r_rZr�
dispatcherr[�r*r[r#r#r$rM�s
zsingledispatchmethod.__init__NcCs|jj||d�S)Nr�)r�r�)r*rG�methodr#r#r$r��szsingledispatchmethod.registercs0���fdd�}�j|_�j|_t|�j�|S)Ncs(�j�|dj�}|����|i|��SrO)r�r�rbrv)r\Zkwargsr��rGrKr*r#r$rx�sz-singledispatchmethod.__get__.<locals>._method)ryr�rr[)r*rKrGrxr#r�r$rv�s
zsingledispatchmethod.__get__cCr}r~rror#r#r$ry�r�z)singledispatchmethod.__isabstractmethod__rr)rrrrMr�rvr�ryr#r#r#r$rzs



rc@s.eZdZdd�Zdd�Zddd�Zee�ZdS)	r
cCs ||_d|_|j|_t�|_dSr)r[�attrnamerrr�r�r#r#r$rM�szcached_property.__init__cCs8|jdur||_n"||jkr4td|j�d|�d���dS)Nz?Cannot assign the same cached_property to two different names (z and z).)r�rZ)r*�ownerZnamer#r#r$�__set_name__�s

���zcached_property.__set_name__Nc	Cs|dur|S|jdurtd��z
|j}Wn6ty^dt|�j�d|j�d�}t|�d�Yn0|�|jt�}|tu�r|j�v|�|jt�}|tur�|�	|�}z|||j<Wn6ty�dt|�j�d|j�d�}t|�d�Yn0Wd�n1s�0Y|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�rZrrrkrr{�
_NOT_FOUNDr�r[)r*Zinstancer�rZmsgZvalr#r#r$rv�sB
�
���

���.zcached_property.__get__r)	rrrrMr�rvr�rr�r#r#r#r$r
�s	
r
)r�Fr);Z__all__ZabcrZcollectionsrZreprlibrZ_threadrr�rrrrrr,r-r0r2r6r8r9r<r=r>rArBrCrIrrZ
_functoolsZImportErrorrDrXrr	r
r�r�r�r�r�Zstrrrrkrsr�rr�rr�r�r�r�rrr�r
r#r#r#r$Z<module>s�
�
�
�����AJ	�

.t	
-)\(