+
    7&Ï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   *,€€Ú]/opt/data/cache/scratch/pip-target-elquwxdg/lib/python/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        V P                  P                  V n        V P                  P                  V n        V P                  P                  V n	        WPn
        V P                  4        R # )NÚasynchronous© )r   ÚsuperÚ__init__Úsync_fsÚfsspecÚ
filesystemÚprotocolÚroot_markerÚ_strip_protocolÚ_parentr   Ú_wrap_all_sync_methods)	ÚselfÚfsr   Útarget_protocolÚtarget_optionsr   Úmax_concurrent_tasksr   Ú	__class__s	   &&&&&&&,€r   r   ÚAsyncFileSystemWrapper.__init__8   sŸ   ø€ ð ÒÜ(›?ˆLÜ‰ÒÑ= lÐ=°fÒ=ØŠ>Ø�Lä!×,Ò,¨_ÑOÀÑOˆDŒLØŸ™×-Ñ-ˆŒàŸ<™<×3Ñ3ˆÔØ#Ÿ|™|×;Ñ;ˆÔØ—|‘|×+Ñ+ˆŒØ"ŒØ×#Ñ#Ö%r   c                ó4   € R V P                   P                   2# )Úasync_)r   Úfsid)r&   s   &r   r/   ÚAsyncFileSystemWrapper.fsidQ   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¢  \        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ÚiscoroutinefunctionÚisgeneratorfunctionr   r   Úsetattr)r&   Úexcluded_methodsÚmethod_nameÚattrÚmethodÚasync_methods   &     r   r%   Ú-AsyncFileSystemWrapper._wrap_all_sync_methodsU   sÀ   € ð #˜8ÐÜ˜tŸ|™|Ö,ˆKØ×%Ñ% c×*Ò*¨kÔ.MÙä×)Ò)¨$¯,©,¸ÓDˆDÜ˜$¤×)Ò)Ùä˜TŸ\™\¨;Ó7ˆFô
 ˜× Ô Ü×3Ò3°F×;Ô;Ü×3Ò3°F×;Ô;ä,¨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^t 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__€   s   ø€ Ù'¨Ð8°Ñ8�Ü‘Ñ  Ö)r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r+   Ú__classdict__rI   s   @@€r   ÚGeneratedAsyncFileSystemWrapperrG      s   ú‡ € ÷*ö *r   rS   ÚAsyncÚWrapper)rK   )ÚclsrI   rS   s   &f r   Ú
wrap_classÚ!AsyncFileSystemWrapper.wrap_classn   s4   ø€ ÷"	*¨cô 	*ð �M×*Ñ*Ð+¨7Ð3ð 	(Ô0ð /Ð.r   )r$   r#   r!   r"   r   r   )Úasyncwrapperr   )NNNNNN)rK   rL   rM   rN   Ú__doc__r!   Úcachabler   r9   r/   r%   ÚclassmethodrW   rO   rP   rQ   )r+   rR   s   @@r   r   r   (   sM   ù‡ € ñ
ð /€HØ€H÷&ð2 ñ,ó ð,ò?ð2 ñ/ó ÷/ð /r   r   )NN)r	   r   r6   r   Úfsspec.asynr   r   Úchainedr   r   r   r   r   r   Ú<module>r_      s-   ðÛ Û Û ã ß 6å &ôô:_/˜_Ð.?ö _/r   