Resolve sqlite3.OperationalError (replacing shelve with diskcache)#113
Resolve sqlite3.OperationalError (replacing shelve with diskcache)#113xuhcc merged 7 commits intobeancount:masterfrom
Conversation
|
One item that needs to be resolved is the discrepancy between the two libraries. shelve accepts a path and creates a file, while diskcache will create a directory with the same name. |
diskcache is a better multi-platform and multi-threaded alternative to shelve, for caching. The difference is that the current cache needs to be deleted. It is using a directory instead of a filename.
|
This should now be ready to go, if you agree. |
so that a cache directory can be created.
|
I've been using this locally and everything seems to work fine. Setting up bean-price on other devices is difficult due to links, hence it would be helpful to have this merged and published as a package at some point. |
|
This resolves #91 for me. |
|
Any updates on this? |
With Python 3.13, using bean-price results in
because
shelvedoes not support multi-threaded access.diskcacheis a better multi-platform and multi-threaded alternative to shelve, for caching.There is a practical difference, where the current cache file needs to be deleted, if it exists. diskcache is using a directory instead of a filename, and puts the sqlite database in there.
resolves #91