§
    dŠtjv  ã                   ó&  — d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZm	Z	 d dl
Z
d dlZ e
j        ¦   «         d„ ¦   «         Z G d„ d¦  «        Z e
j        dd¬	¦  «        d
eeddf         fd„¦   «         Z e
j        d¬¦  «        d„ ¦   «         ZdS )é    N)Údeque)Ú	GeneratorÚSequencec               #   ó  K  — t          j        d¦  «        } | j                             ¦   «          | j                             ¦   «          | j                             d¦  «         	 | V — | j                             ¦   «          | j                             ¦   «          | j                             d¦  «         dS # | j                             ¦   «          | j                             ¦   «          | j                             d¦  «         w xY w)z0
    Fixture providing a memory filesystem.
    ÚmemoryÚ N)ÚfsspecÚ
filesystemÚstoreÚclearÚpseudo_dirsÚappend)Úms    úM/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/fsspec/conftest.pyr   r      sà   è è € õ
 	Ô˜(Ñ#Ô#€AØ„G‡M‚M�O„O€OØ„M×ÒÑÔÐØ„M×Ò˜ÑÔÐð!Øˆˆˆà	Œ�Š‰ŒˆØ	Œ×ÒÑÔÐØ	Œ×Ò˜RÑ Ô Ð Ð Ð øð 	
Œ�Š‰ŒˆØ	Œ×ÒÑÔÐØ	Œ×Ò˜RÑ Ô Ð Ð øøøs   Á$B6 Â6ADc                   ó@   — e Zd ZdZd	d„Zddœdedeeef         fd„Z	dS )
ÚInstanceCacheInspectorzQ
    Helper class to inspect instance caches of filesystem classes in tests.
    ÚreturnNc                 óî   — t          t          j        j        g¦  «        }|rS|                     ¦   «         }|                     ¦   «          |                     |                     ¦   «         ¦  «         |°QdS dS )zU
        Clear instance caches of all currently imported filesystem classes.
        N)r   r	   ÚspecÚAbstractFileSystemÚpopleftÚclear_instance_cacheÚextendÚ__subclasses__)ÚselfÚclassesÚclss      r   r   zInstanceCacheInspector.clear$   s~   € õ �œÔ7Ð8Ñ9Ô9ˆØð 	1Ø—/’/Ñ#Ô#ˆCØ×$Ò$Ñ&Ô&Ð&Ø�NŠN˜3×-Ò-Ñ/Ô/Ñ0Ô0Ð0ð ð 	1ð 	1ð 	1ð 	1ð 	1ó    T)Ú	omit_zeror   c                óž  — i }t          t          j        j        g¦  «        }|r©|                     ¦   «         }t          |j        ¦  «        }t          |j        t          t          f¦  «        r7t          |j        t          ¦  «        r|j        n|j        d         }|s|s|||<   |                     |                     ¦   «         ¦  «         |°©|S )a  
        Gather counts of filesystem instances in the instance caches
        of all currently imported filesystem classes.

        Parameters
        ----------
        omit_zero:
            Whether to omit instance types with no cached instances.
        r   )r   r	   r   r   r   ÚlenÚ_cacheÚ
isinstanceÚprotocolr   Ústrr   r   )r   r   Úoutr   r   ÚcountÚkeys          r   Úgather_countsz$InstanceCacheInspector.gather_counts.   sÆ   € ð !ˆÝ�œÔ7Ð8Ñ9Ô9ˆØð 		1Ø—/’/Ñ#Ô#ˆCÝ˜œ
‘O”OˆEõ ˜#œ,­µ3¨Ñ8Ô8ð %Ý&0°´½sÑ&CÔ&CÐX�c”l�lÈÌÐVWÌ�Øð % 	ð %Ø$�C˜‘HØ�NŠN˜3×-Ò-Ñ/Ô/Ñ0Ô0Ð0ð ð 		1ð ˆ
r   )r   N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚboolÚdictr%   Úintr)   © r   r   r   r      sk   € € € € € ðð ð1ð 1ð 1ð 1ð 26ð ð ð ¨$ð ¸$¸sÀC¸x¼.ð ð ð ð ð ð r   r   ÚfunctionT)ÚscopeÚautouser   c               #   ó²   K  — t          ¦   «         } |                      ¦   «          	 | V — |                      ¦   «          dS # |                      ¦   «          w xY w)as  
    Fixture to ensure empty filesystem instance caches before and after a test.

    Used by default for all tests.
    Clears caches of all imported filesystem classes.
    Can be used to write test assertions about instance caches.

    Usage:

        def test_something(instance_caches):
            # Test code here
            fsspec.open("file://abc")
            fsspec.open("memory://foo/bar")

            # Test assertion
            assert instance_caches.gather_counts() == {"file": 1, "memory": 1}

    Returns
    -------
    instance_caches: An instance cache inspector for clearing and inspecting caches.
    N)r   r   )Úics    r   Úinstance_cachesr7   G   sQ   è è € õ. 
 Ñ	!Ô	!€Bà‡H‚H�J„J€JðØˆˆˆà
