+
    §úÎj@  ã                   ó|   € ^ RI t ^ RIHt ] P                  ! R4      t ! R R4      t ! R R4      t ! R R	]4      tR# )
é    N)ÚdequeÚfsspecc                   óF   a € ] tR t^t o RtR tR tR tR tR	R lt	Rt
V tR# )
ÚTransactionzôFilesystem transaction write context

Gathers files for deferred commit or discard, so that several write
operations can be finalized semi-atomically. This works by having this
instance as the ``.transaction`` attribute of the given filesystem
c                ó0   € Wn         \        4       V n        R# )ú/
Parameters
----------
fs: FileSystem instance
N)Úfsr   Úfiles)Úselfr	   Úkwargss   &&,ÚL/opt/data/cache/scratch/pip-target-_o6w5emm/lib/python/fsspec/transaction.pyÚ__init__ÚTransaction.__init__   s   € ð ŒÜ“WˆŽ
ó    c                ó&   € V P                  4        V # ©N)Ústart©r   s   &r   Ú	__enter__ÚTransaction.__enter__   s   € Ø�
‰
ŒØˆr   c                ó¨   € V P                  VRJ R7       V P                  '       d,   RV P                  n        RV P                  n        RV n        R# R# )z;End transaction and commit, if exit is not due to exceptionN)ÚcommitF)Úcompleter	   Ú_intransÚ_transaction)r   Úexc_typeÚexc_valÚexc_tbs   &&&&r   Ú__exit__ÚTransaction.__exit__   sD   € ð 	�‰˜X¨Ð-ˆÔ.Ø�7�7ˆ7Ø$ˆD�G‰GÔØ#'ˆD�G‰GÔ ØˆDŽGñ r   c                óF   € \        4       V n        RV P                  n        R# )z&Start a transaction on this FileSystemTN)r   r
   r	   r   r   s   &r   r   ÚTransaction.start%   s   € ä“WˆŒ
Øˆ�‰Ör   c                ó‚  € Rp V P                   '       dH   V P                   P                  4       pV'       d   VP                  4        MVP                  4        RpKY   Ve   V P                   P	                  V4       V P                   '       d,    V P                   P                  4       P                  4        K=  RV P                  n	        RV P                  n
        RV n        R#   \
         d    \        P                  RRR7        K�  i ; i  Te   T P                   P	                  T4       T P                   '       dU    T P                   P                  4       P                  4        K=    \
         d    \        P                  RRR7        Kb  i ; iRT P                  n	        RT P                  n
        RT n        i ; i)ú8Finish transaction: commit or discard all deferred filesNzDiscarding deferred file failedT)Úexc_infoF)r
   Úpopleftr   ÚdiscardÚ
appendleftÚ	ExceptionÚloggerÚdebugr	   r   r   )r   r   Úfs   && r   r   ÚTransaction.complete*   sS  € àˆð	Ø—*—*�*Ø—J‘J×&Ñ&Ó(�ßØ—H‘H•Jà—I‘I”KØ’ð ð Š}Ø—
‘
×%Ñ% aÔ(ð
 —*—*�*ðSØ—J‘J×&Ñ&Ó(×0Ñ0Ö2ð  %ˆD�G‰GÔØ#'ˆD�G‰GÔ ØˆDŽGøô	 !ô SÜ—L‘LÐ!BÈT�L×RðSûð Š}Ø—
‘
×%Ñ% aÔ(ð
 —*—*�*ðSØ—J‘J×&Ñ&Ó(×0Ñ0Ö2øÜ ô SÜ—L‘LÐ!BÈT�L×RðSúà$ˆD�G‰GÔØ#'ˆD�G‰GÔ ØˆD�GúsK   „D –!D ¸%D Â(C% Ã%"DÄ
DÄ1F>Å(E+Å)F>Å+"FÆF>ÆFÆ-F>©r
   r	   N©T)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r   r   r   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r      s(   ø‡ € ñòòòò ÷
ò r   r   c                   ó8   a € ] tR t^Ht o R tR tR tR tRtV t	R# )Ú	FileActorc                ó   € . V n         R # r   ©r
   r   s   &r   r   ÚFileActor.__init__I   s	   € ØˆŽ
r   c                ó€   € V P                    F  pVP                  4        K  	  V P                   P                  4        R # r   )r
   r   Úclear©r   r,   s   & r   r   ÚFileActor.commitL   s)   € Ø—”ˆAØ�H‰HŽJñ à�
‰
×ÑÖr   c                ó€   € V P                    F  pVP                  4        K  	  V P                   P                  4        R # r   )r
   r'   r?   r@   s   & r   r'   ÚFileActor.discardQ   s)   € Ø—”ˆAØ�I‰IŽKñ à�
‰
×ÑÖr   c                ó<   € V P                   P                  V4       R # r   )r
   Úappendr@   s   &&r   rE   ÚFileActor.appendV   s   € Ø�
‰
×Ñ˜!Ör   r<   N)
r0   r1   r2   r3   r   r   r'   rE   r5   r6   r7   s   @r   r:   r:   H   s   ø‡ € òòò
÷
ð r   r:   c                   ó<   a a€ ] tR t^Zt oV 3R ltRR ltRtVtV ;t# )ÚDaskTransactionc                ó¢   <€ ^ RI p\        SV `	  V4       VP                  4       pVP	                  \
        RR7      P                  4       V n        R# )r   NT)Úactor)ÚdistributedÚsuperr   Údefault_clientÚsubmitr:   Úresultr
   )r   r	   rK   ÚclientÚ	__class__s   &&  €r   r   ÚDaskTransaction.__init__[   s@   ø€ ó 	ä‰Ñ˜ÔØ×+Ñ+Ó-ˆØ—]‘]¤9°D�]Ó9×@Ñ@ÓBˆŽ
r   c                óh  €  V'       d*   V P                   P                  4       P                  4        M(V P                   P                  4       P                  4        RV P                  n        RV P                  n        RV n        R#   RT P                  n        RT P                  n        RT n        i ; i)r$   FN)r
   r   rO   r'   r	   r   r   )r   r   s   &&r   r   ÚDaskTransaction.completeg   s~   € ð	ßØ—
‘
×!Ñ!Ó#×*Ñ*Õ,à—
‘
×"Ñ"Ó$×+Ñ+Ô-à$ˆD�G‰GÔØ#'ˆD�G‰GÔ ØˆDŽGøð  %ˆD�G‰GÔØ#'ˆD�G‰GÔ ØˆD�Gús   ‚B ŠAB Â+B1r.   r/   )	r0   r1   r2   r3   r   r   r5   r6   Ú__classcell__)rQ   r8   s   @@r   rH   rH   Z   s   ù‡ € õ
C÷
ô 
r   rH   )ÚloggingÚcollectionsr   Ú	getLoggerr*   r   r:   rH   © r   r   Ú<module>rZ      s<   ðÛ Ý à	×	Ò	˜8Ó	$€÷>ñ >÷Bñ ô$�kö r   