o
    h2-                     @  s  U d dl mZ d dlZd dlZd dlZg dZi Zded< eeZ	dZ
ddd	Zi d
ddddddddddddddidddddddddddiddddd ddid!d"d#dd$dd%id&d'd(dd)dd*id+d,d-dd.d/d0dddd1id2dd3ii d4dd5id6d7d8dd9d:d;dd<dd=id>d?d@ddAdBdCddDd7d8ddEddddFdGdHddIdJdKddLdJdKddMdNdOddPdNdOddQdRdSddTdUdVddWdd1idXddYii dZd[d\dd]d[d^dd_d`daddbddcidddedfddgdhdiddjdhdiddkdldmddnddoidpdqdrddsdldmddtdduidvdwdxddydzd{dd|d}d~ddddddddiZeeeeks_J ddd ZdZdddZdd Zdd ZdS )    )annotationsN)registryget_filesystem_classdefaultzdict[str, type]	_registryfileFc                 C  s   t |tr/| tv r|du r|t|  d krtd|  ddS ||p(| d|  dt| < dS | tv rG|du rGt|  |urEtd|  ddS |t| < dS )	a  Add implementation class to the registry

    Parameters
    ----------
    name: str
        Protocol name to associate with the class
    cls: class or str
        if a class: fsspec-compliant implementation class (normally inherits from
        ``fsspec.AbstractFileSystem``, gets added straight to the registry. If a
        str, the full path to an implementation class like package.module.class,
        which gets added to known_implementations,
        so the import is deferred until the filesystem is actually used.
    clobber: bool (optional)
        Whether to overwrite a protocol with the same name; if False, will raise
        instead.
    errtxt: str (optional)
        If given, then a failure to import the given class will result in this
        text being given.
    FclasszName (z;) already in the known_implementations and clobber is Falsez import failed for protocol r   errz.) already in the registry and clobber is FalseN)
isinstancestrknown_implementations
ValueErrorr   r   )nameclsclobbererrtxt r   c/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/fsspec/registry.pyregister_implementation   s"   


