[Python-Dev] Re: BSDDB 3 module now somewhat functional

Gregory P. Smith greg@electricrain.com
Sat, 19 Aug 2000 23:04:51 -0700


On Sat, Aug 19, 2000 at 05:15:53PM -0400, A.M. Kuchling wrote:
> The handwritten BSDDB3 module has just started actually functioning.
> It now runs the dbtest.py script without core dumps or reported
> errors.  Code is at ftp://starship.python.net/pub/crew/amk/new/ ; grab
> db.py and the most recent _bsddb.c.
> 
> I started from Greg Smith's 3.1.x port of Robin Dunn's module.  You'll
> have to struggle a bit with integrating it into Greg's package and
> compiling it (replacing db.py with my version, and modifying Setup to
> compile _bsddb.c).  I haven't integrated it more, because I'm not sure
> how we want to proceed with it.  Robin/Greg, do you want to continue
> to maintain the package?  ...in which I'll contribute the code to one
> or both of you.  Or, I can take over maintaining the package, or we
> can try to get the module into Python 2.0, but with the feature freeze
> well advanced, I'm doubtful that it'll get in.

I just did a quick scan over your code and liked what I saw.  I was
thinking it'd be cool if someone did this (write a non-SWIG version based
on mine) but knew I wouldn't have time right now.  Thanks!  Note that I
haven't tested your module or looked closely to see if anything looks odd.

I'm happy to keep maintaining the bsddb3 module until it makes its way
into a future Python version.  I don't have a lot of time for it, but send
me updates/fixes as you make them (I'm not on python-dev at the moment).
If your C version is working well, I'll make a new release sometime next
week after I test it a bit more in our application on a few platforms
(linux, linux alpha and win98).

> Still missing: Cursor objects still aren't implemented -- Martin, if
> you haven't started yet, let me know and I'll charge ahead with them
> tomorrow.  Docstrings.  More careful type-checking of function
> objects.  Finally, general tidying, re-indenting, and a careful
> reading to catch any stupid errors that I made.  

It looked like you were keeping the same interface (good!), so I
recommend simply stealing the docstrings from mine if you haven't already
and reviewing them to make sure they make sense.  I pretty much pasted
trimmed down forms of the docs that come with BerkeleyDB in to make them
as well as using some of what Robin had from before.

Also, unless someone actually tests the Recno format databases should
we even bother to include support for it?  I haven't tested them at all.
If nothing else, writing some Recno tests for dbtest.py would be a good
idea before including it.

Greg

-- 
Gregory P. Smith   gnupg/pgp: http://suitenine.com/greg/keys/
                   C379 1F92 3703 52C9 87C4  BE58 6CDA DB87 105D 9163