add-determinism 0.7.3

RPM buildroot helper to strip nondeterministic bits in files
Documentation
a

Z��^�.c@s�gd�ZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZddlZddl
mZddl
mZejjZddlmZmZmZmZmZGdd	�d	e�Ze�ZGd
d�de�ZGdd
�d
e�ZdS))�Queue�SimpleQueue�
JoinableQueue�N)�Empty�Full�)�
connection)�context)�debug�info�Finalize�register_after_fork�
is_exitingc@s�eZdZd-dd�Zdd�Zdd�Zdd	�Zd.dd�Zd/dd�Zd0dd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd �Zd!d"�Zd#d$�Zed%d&��Zed'd(��Zed)d*��Zed+d,��ZdS)1rrcCs�|dkrddlm}||_tjdd�\|_|_|��|_t	�
�|_tj
dkrTd|_n
|��|_|�|�|_d|_|��tj
dkr�t|tj�dS)Nrr)�
SEM_VALUE_MAXF�Zduplex�win32)Zsynchronizer�_maxsizer�Pipe�_reader�_writer�Lock�_rlock�osZgetpid�_opid�sys�platform�_wlockZBoundedSemaphore�_sem�
_ignore_epipe�_resetrr�_after_fork��selfZmaxsize�ctx�r#�./usr/lib64/python3.9/multiprocessing/queues.py�__init__%s




zQueue.__init__cCs.t�|�|j|j|j|j|j|j|j|j	fS�N)
r�assert_spawningrrrrrrrr�r!r#r#r$�__getstate__9s
�zQueue.__getstate__c	Cs0|\|_|_|_|_|_|_|_|_|��dSr&)	rrrrrrrrr�r!Zstater#r#r$�__setstate__>s�zQueue.__setstate__cCstd�|jdd�dS)NzQueue._after_fork()T)�
after_fork)r	rr(r#r#r$rCszQueue._after_forkFcCsj|r|j��nt�t���|_t��|_d|_d|_	d|_
d|_d|_|j
j|_|jj|_|jj|_dS�NF)�	_notemptyZ_at_fork_reinit�	threading�	Conditionr�collectionsZdeque�_buffer�_thread�_jointhread�_joincancelled�_closed�_closer�
send_bytes�_send_bytesr�
recv_bytes�_recv_bytes�poll�_poll)r!r,r#r#r$rGs


zQueue._resetTNcCsz|jrtd|�d���|j�||�s(t�|j�8|jdurB|��|j�	|�|j�
�Wd�n1sl0YdS�NzQueue z
 is closed)r6�
ValueErrorr�acquirerr.r3�
_start_threadr2�append�notify�r!�obj�block�timeoutr#r#r$�putVs
z	Queue.putcCs�|jrtd|�d���|r\|dur\|j�|��}Wd�n1sF0Y|j��n||rlt��|}|j�||�s~t	�zL|r�|t��}|�
|�s�t	�n|�
�s�t	�|��}|j��W|j��n|j��0t�|�Sr>)
r6r?rr;r�release�timeZ	monotonicr@rr=�_ForkingPickler�loads)r!rFrG�resZdeadliner#r#r$�getbs*&
z	Queue.getcCs|j|jj��Sr&)rr�_semlockZ
_get_valuer(r#r#r$�qsize|szQueue.qsizecC�
|��Sr&�r=r(r#r#r$�empty��zQueue.emptycCs|jj��Sr&)rrO�_is_zeror(r#r#r$�full�rTz
Queue.fullcCs
|�d�Sr-)rNr(r#r#r$�
get_nowait�rTzQueue.get_nowaitcCs|�|d�Sr-)rH�r!rEr#r#r$�
put_nowait�rTzQueue.put_nowaitcCsHd|_z$|j��W|j}|rDd|_|�n|j}|rBd|_|�0dS)NT)r6r�closer7)r!rZr#r#r$rZ�s�zQueue.closecCstd�|jr|��dS)NzQueue.join_thread())r	r4r(r#r#r$�join_thread�szQueue.join_threadcCs4td�d|_z|j��Wnty.Yn0dS)NzQueue.cancel_join_thread()T)r	r5r4ZcancelZAttributeErrorr(r#r#r$�cancel_join_thread�szQueue.cancel_join_threadc
Cs�td�|j��tjtj|j|j|j|j	|j
j|j|j
|jfdd�|_d|j_td�|j��td�|js�t|jtjt�|j�gdd�|_t|tj|j|jgd	d�|_dS)
NzQueue._start_thread()ZQueueFeederThread)ZtargetZargsZnameTzdoing self._thread.start()z... done self._thread.start()i����)Zexitpriorityi
)r	r2Zclearr/ZThreadr�_feedr.r9rrrZr�_on_queue_feeder_errorrr3ZdaemonZstartr5r�_finalize_join�weakrefZrefr4�_finalize_closer7r(r#r#r$rA�s2
��
�
�zQueue._start_threadcCs4td�|�}|dur(|��td�ntd�dS)Nzjoining queue threadz... queue thread joinedz... queue thread already dead)r	�join)ZtwrZthreadr#r#r$r_�s
zQueue._finalize_joincCsBtd�|�"|�t�|��Wd�n1s40YdS)Nztelling queue thread to quit)r	rB�	_sentinelrC)�buffer�notemptyr#r#r$ra�s
zQueue._finalize_closec
Csltd�|j}|j}	|j}
|j}t}tjdkr<|j}
|j}nd}
z�|�z|sT|
�W|	�n|	�0zh|�}||ur�td�|�WWdSt�	|�}|
dur�||�qh|
�z||�W|�qh|�0qhWnt
y�Yn0Wq@t�yd}zf|�rt|dd�t
jk�rWYd}~dSt��r>td|�WYd}~dS|��|||�WYd}~q@d}~00q@dS)Nz$starting thread to feed data to piperz%feeder thread got sentinel -- exiting�errnorzerror in queue thread: %s)r	r@rI�waitZpopleftrcrrrK�dumpsZ
IndexErrorZ	ExceptionZgetattrrfZEPIPEr
r
)rdrer8Z	writelockrZZignore_epipeZonerrorZ	queue_semZnacquireZnreleaseZnwaitZbpopleftZsentinelZwacquireZwreleaserE�er#r#r$r]�sN





