/usr/local/lib/python3.6/site-packages/fsspec/__pycache__
Edit: /usr/local/lib/python3.6/site-packages/fsspec/__pycache__/spec.cpython-36.pyc (52248B)
3
8%Eg @ s d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ d dlm Z d dl
mZ ddlm
Z
ddlmZmZ ddlmZ dd lmZ dd
lmZmZmZmZmZ ejdZdd
ZG dd deZG dd dedZ G dd de j!Z"dS ) N)ESPIPE) has_magic)sha256 )_DEFAULT_CALLBACK)apply_configconf)DirCache)Transaction)_unstrip_protocolother_paths
read_blockstringify_pathtokenizeZfsspecc C s
| ||S )N )clsargskwargsr r 5/usr/local/lib/python3.6/site-packages/fsspec/spec.py
make_instance s r c s, e Zd ZdZ fddZ fddZ ZS )_Cacheda
Metaclass for caching file system instances.
Notes
-----
Instances are cached according to
* The values of the class attributes listed in `_extra_tokenize_attributes`
* The arguments passed to ``__init__``.
This creates an additional reference to the filesystem, which prevents the
filesystem from being garbage collected when all *user* references go away.
A call to the :meth:`AbstractFileSystem.clear_instance_cache` must *also*
be made for a filesystem instance to be garbage collected.
c s8 t j|| tjdr$tj | _ni | _tj | _ d S )NZweakref_instance_cache)
super__init__r getweakrefWeakValueDictionary_cacheosgetpid_pid)r r r ) __class__r r r ) s
z_Cached.__init__c s t |}t fdd jD }t jtj f|||}|jdd}tj jkrl j
j tj _| r jr| j
kr j
| S t
j||}||_||_||_|jrddlm} || jr| r| j
|<