[ZODB-Dev] [ZODB 4.0.0b3] DB.pack() broken?

Tres Seaver tseaver at palladion.com
Sun Aug 18 00:05:36 CEST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/14/2013 02:05 PM, Tres Seaver wrote:
> On 08/14/2013 07:48 AM, [mabe] wrote:
>> Hi everyone,
> 
>> I noticed today that database packing doesn't seem to work (at least
>>  on Python 3.3)
> 
>> Minimal example:
> 
>> from ZODB import FileStorage, DB
> 
>> storage = FileStorage.FileStorage('/tmp/mystorage.fs') db = 
>> DB(storage) db.pack() db.close()
> 
>> Expected: No output / db.pack() should succeed, although there is 
>> likely nothing to pack.
> 
>> Actual output: % python zodb_pack.py packing Traceback (most recent 
>> call last): File "/usr/lib/python3.3/site-packages/ZODB/DB.py",
>> line 810, in pack self.storage.pack(t, self.references) File 
>> "/usr/lib/python3.3/site-packages/ZODB/FileStorage/FileStorage.py",
>>  line 1121, in pack pack_result = self.packer(self, referencesf,
>> stop, gc) File 
>> "/usr/lib/python3.3/site-packages/ZODB/FileStorage/FileStorage.py",
>>  line 1074, in packer opos = p.pack() File 
>> "/usr/lib/python3.3/site-packages/ZODB/FileStorage/fspack.py", line 
>> 408, in pack self.gc.findReachable() File 
>> "/usr/lib/python3.3/site-packages/ZODB/FileStorage/fspack.py", line 
>> 191, in findReachable self.findReachableAtPacktime([z64]) File 
>> "/usr/lib/python3.3/site-packages/ZODB/FileStorage/fspack.py", line 
>> 276, in findReachableAtPacktime for oid in self.findrefs(pos): File 
>> "/usr/lib/python3.3/site-packages/ZODB/FileStorage/fspack.py", line 
>> 329, in findrefs return self.referencesf(self._file.read(dh.plen)) 
>> File "/usr/lib/python3.3/site-packages/ZODB/serialize.py", line 646,
>>  in referencesf u.noload() AttributeError: 'Unpickler' object has
>> no attribute 'noload' Traceback (most recent call last): File 
>> "zodb_pack.py", line 5, in <module> db.pack() File 
>> "/usr/lib/python3.3/site-packages/ZODB/DB.py", line 810, in pack 
>> self.storage.pack(t, self.references) File 
>> "/usr/lib/python3.3/site-packages/ZODB/FileStorage/FileStorage.py",
>>  line 1121, in pack pack_result = self.packer(self, referencesf,
>> stop, gc) File 
>> "/usr/lib/python3.3/site-packages/ZODB/FileStorage/FileStorage.py",
>>  line 1074, in packer opos = p.pack() File 
>> "/usr/lib/python3.3/site-packages/ZODB/FileStorage/fspack.py", line 
>> 408, in pack self.gc.findReachable() File 
>> "/usr/lib/python3.3/site-packages/ZODB/FileStorage/fspack.py", line 
>> 191, in findReachable self.findReachableAtPacktime([z64]) File 
>> "/usr/lib/python3.3/site-packages/ZODB/FileStorage/fspack.py", line 
>> 276, in findReachableAtPacktime for oid in self.findrefs(pos): File 
>> "/usr/lib/python3.3/site-packages/ZODB/FileStorage/fspack.py", line 
>> 329, in findrefs return self.referencesf(self._file.read(dh.plen)) 
>> File "/usr/lib/python3.3/site-packages/ZODB/serialize.py", line 646,
>>  in referencesf u.noload() AttributeError: 'Unpickler' object has
>> no attribute 'noload'
> 
> Thanks very much for the report.  I can reproduce with your example

Christian Tismer submitted a pull request fixing the bug -- I verified,
merged it, and released zodbpickle 0.5.2 with the fix:

 https://pypi.python.org/pypi/zodbpickle/0.5.2


Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlIP87AACgkQ+gerLs4ltQ4wEACeIvdOrpmAGXvypMC4BVfl/80A
Fc4AniGouCvRK1wlV3Ds/Adx+B/yXo3Z
=OmFf
-----END PGP SIGNATURE-----



More information about the ZODB-Dev mailing list