�Š‰
Œ
ˆ
ˆ
ˆ
øˆ�Š‰
Œ
ˆ
ˆ
øøøs   ¦A  Á A)r3   c              #   óÎ  K  — t          j        d¦  «         t          | ¦  «        }t          t          j                             |d¦  «        d¦  «        5 }|                     ddz  ¦  «         ddd¦  «         n# 1 swxY w Y   t          j	        t          j        ddd|d	d
dddg
¦  «        }	 t          j        d¦  «         dV — |                     ¦   «          |                     ¦   «          	 t!          j        | ¦  «         dS # t$          $ r Y dS w xY w# |                     ¦   «          |                     ¦   «          	 t!          j        | ¦  «         w # t$          $ r Y w w xY wxY w)z6
    Fixture providing a writable FTP filesystem.
    Ú	pyftpdlibr&   Úwbs   helloi'  Nz-mz-dz-uÚuserz-PÚpassz-wé   )Ú	localhostiI  r;   r<   )ÚpytestÚimportorskipr%   ÚopenÚosÚpathÚjoinÚwriteÚ
subprocessÚPopenÚsysÚ
executableÚtimeÚsleepÚ	terminateÚwaitÚshutilÚrmtreeÚ	Exception)ÚtmpdirÚdÚfÚPs       r   Úftp_writablerU   g   s§  è è € õ
 Ô˜Ñ$Ô$Ð$åˆF‰Œ€AÝ	�bŒg�lŠl˜1˜eÑ$Ô$ dÑ	+Ô	+ð "¨qØ	�Š�˜5Ñ Ñ!Ô!Ð!ð"ð "ð "ñ "ô "ð "ð "ð "ð "ð "ð "øøøð "ð "ð "ð "åÔÝ	Œ˜˜{¨D°!°T¸6À4ÈÐQUÐVñ	ô 	€Að	ÝŒ
�1‰ŒˆØ/Ð/Ð/Ð/à	�Š‰ŒˆØ	�Š‰Œˆð	ÝŒM˜&Ñ!Ô!Ð!Ð!Ð!øÝð 	ð 	ð 	ØˆDˆDð	øøøøð	 	
�Š‰ŒˆØ	�Š‰Œˆð	ÝŒM˜&Ñ!Ô!Ð!Ð!øÝð 	ð 	ð 	ØˆDð	øøøøøøsT   ÁA9Á9A=Â A=Â-D Ã.D Ä
DÄDÄ)E$Ä?EÅE$Å
E!ÅE$Å E!Å!E$)rB   rN   rF   rH   rJ   Úcollectionsr   Úcollections.abcr   r   r?   r	   Úfixturer   r   r7   rU   r1   r   r   ú<module>rY      s;  ðØ 	€	€	€	Ø €€€Ø Ð Ð Ð Ø 
€
€
€
Ø €€€Ø Ð Ð Ð Ð Ð Ø /Ð /Ð /Ð /Ð /Ð /Ð /Ð /à €€€à €€€ð €„ÑÔð!ð !ñ Ôð!ð %ð %ð %ð %ð %ñ %ô %ð %ðP €„�j¨$Ð/Ñ/Ô/ð˜Ð#9¸4ÀÐ#EÔFð ð ð ñ 0Ô/ðð> €„�jÐ!Ñ!Ô!ðð ñ "Ô!ðð ð r   