bsddb185 module changes checked in

Skip Montanaro skip at pobox.com
Wed May 7 11:44:51 EDT 2003


    Nick> Hey, I see a ternary-like construct in there... :^) It won't quite
    Nick> work since sys.platform for OSF/1 reports osf1V5 or whatever
    Nick> depending on the version. Here's a diff to the setup.py as found
    Nick> in CVS that should take care of things:

Sorry, I trimmed the platform string in the wrong place.  Fixed now.

    Nick> The bsddb185.so module is built and works when imported explicitly
    Nick> as bsddb185.

Good.

    Nick> However, anydbm seems to be falling back to using dbm rather than
    Nick> bsddb185 when creating new databases. 

As intended.  Note that the goal here is to allow you to keep using existing
databases without breakage, not perpetuate indefinite use of the old
library.

    Nick> Is that the expected behavior?  I can certainly survive if it is,
    Nick> I may just have to do a little import dance when the databases
    Nick> need to be created.

You should never use bsddb185 explicitly or expect a new database created
with anydbm.open() to use it.  What import dance did you have in mind?

    Nick> p.s I'm more conservative with the ternary-analogue, and probably
    Nick> would have gone for:

    Nick>                 libraries = None
    Nick>                 if platform in ['osf1']:
    Nick>                     libraries = ['db']

    Nick> But they seem functionally equivalent.

Yup.  In addition, I hope to one day dump the osf1 test altogether and get
it to properly locate the library independent of platform.  That will
probably wait until someone else needs an explicit -ldb to build bsddb185
though.  (And I just threw out two ancient versions of BSDi & BSD/OS a few
weeks ago.)

Skip





More information about the Python-list mailing list