Based on recent discussions about ridding Python of bsddb I decided to
see how hard it would be to implement a barebones dbm.sqlite module.
Turns out, not very hard.
No docs. No test cases. Caveat emptor. But I think it can serve as
at least a proof of concept, maybe as the basis for a new module in
3.1.
It would be more efficient to base keys() on iterkeys() than the
reverse, IMO.
Other than that, why not open a branch or at least upload full-fledged
patch files? :)
Antoine> It would be more efficient to base keys() on iterkeys() than the
Antoine> reverse, IMO.
True. I was just modifying the dumbdbm implementation.
Antoine> Other than that, why not open a branch or at least upload
Antoine> full-fledged patch files? :)
Well, I only intended to create the initial proof of concept, but then last
night I couldn't sleep so I cobbled the test module and docs from the
existing stuff ... ;-)
When I get a couple minutes free I'll try and condense it into a more
suitable form. Probably not until the weekend though.
I would like to try and resurrect this issue using @rhettinger's last submitted code (on bpo). @ambv almost mentioned shelve and sqlite3 in the same sentence in one of his developer-in-residence blog posts last year, so it may be worth it to try and get this up and running. (If not, it will at least be a fun exercise.)
Activity
smontanaro commented on Sep 4, 2008
Based on recent discussions about ridding Python of bsddb I decided to
see how hard it would be to implement a barebones dbm.sqlite module.
Turns out, not very hard.
No docs. No test cases. Caveat emptor. But I think it can serve as
at least a proof of concept, maybe as the basis for a new module in
3.1.
smontanaro commented on Sep 5, 2008
Attaching corrected module.
smontanaro commented on Sep 5, 2008
Attaching test cases based on dumbdbm tests.
smontanaro commented on Sep 5, 2008
Another slight revision to the module.
smontanaro commented on Sep 5, 2008
Trivial doc diffs against 3.0b3 doc.
smontanaro commented on Sep 5, 2008
Another tweak - add values()
smontanaro commented on Sep 5, 2008
Updated test cases
pitrou commented on Sep 5, 2008
It would be more efficient to base keys() on iterkeys() than the
reverse, IMO.
Other than that, why not open a branch or at least upload full-fledged
patch files? :)
smontanaro commented on Sep 5, 2008
Antoine> It would be more efficient to base keys() on iterkeys() than the
Antoine> reverse, IMO.
True. I was just modifying the dumbdbm implementation.
Well, I only intended to create the initial proof of concept, but then last
night I couldn't sleep so I cobbled the test module and docs from the
existing stuff ... ;-)
When I get a couple minutes free I'll try and condense it into a more
suitable form. Probably not until the weekend though.
Skip
smontanaro commented on Sep 6, 2008
OK, I made a sandbox project out of it:
svn+ssh://pythondev@svn.python.org/sandbox/trunk/dbm_sqlite
Hack away!
rhettinger commented on Sep 6, 2008
I would like to see something like this go into 3.0 so that shelves
don't become useless for Windows users.
josiahcarlson commented on Sep 6, 2008
Here's an alternate version with most of bsddb's interface intact.
44 remaining items
ghaering commented on Aug 19, 2015
This wiki page is out of date. It appears that SQlite is now threadsafe by default: http://www.sqlite.org/threadsafe.html
erlend-aasland commented on Apr 29, 2022
I would like to try and resurrect this issue using @rhettinger's last submitted code (on bpo). @ambv almost mentioned shelve and sqlite3 in the same sentence in one of his developer-in-residence blog posts last year, so it may be worth it to try and get this up and running. (If not, it will at least be a fun exercise.)
presidento commented on Dec 5, 2022
@erlend-aasland do you have any knews about this?
erlend-aasland commented on Dec 29, 2022
Nope, and I've been busy with $work. Raymond has created a duplicate issue, though: see #100414
erlend-aasland commented on Jan 2, 2023
Raymond and I prefer to close this (stale) issue in favour of #100414; if we're going to do this, I think we can benefit from a fresh start.
Closing this issue as stale and superseded by #100414; please re-open if you disagree.
erlend-aasland commented on Jan 23, 2024
Just a heads-up; the gh-100414 now has a PR based on a recent patch Raymond posted. Feel free to review it: