view @ 5051:95a4aa0eb1e9

caching: refactored locking to separate methods, new scope='dir' scope='dir' just means: use the directory specified by arena Use .lock() and .unlock() methods together with do_locking=False to manually lock/unlock (e.g. for a locked read-modify-write cycle). With do_locking=True, .lock() is automatically called by .open(), .unlock() is automatically called by .close(). Typical usage: try:'r') # open file, create locks data = finally: cache.close() # important to close file and remove locks Removed the code that unlocks in .open()'s exception handler. Such stuff needs to be done in the caller's "finally:" block (which has to call .close(), which internally calls .unlock()). Only log IOErrors in .open() if it was for write mode. For read mode, it can be just a non-existing file, we don't want to log this case.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 29 Aug 2009 22:17:07 +0200
parents cd2f895a534a
children 7eb12d1f0856
line wrap: on
line source
# MoinMoin - Distutils distribution files
# Copyright (c) 2001, 2002 by Jürgen Hermann <>
# All rights reserved, see COPYING for details.

# additional files not known by
include README setup.cfg moin.spec
include wikiserverlogging.conf

# documentation and licenses
recursive-include docs *

# include stuff for translators
recursive-include   MoinMoin/i18n *

# contrib stuff
recursive-include   contrib *

# tests stuff
recursive-include   tests *
global-include */_tests/*

# "wiki" directory
recursive-include   wiki *

# omit revision control, python bytecode
global-exclude *.pyc
global-exclude *.pyo
global-exclude */CVS/*
global-exclude */.cvsignore

# we distribute a uncompressed version, no need for that:
global-exclude underlay.tar
global-exclude README.underlay