r   abfszadlfs.AzureBlobFileSystemzBInstall adlfs to access Azure Datalake Gen2 and Azure Blob Storager	   adlzadlfs.AzureDatalakeFileSystemz+Install adlfs to access Azure Datalake Gen1
arrow_hdfsz-fsspec.implementations.arrow.HadoopFileSystemz2pyarrow and local java libraries required for HDFSasync_wrapperr   z*fsspec.asyn_wrapper.AsyncWrapperFileSystem
asynclocalz&morefs.asyn_local.AsyncLocalFileSystemz:Install 'morefs[asynclocalfs]' to use AsyncLocalFileSystemaz
blockcachez/fsspec.implementations.cached.CachingFileSystemboxzboxfs.BoxFileSystemz,Please install boxfs to access BoxFileSystemcacheddaskz0fsspec.implementations.dask.DaskWorkerFileSystemz5Install dask distributed to access worker file systemdataz*fsspec.implementations.data.DataFileSystemdbfsz0fsspec.implementations.dbfs.DatabricksFileSystemz<Install the requests package to use the DatabricksFileSystemdirz*fsspec.implementations.dirfs.DirFileSystemdropboxz%dropboxdrivefs.DropboxDriveFileSystemzUDropboxFileSystem requires "dropboxdrivefs","requests" and ""dropbox" to be installeddvczdvc.api.DVCFileSystemz#Install dvc to access DVCFileSystemz,fsspec.implementations.local.LocalFileSystem	filecachez6fsspec.implementations.cached.WholeFileCacheFileSystemftpz(fsspec.implementations.ftp.FTPFileSystemgcszgcsfs.GCSFileSystemz-Please install gcsfs to access Google Storagegdrivezgdrivefs.GoogleDriveFileSystemz2Please install gdrivefs for access to Google Drivegenericz fsspec.generic.GenericFileSystemgitz(fsspec.implementations.git.GitFileSystemz(Install pygit2 to browse local git reposgithubz.fsspec.implementations.github.GithubFileSystemz1Install the requests package to use the github FSgshdfshfzhuggingface_hub.HfFileSystemz.Install huggingface_hub to access HfFileSystemhttpz*fsspec.implementations.http.HTTPFileSystemz@HTTPFileSystem requires "requests" and "aiohttp" to be installedhttpsjlabz0fsspec.implementations.jupyter.JupyterFileSystemz,Jupyter FS requires requests to be installedjupyterlakefszlakefs_spec.LakeFSFileSystemz5Please install lakefs-spec to access LakeFSFileSystem
libarchivez6fsspec.implementations.libarchive.LibArchiveFileSystemz#LibArchive requires to be installedlocalmemoryz.fsspec.implementations.memory.MemoryFileSystemocizocifs.OCIFileSystemz*Install ocifs to access OCI Object Storageocilakez%Install ocifs to access OCI Data Lakeosszossfs.OSSFileSystemz5Install ossfs to access Alibaba Object Storage System	referencez4fsspec.implementations.reference.ReferenceFileSystemrootzfsspec_xrootd.XRootDFileSystemzInstall fsspec-xrootd to access xrootd storage system. Note: 'root' is the protocol name for xrootd storage systems, not referring to root directoriess3zs3fs.S3FileSystemzInstall s3fs to access S3s3asftpz*fsspec.implementations.sftp.SFTPFileSystemz2SFTPFileSystem requires "paramiko" to be installedsimplecachez3fsspec.implementations.cached.SimpleCacheFileSystemsmbz(fsspec.implementations.smb.SMBFileSystemz?SMB requires "smbprotocol" or "smbprotocol[kerberos]" installedsshtarz(fsspec.implementations.tar.TarFileSystemtosfsztosfs.TosFileSystemzFInstall tosfs to access ByteDance volcano engine Tinder Object Storagewandbzwandbfs.WandbFSzInstall wandbfs to access wandbwebdavzwebdav4.fsspec.WebdavFileSystemz Install webdav4 to access WebDAVwebhdfsz&fsspec.implementations.webhdfs.WebHDFSz2webHDFS access requires "requests" to be installedzipz(fsspec.implementations.zip.ZipFileSystemzNot in alphabetical orderc              
   C  s   | st } | tvr7| tvrtd|  t|  }zt| t|d  W n ty6 } zt|d|d}~ww t|  }t|dddv rF| |_	|S )aK  Fetch named protocol implementation from the registry

    The dict ``known_implementations`` maps protocol names to the locations
    of classes implementing the corresponding file-system. When used for the
    first time, appropriate imports will happen and the class will be placed in
    the registry. All subsequent calls will fetch directly from the registry.

    Some protocol implementations require additional dependencies, and so the
    import may fail. In this case, the string in the "err" field of the
    ``known_implementations`` will be given as the error message.
    zProtocol not known: r   r
   Nprotocol)abstractN)
r   r   r   r   r   _import_classImportErrorgetgetattrrH   )rH   biter   r   r   r   r      s    r   zYour installed version of s3fs is very old and known to cause
severe performance issues, see also https://github.com/dask/dask/issues/10276

To fix, you should specify a lower version bound on s3fs, or
update the current installation.
fqpr   c                 C  s   d| v r|  dd\}}n|  dd\}}|dk}t|}|r/|jdddgk r/tt |dD ]}t||}q4t	|t
sHt|  d|S )aK  Take a fully-qualified path and return the imported class or identifier.

    ``fqp`` is of the form "package.module.klass" or
    "package.module:subobject.klass".

    Warnings
    --------
    This can import arbitrary modules. Make sure you haven't installed any modules
    that may execute malicious code at import time.
    :   .s3fs05z is not a class)rsplit	importlibimport_module__version__splitwarningswarns3_msgrM   r   type	TypeError)rP   modr   is_s3partr   r   r   rJ     s   


rJ   c                 K  s*   | dkr
t dt t| }|di |S )zInstantiate filesystems for given protocol and arguments

    ``storage_options`` are specific to the protocol being chosen, and are
    passed directly to the class.
    r   zfThe 'arrow_hdfs' protocol has been deprecated and will be removed in the future. Specify it as 'hdfs'.Nr   )r\   r]   DeprecationWarningr   )rH   storage_optionsr   r   r   r   
filesystem(  s   rf   c                   C  s   t tS )zReturn a list of the implemented protocols.

    Note that any given protocol may require extra packages to be importable.
    )listr   r   r   r   r   available_protocols9  s   rh   )FN)rP   r   )
__future__r   rX   typesr\   __all__r   __annotations__MappingProxyTyper   r   r   r   rg   sortedr   r^   rJ   rf   rh   r   r   r   r   <module>   s   

-	"#'(/3456:>?CGKOSW[_cgklmquyz 
  
    	  
        
         #
