This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author marienz
Recipients marienz
Date 2011-09-19.14:18:08
SpamBayes Score 1.3571841e-08
Marked as misclassified No
Message-id <1316441889.97.0.558871663517.issue13007@psf.upfronthosting.co.za>
In-reply-to
Content
dbm.whichdb (python 3) and whichdb.whichdb (python 2) only check for "magic == 0x13579ace" to recognize gdbm databases. The recently released gdbm 1.9 series adds 0x13579acd (for "32bit") and 0x13579acf (for "64bit") magics (see src/gdbmconst.h in the gdbm-1.9 or gdbm-1.9.1 source tree). Python's gdbm linked to gdbm 1.9 creates databases with the new magic, which causes the whichdb tests to fail. To reproduce this just build python against the new libgdbm and run test/test_dbm.py.

whichdb should probably just check for the two new magic numbers too. This will cause it to recognize the new gdbm databases even if python's gdbm extension is linked to an older version of gdbm that cannot open them, but that is probably less likely to cause problems than the current behavior, where a database created by python's gdbm is not recognized as such.

(I've left the "Versions" field untouched as I do not know which versions of python this should be backported to, but it affects all of them.)
History
Date User Action Args
2011-09-19 14:18:10marienzsetrecipients: + marienz
2011-09-19 14:18:09marienzsetmessageid: <1316441889.97.0.558871663517.issue13007@psf.upfronthosting.co.za>
2011-09-19 14:18:09marienzlinkissue13007 messages
2011-09-19 14:18:08marienzcreate