Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks ZODB after 0.5.0 #7

Closed
enkore opened this issue Aug 14, 2013 · 3 comments
Closed

Breaks ZODB after 0.5.0 #7

enkore opened this issue Aug 14, 2013 · 3 comments

Comments

@enkore
Copy link

enkore commented Aug 14, 2013

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.

Downgrading zodbpickle to 0.5.0 solves this issue (thx Tres Seaver)

@enkore
Copy link
Author

enkore commented Aug 14, 2013

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'

@enkore
Copy link
Author

enkore commented Aug 14, 2013

Probably related: #6

tseaver added a commit that referenced this issue Aug 17, 2013
#6 fixed.

#7 fixed.
@tseaver tseaver closed this as completed Aug 17, 2013
@tseaver
Copy link
Member

tseaver commented Aug 17, 2013

I verified that the example works as expected with the trunk. Fix will be included in a forthcoming 0.5.2 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants