+
    LV-jš  ã                   ód   € ^ RI t ^ RIt^ RIt^ RIt^ RIHtHt ^RIHt RR lt	 ! R R]]4      t
R# )é    N)ÚAsyncFileSystemÚrunning_async)ÚChainedFileSystemc                óJ   a a€ \         P                  ! S 4      V V3R l4       pV# )ai  
Wraps a synchronous function to make it awaitable.

Parameters
----------
func : callable
    The synchronous function to wrap.
obj : object, optional
    The instance to bind the function to, if applicable.
semaphore : asyncio.Semaphore, optional
    A semaphore to limit concurrent calls.

Returns
-------
coroutine
    An awaitable version of the function.
c               Ÿ   ó6  <"  € S'       dH   S;_uu_4       GR j  x€L
  \         P                  ! S.V O5/ VB G R j  x€L
 uuR R R 4      GR j  x€L
  # \         P                  ! S.V O5/ VB G R j  x€L
 #  LZ L: L+  + GR j  x€L 
 '       g   i     LA; i L&5i©N)ÚasyncioÚ	to_thread)ÚargsÚkwargsÚfuncÚ	semaphores   *,€€Út/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/fsspec/implementations/asyn_wrapper.pyÚwrapperÚasync_wrapper.<locals>.wrapper   si   øé € çß —y’yÜ$×.Ò.¨tÐE°dÒE¸fÑE×E÷ !—y’yä×&Ò& tÐ=¨dÒ=°fÑ=×=Ð=ñ !ÙE÷ !—y—y’yúá=ùsf   ƒBšA5›BžA;¼A7½A;Á BÁA9Á"BÁ0BÁ1BÁ7A;Á9BÁ;B	ÂBÂ
B	ÂB	Â	B)Ú	functoolsÚwraps)r   Úobjr   r   s   f&f r   Úasync_wrapperr      s'   ù€ ô& ‡_‚_�TÓõ>ó ð>ð €Nó    c                   óh   a a€ ] tR t^(t oRtRtRtR	V 3R llt]R 4       t	R t
]R 4       tRtVtV ;t# )
ÚAsyncFileSystemWrappera8  
A wrapper class to convert a synchronous filesystem into an asynchronous one.

This class takes an existing synchronous filesystem implementation and wraps all
its methods to provide an asynchronous interface.

Parameters
----------
sync_fs : AbstractFileSystem
    The synchronous filesystem instance to wrap.
Fc                óø   <€ Vf   \        4       p\        SV `  ! RRV/VB  Ve   Wn        M\        P
                  ! V3/ VB V n        V P                  P                  V n        WPn        V P                  4        R # )NÚasynchronous© )	r   ÚsuperÚ__init__Úsync_fsÚfsspecÚ
filesystemÚprotocolr   Ú_wrap_all_sync_methods)	ÚselfÚfsr   Útarget_protocolÚtarget_optionsr   Úmax_concurrent_tasksr   Ú	__class__s	   &&&&&&&,€r   r   ÚAsyncFileSystemWrapper.__init__8   sj   ø€ ð ÒÜ(›?ˆLÜ‰ÒÑ= lÐ=°fÒ=ØŠ>Ø�Lä!×,Ò,¨_ÑOÀÑOˆDŒLØŸ™×-Ñ-ˆŒØ"ŒØ×#Ñ#Ö%r   c                ó4   € R V P                   P                   2# )Úasync_)r   Úfsid)r#   s   &r   r,   ÚAsyncFileSystemWrapper.fsidM   s   € à˜Ÿ™×)Ñ)Ð*Ð+Ð+r   c                óÐ  € R0p\        V P                  4       FÉ  pVP                  R4      '       g   W!9   d   K"  \        P                  ! V P                  V4      p\        V\        4      '       d   K[  \        V P                  V4      p\        V4      '       g   K„  \        P                  ! V4      '       d   K¢  \        W@V P                  R7      p\        V RV 2V4       KË  	  R# )zW
Wrap all synchronous methods of the underlying filesystem with asynchronous versions.
ÚopenÚ_)r   r   N)Údirr   Ú
startswithÚinspectÚgetattr_staticÚ
isinstanceÚpropertyÚgetattrÚcallableÚiscoroutinefunctionr   r   Úsetattr)r#   Úexcluded_methodsÚmethod_nameÚattrÚmethodÚasync_methods   &     r   r"   Ú-AsyncFileSystemWrapper._wrap_all_sync_methodsQ   s¬   € ð #˜8ÐÜ˜tŸ|™|Ö,ˆKØ×%Ñ% c×*Ò*¨kÔ.MÙä×)Ò)¨$¯,©,¸ÓDˆDÜ˜$¤×)Ò)Ùä˜TŸ\™\¨;Ó7ˆFÜ˜×Ô¬×(CÒ(CÀF×(KÔ(KÜ,¨VÈÏÉÔX�Ü˜  + Ð/°Ö>ó -r   c                óN   a€  ! V3R lRV 4      pRSP                    R2Vn         V# )aM  
Create a new class that can be used to instantiate an AsyncFileSystemWrapper
with lazy instantiation of the underlying synchronous filesystem.

Parameters
----------
sync_fs_class : type
    The class of the synchronous filesystem to wrap.

Returns
-------
type
    A new class that wraps the provided synchronous filesystem class.
c                   ó6   <a a€ ] tR t^tt oV V3R ltRtVtV ;t# )ÚJAsyncFileSystemWrapper.wrap_class.<locals>.GeneratedAsyncFileSystemWrapperc                ó6   <€ S! V/ VB p\         SV `  V4       R # r   )r   r   )r#   r   r   r   r(   Úsync_fs_classs   &*, €€r   r   ÚSAsyncFileSystemWrapper.wrap_class.<locals>.GeneratedAsyncFileSystemWrapper.__init__u   s   ø€ Ù'¨Ð8°Ñ8�Ü‘Ñ  Ö)r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r(   Ú__classdict__rE   s   @@€r   ÚGeneratedAsyncFileSystemWrapperrC   t   s   ú‡ € ÷*ö *r   rO   ÚAsyncÚWrapper)rG   )ÚclsrE   rO   s   &f r   Ú
wrap_classÚ!AsyncFileSystemWrapper.wrap_classc   s4   ø€ ÷"	*¨cô 	*ð �M×*Ñ*Ð+¨7Ð3ð 	(Ô0ð /Ð.r   )r!   r   r   )Úasyncwrapperr   )NNNNNN)rG   rH   rI   rJ   Ú__doc__r!   Úcachabler   r6   r,   r"   ÚclassmethodrS   rK   rL   rM   )r(   rN   s   @@r   r   r   (   sM   ù‡ € ñ
ð /€HØ€H÷&ð* ñ,ó ð,ò?ð$ ñ/ó ÷/ð /r   r   )NN)r	   r   r3   r   Úfsspec.asynr   r   Úchainedr   r   r   r   r   r   Ú<module>r[      s-   ðÛ Û Û ã ß 6å &ôô:T/˜_Ð.?ö T/r   