Localhost sqlite backend

Sebastian Spaeth Sebastian at SSpaeth.de
Tue Apr 26 11:30:49 BST 2011

OK, here comes the patch series, updated to current master, that
implements the optional and experimental sqlite-based LocalStatus cache.

To test, set the [Account ...] section to status_backend=sqlite.
This will create a new directory 
~/.offlineimap/Account-FOO/LocalStatus-sqlite in which the sqlite-based
status cache is stored.

The old plaintext ~/.offlineimap/Account-FOO/LocalStatus will not be
removed, you have to do that manually, once you feel comfortable in
switching. I've been using this one for a long time, and I making the
switch on an existing (and recently synced) account should be perfectly
possible in my opinion, but it is EXPERIMENTAL and OPTIONAL (and not


I will be sending the patch series with these patches (oldest first):

b96b9ac We had been setting this variable twice
c07f844 Replace 2 regexes with a single one

The above 2 patches are really just cleanup patches that are not really part
of the series and that can be applied in any case. I just happened to
find them while integrating the sqlite backend.

5ba81ba Experimental LocalStatus stored in SQLite database

This one adds the file as had been posted by Stewart Smith and updated
by ROb Browning, with some more modifications by me. They are credited
in the commit message, but the file is not at all used yet.

d773440 Inherit LocalStatusSQLFolder from LocalStatusFolder

This one integrates the LocalStatusSQL Folder in our class hierarchy,
making it derive from the plain-text LocalStatusFolder class. It is
still not used.

6dd72e2 Make getnicename work again for classes that derive from

Using python's new style classes that derive from 'object' broke some ui
output and this is being fixed by it.

712d54e Use self.doautosave rather than self.dofsync

self.doautosave (was ALWAYS 1) and self.dofsync were both part of the
LocalStatusFolder, determining how safe we want to be. As one was always
was 1, I merged them, if people prefer to keep the dofsync name rather
than doautosave, we can switch that. We could probably also skip this
Do NOTE that this patch also switches the default from fsync=TRUE to
FSYNC=False which might need discussion. Personally, I believe that we
don't need to wait for the local cache to have hit the disk before
proceeding. But as I said, we can take this change out.

77bf973 Don't keep sqlite connections open

For now we close the sqlite connection after each change, as it is not
possible to access from multiple threads.

eac6c89 repository.LocalStatus: Remove code duplication

This cleans up repository.LocalStatus.

9aa5164 Create LocalStatus or LocalStatusSQLite folders

This is the final patch that "turns on" the sqlite based Localstatus.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20110426/a5a5ea87/attachment.sig>

More information about the OfflineIMAP-project mailing list