zQueue._feedcCsddl}|��dS)Nr)�	tracebackZ	print_exc)rirErjr#r#r$r^szQueue._on_queue_feeder_error�r)F�TNrl)�__name__�
__module__�__qualname__r%r)r+rrrHrNrPrSrVrWrYrZr[r\rAZstaticmethodr_rar]r^r#r#r#r$r#s0




 
	

=rc@s@eZdZddd�Zdd�Zdd�Zdd
d�Zdd
�Zdd�Zd	S)rrcCs*tj|||d�|�d�|_|��|_dS)N)r"r)rr%Z	Semaphore�_unfinished_tasksr0�_condr r#r#r$r%)szJoinableQueue.__init__cCst�|�|j|jfSr&)rr)rqrpr(r#r#r$r).rTzJoinableQueue.__getstate__cCs,t�||dd��|dd�\|_|_dS)Ni����)rr+rqrpr*r#r#r$r+1�zJoinableQueue.__setstate__TNc	Cs�|jrtd|�d���|j�||�s(t�|j�h|j�B|jdurJ|��|j	�
|�|j��|j�
�Wd�n1s~0YWd�n1s�0YdSr>)r6r?rr@rr.rqr3rAr2rBrprIrCrDr#r#r$rH5s

zJoinableQueue.putcCsT|j�:|j�d�std��|jj��r2|j��Wd�n1sF0YdS)NFz!task_done() called too many times)rqrpr@r?rOrUZ
notify_allr(r#r#r$�	task_doneBs
zJoinableQueue.task_donecCs@|j�&|jj��s|j��Wd�n1s20YdSr&)rqrprOrUrgr(r#r#r$rbIszJoinableQueue.joinrkrl)	rmrnror%r)r+rHrsrbr#r#r#r$r's


rc@sNeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	e
ej�Z
dS)rcCsHtjdd�\|_|_|��|_|jj|_tj	dkr:d|_
n
|��|_
dS)NFrr)rrrrrrr<r=rrr)r!r"r#r#r$r%Ts


zSimpleQueue.__init__cCs|j��|j��dSr&)rrZrr(r#r#r$rZ]�
zSimpleQueue.closecCrQr&rRr(r#r#r$rSarTzSimpleQueue.emptycCst�|�|j|j|j|jfSr&)rr'rrrrr(r#r#r$r)drtzSimpleQueue.__getstate__cCs"|\|_|_|_|_|jj|_dSr&)rrrrr<r=r*r#r#r$r+hrrzSimpleQueue.__setstate__cCs:|j�|j��}Wd�n1s&0Yt�|�Sr&)rrr:rKrL)r!rMr#r#r$rNls(zSimpleQueue.getcCsXt�|�}|jdur"|j�|�n2|j�|j�|�Wd�n1sJ0YdSr&)rKrhrrr8rXr#r#r$rHrs


zSimpleQueue.putN)rmrnror%rZrSr)r+rNrHZclassmethod�typesZGenericAliasZ__class_getitem__r#r#r#r$rRs	
r)Z__all__rrr/r1rJrur`rfZqueuerrZ_multiprocessingZrrZ	reductionZForkingPicklerrKZutilr	r
rrr
Zobjectrrcrrr#r#r#r$Z<module>
s&{
+