Module ImportFrom alias alias alias alias alias alias alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias alias alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str With Call NameLoad keyword BinOpAdd AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr NameStore body Expr Yield NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str NameStore body Expr Call AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr NameLoad Expr Yield Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str NameStore body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Pass decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr If BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad NameLoad attr body If CompareIsNot NameLoad NameLoad body Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad Expr Call NameLoad NameLoad Return Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body With Call AttributeLoad NameLoad attr NameLoad NameLoad body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BinOpAdd Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Pass decorator_list decorator_list
N/A __future__ absolute_import division generators nested_scopes print_function unicode_literals with_statement N/A logging N/A os contextlib contextmanager pants.cache.artifact TarballArtifact pants.cache.artifact_cache ArtifactCache UnreadableArtifact pants.util.contextutil temporary_file pants.util.dirutil safe_delete safe_mkdir safe_mkdir_for safe_rm_oldest_items_in_dir safe_rmtree N/A logger N/A N/A logging getLogger __name__ BaseLocalArtifactCache N/A ArtifactCache N/A __init__ N/A N/A self artifact_root compression N/A N/A N/A 
    :param str artifact_root: The path under which cacheable products will be read/written.
    :param int compression: The gzip compression level for created artifacts.
                            Valid values are 0-9.
     N/A N/A N/A N/A super BaseLocalArtifactCache self __init__ artifact_root N/A N/A self _compression compression N/A N/A self _cache_root None N/A _artifact N/A N/A self path N/A N/A N/A N/A TarballArtifact N/A self artifact_root path N/A self _compression N/A _tmpfile N/A N/A self cache_key use N/A N/A N/A Allocate tempfile on same device as cache with a suffix chosen to prevent collisions N/A N/A temporary_file suffix N/A N/A cache_key id use root_dir N/A self _cache_root tmpfile N/A N/A N/A tmpfile N/A contextmanager insert_paths N/A N/A self cache_key paths N/A N/A N/A Gather paths into artifact, store it, and yield the path to stored artifact tarball. N/A N/A N/A self _tmpfile cache_key write tmp N/A N/A N/A N/A N/A N/A self _artifact N/A tmp name collect paths N/A N/A N/A N/A self _store_tarball cache_key N/A tmp name N/A contextmanager store_and_use_artifact N/A N/A self cache_key src results_dir N/A None N/A N/A Read the content of a tarball from an iterator and return an artifact stored in the cache. N/A N/A N/A self _tmpfile cache_key read tmp N/A N/A chunk src N/A N/A N/A N/A tmp write chunk N/A N/A N/A tmp close N/A tarball N/A N/A self _store_tarball cache_key N/A tmp name N/A artifact N/A N/A self _artifact tarball N/A N/A results_dir None N/A N/A N/A safe_rmtree results_dir N/A N/A N/A artifact extract N/A True N/A _store_tarball N/A N/A self cache_key src N/A N/A N/A Given a src path to an artifact tarball, store it and return stored artifact's path. N/A N/A N/A LocalArtifactCache N/A BaseLocalArtifactCache N/A N/A An artifact cache that stores the artifacts in local files. __init__ N/A N/A self artifact_root cache_root compression max_entries_per_target N/A None N/A N/A 
    :param str artifact_root: The path under which cacheable products will be read/written.
    :param str cache_root: The locally cached files are stored under this directory.
    :param int compression: The gzip compression level for created artifacts (1-9 or false-y).
    :param int max_entries_per_target: The maximum number of old cache files to leave behind on a cache miss.
     N/A N/A N/A N/A super LocalArtifactCache self __init__ artifact_root compression N/A N/A self _cache_root N/A N/A N/A os path realpath N/A N/A N/A os path expanduser cache_root N/A N/A self _max_entries_per_target max_entries_per_target N/A N/A safe_mkdir N/A self _cache_root N/A prune N/A N/A self root N/A N/A N/A Prune stale cache files

    If the option --cache-target-max-entry is greater than zero, then prune will remove all but n
    old cache files for each target/task.

    :param str root: The path under which cacheable artifacts will be cleaned
     N/A max_entries_per_target N/A self _max_entries_per_target N/A N/A N/A N/A N/A os path isdir root max_entries_per_target N/A N/A N/A safe_rm_oldest_items_in_dir root max_entries_per_target N/A has N/A N/A self cache_key N/A N/A N/A N/A N/A N/A N/A self _artifact_for cache_key exists N/A _artifact_for N/A N/A self cache_key N/A N/A N/A N/A N/A self _artifact N/A N/A self _cache_file_for_key cache_key N/A use_cached_files N/A N/A self cache_key results_dir N/A None N/A N/A tarfile N/A N/A self _cache_file_for_key cache_key N/A N/A N/A artifact N/A N/A self _artifact_for cache_key N/A N/A N/A artifact exists N/A N/A N/A results_dir None N/A N/A N/A safe_rmtree results_dir N/A N/A N/A artifact extract N/A True N/A N/A N/A Exception N/A e N/A N/A N/A N/A logger warn N/A N/A Error while reading {0} from local artifact cache: {1} format tarfile e N/A N/A safe_delete tarfile N/A N/A UnreadableArtifact cache_key e N/A False N/A try_insert N/A N/A self cache_key paths N/A N/A N/A N/A N/A self insert_paths cache_key paths N/A N/A N/A delete N/A N/A self cache_key N/A N/A N/A N/A safe_delete N/A N/A self _cache_file_for_key cache_key N/A _store_tarball N/A N/A self cache_key src N/A N/A N/A dest N/A N/A self _cache_file_for_key cache_key N/A N/A safe_mkdir_for dest N/A N/A N/A os rename src dest N/A N/A N/A self prune N/A N/A N/A os path dirname dest N/A dest N/A _cache_file_for_key N/A N/A self cache_key N/A N/A N/A N/A N/A N/A N/A os path join N/A self _cache_root N/A cache_key id N/A cache_key hash .tgz N/A N/A TempLocalArtifactCache N/A BaseLocalArtifactCache N/A N/A A local cache that does not actually store any files between calls.

  This implementation does not have a backing _cache_root, and never
  actually stores files between calls, but is useful for handling file IO for a remote cache.
   __init__ N/A N/A self artifact_root compression N/A N/A N/A 
    :param str artifact_root: The path under which cacheable products will be read/written.
     N/A N/A N/A N/A super TempLocalArtifactCache self __init__ artifact_root compression compression N/A _store_tarball N/A N/A self cache_key src N/A N/A N/A src N/A has N/A N/A self cache_key N/A N/A N/A False N/A use_cached_files N/A N/A self cache_key results_dir N/A None N/A N/A False N/A delete N/A N/A self cache_key N/A N/A N/A N/A N/A