Broken objects should give access to their state

Bug #143531 reported by Victor Safronovich
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zope 2
Fix Released
Medium
Unassigned

Bug Description

I try to migrate my old database from zope 2.6.1.

  I have Broken objects, but i don`t get its state in Zope 2.8. I think this is
  because DB.classFactory is overrided to use OFS.Uninstalled.BrokenClass, which
  is bad persistent class.

  the __dict__ of all my Broken objects equals to {'_p_changed':None}.

  my_object._p_mtime does not load it`s state.

Tags: bug zope
Revision history for this message
Victor Safronovich (suvit) wrote :

"but i don`t get its state in Zope 2.8"
should be -->
it is impossible to get its state in Zope 2.8

sorry for my English :(.

Revision history for this message
ChrisW (chris-simplistix) wrote :

Status: Pending => Rejected

This needs discussion on a list, Broken Objects are just that: broken, so you can't load their state. Don't see any bug here..

Revision history for this message
Victor Safronovich (suvit) wrote :

please, reopen, because this is a bug. Broken objects should provide access to their state.

Revision history for this message
Florent Guillaume (efge) wrote :

Status: Rejected => Pending

Jim asserted that this is a bug.

Revision history for this message
Hanno Schlichting (hannosch) wrote :

The Broken class from ZODB.broken holds the state, but the one from OFS.Uninstalled doesn't. OFS should be updated to use the ZODB class.

Changed in zope2:
status: New → Confirmed
Revision history for this message
Godefroid Chapelle (gotcha) wrote :

Fix in http://svn.zope.org/Zope/branches/gotcha-LP143531. (was branched from 2.12)

Revision history for this message
Christian Theune (ctheune) wrote :

Hmm, weird. I checked it out and tried whether the test does the right thing, but when I remove your patch from the code base and leave the test in it doesn't give me a failure, so something is smelly. Could you recheck this?

Revision history for this message
Godefroid Chapelle (gotcha) wrote :

Oops. Test written again. Breaks when my fix is absent; pass when my fix is there.

see http://svn.zope.org/Zope/branches/gotcha-LP143531/src/OFS/tests/test_Uninstalled.py?rev=113651&r1=113523&r2=113651

Revision history for this message
Godefroid Chapelle (gotcha) wrote :

committed in 2.12 and trunk after Hanno's review.

Changed in zope2:
milestone: none → 2.12.9
status: Confirmed → Fix Committed
Changed in zope2:
status: Fix Committed → Fix Released
Revision history for this message
Julien Muchembled (jmuchemb) wrote :

The bug is still there because the committed patch fixes a value after it is cached.
It can be reproduced when a broken object is reloaded (after it was removed from the connection cache).

I suggest the attached patch to fix the issue.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.