U C^T@sddlZddlmZdddgZiZdZddidd id d d d d d dd iddd ddd ddd ddd ddiddd ddd ddd ddd ddd ddiddiddidd d d!Zed"ed"d#Zd$dZd%d&Z dS)'N) LooseVersionregistryget_filesystem_classdefaultfileclassz,fsspec.implementations.local.LocalFileSystemz.fsspec.implementations.memory.MemoryFileSystemz*fsspec.implementations.http.HTTPFileSystemz2HTTPFileSystem requires "requests" to be installed)rerrz(fsspec.implementations.zip.ZipFileSystemzgcsfs.GCSFileSystemz-Please install gcsfs to access Google Storagez*fsspec.implementations.sftp.SFTPFileSystemz2SFTPFileSystem requires "paramiko" to be installedz(fsspec.implementations.ftp.FTPFileSystemz'fsspec.implementations.hdfs.PyArrowHDFSz2pyarrow and local java libraries required for HDFSz&fsspec.implementations.webhdfs.WebHDFSz2webHDFS access requires "requests" to be installedzs3fs.S3FileSystemzInstall s3fs to access S3zadlfs.AzureDatalakeFileSystemz+Install adlfs to access Azure Datalake Gen1zadlfs.AzureBlobFileSystemzBInstall adlfs to access Azure Datalake Gen2 and Azure Blob Storagez/fsspec.implementations.cached.CachingFileSystemz6fsspec.implementations.cached.WholeFileCacheFileSystemz0fsspec.implementations.dask.DaskWorkerFileSystemz5Install dask distributed to access worker file system)rZmemoryhttphttpszipZgcsZgssftpsshftpZhdfsZwebhdfsZs3ZadlZabfscachedZ blockcache filecacheZdaskz0.3.0)Zs3fsZgcsfsc Cs"|dkr t}|tkr|tkr(td|t|}|ddd\}}t|d}d}zt|}WnDt k rt |d}Yn&t k r}z|}W5d}~XYnX|dk rt t ||rt |dd}|rt||krt d|j||t ||t|<t|}t |d dd kr||_|S) aKFetch 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. NzProtocol not known: %sr.r __version__z<'{}={}' is installed, but version '{}' or higher is requiredprotocol)ZabstractN)rrknown_implementations ValueErrorrsplit minversionsget importlib import_module ImportError Exception RuntimeErrorstrgetattrrformat__name__r) rbitmodnameZ minversionreversionclsr)3/tmp/pip-install-6_kvzl1k/fsspec/fsspec/registry.pyrFs@     cKst|}|f|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)rZstorage_optionsr(r)r)r* filesystemusr+) rZdistutils.versionr__all__rrrrrr+r)r)r)r*sb  7/