[ZCM] [ZC] 686/ 5 Resolve "intSet's loose their values"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin@zope.org
Mon, 06 Jan 2003 12:01:08 -0500


Issue #686 Update (Resolve) "intSet's loose their values"
 Status Resolved, Zope/bug critical
To followup, visit:
  http://collector.zope.org/Zope/686

==============================================================
= Resolve - Entry #5 by chrisw on Jan 6, 2003 12:01 pm

 Status: Pending => Resolved

Thanks for the patch. This is now fixed in CVS HEAD and Zope 2.6 branch.
________________________________________
= Comment - Entry #4 by lupi on Nov 27, 2002 5:38 pm

This is because intSets aren't properly marked as ghost when first loaded from the ZODB, so their state never gets set. The following change should correct this:
    ===================================================================
    RCS file: /cvs-repository/Zope/lib/Components/BTree/intSet.c,v
    retrieving revision 1.23
    diff -u -r1.23 intSet.c
    --- lib/Components/BTree/intSet.c    27 Mar 2002 10:13:59 -0000    1.23
    +++ lib/Components/BTree/intSet.c    27 Nov 2002 16:53:45 -0000
    @@ -368,9 +368,8 @@
          && HasInstDict(self) && (dict=INSTANCE_DICT(self)))
         {
           PyDict_Clear(dict);
    -      PER_GHOSTIFY(self);
         }
    -
    +  PER_GHOSTIFY(self);
       Py_INCREF(Py_None);
       return Py_None;
     }

________________________________________
= Comment - Entry #3 by chrisw on Nov 21, 2002 9:45 am

SteveA suggested I mention the intSet in question is the one built from Components/BTree/intSet.c.

It looks like Toby (htrd) was the last person to edit this (between 2.5.1 and 2.6.0) so hopefully it'll be a quick fix that he can apply.
________________________________________
= Comment - Entry #2 by chrisw on Nov 21, 2002 9:13 am


Uploaded:  "testIntSet.py"
 - http://collector.zope.org/Zope/686/testIntSet.py/view
Here's the script
________________________________________
= Request - Entry #1 by chrisw on Nov 21, 2002 9:11 am

In Zope 2.6.0, intSets loose their values.
The attached script demonstrates this.

It should be noted that intSets saved to a ZODB under Zope 2.5.1 loose their values when loaded in Zope 2.6.0.

I don't know whether this 'loss of value' is persistent if the ZODB is then moved back to 2.5.1.

This means that Squishdot Sites imported into Zope 2.6 loose all their postings :-(
==============================================================