Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore Num FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad orelse Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad With Call NameLoad NameLoad NameStore body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list decorator_list
N/A N/A 
Local file system cache backend.

This module implements the local cache backend which stores distribution
archives on the local file system. This is a very simple cache backend, all it
does is create directories and write local files. The only trick here is that
new binary distribution archives are written to temporary files which are
then moved into place atomically using :func:`os.rename()` to avoid partial
reads caused by running multiple invocations of pip-accel at the same time
(which happened in `issue 25`_).

.. _issue 25: https://github.com/paylogic/pip-accel/issues/25
 N/A logging N/A os N/A shutil pip_accel.caches AbstractCacheBackend pip_accel.utils AtomicReplace makedirs N/A logger N/A N/A logging getLogger __name__ LocalCacheBackend N/A AbstractCacheBackend N/A N/A The local cache backend stores Python distribution archives on the local file system. N/A PRIORITY 10 get N/A N/A self filename N/A N/A N/A 
        Check if a distribution archive exists in the local cache.

        :param filename: The filename of the distribution archive (a string).
        :returns: The pathname of a distribution archive on the local file
                  system or :data:`None`.
         N/A pathname N/A N/A N/A os path join N/A N/A self config binary_cache filename N/A N/A N/A N/A os path isfile pathname N/A N/A N/A N/A logger debug Distribution archive exists in local cache (%s). pathname N/A pathname N/A N/A N/A N/A logger debug Distribution archive doesn't exist in local cache (%s). pathname N/A None N/A put N/A N/A self filename handle N/A N/A N/A 
        Store a distribution archive in the local cache.

        :param filename: The filename of the distribution archive (a string).
        :param handle: A file-like object that provides access to the
                       distribution archive.
         N/A file_in_cache N/A N/A N/A os path join N/A N/A self config binary_cache filename N/A N/A N/A logger debug Storing distribution archive in local cache: %s file_in_cache N/A N/A makedirs N/A N/A N/A os path dirname file_in_cache N/A N/A AtomicReplace file_in_cache temporary_file N/A N/A N/A open temporary_file wb temporary_file_handle N/A N/A N/A N/A shutil copyfileobj handle temporary_file_handle N/A N/A N/A logger debug Finished caching distribution archive in local cache. N/A N/A