Message144277
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.) |
|
Date |
User |
Action |
Args |
2011-09-19 14:18:10 | marienz | set | recipients:
+ marienz |
2011-09-19 14:18:09 | marienz | set | messageid: <1316441889.97.0.558871663517.issue13007@psf.upfronthosting.co.za> |
2011-09-19 14:18:09 | marienz | link | issue13007 messages |
2011-09-19 14:18:08 | marienz | create | |
|