[ZCM] [ZC] 1899/ 7 Wontfix "catalogs in .zexp from 2.7 dont import in 2.8"
"Collector: Zope Bugs, Features, and Patches ..." <[email protected]> Mon, 14 May 2007 14:06:43 -0400
| Newsgroups | gmane.comp.web.zope.devel.collector-monitor |
|---|---|
| Message-ID | <[email protected]> |
Issue #1899 Update (Wontfix) "catalogs in .zexp from 2.7 dont import in 2.8" Status Wontfix, Zope/bug medium To followup, visit: http://www.zope.org/Collectors/Zope/1899 ============================================================== = Wontfix - Entry #7 by ajung on May 14, 2007 2:06 pm Status: Accepted => Wontfix Obsolete ________________________________________ = Resubmit - Entry #6 by tseaver on Jun 15, 2006 7:08 pm Status: Wontfix => Accepted Andreas, I'm pretty sure that you *landed* the patch, and that I reopened the issue because I thought the patch was shaky. If you are confident that the DWIM it introduces is not harmful, then re-resolve the issue with a comment to that effect. ________________________________________ = Wontfix - Entry #5 by ajung on Jun 15, 2006 4:40 am Status: Accepted => Wontfix Looks obsolete and outdated to me. ________________________________________ = Comment - Entry #4 by ajung on Sep 16, 2005 2:07 am Providing a solution as monkey-patch would be the best solution. However we should not the __setstate__ patch to the core...I just had pain enough removing the old magggggggggggic with __len__ and I don't want to see a new magic (I consider __setstate__ as magic :-)) ________________________________________ = Accept - Entry #3 by tseaver on Sep 15, 2005 10:22 am Status: Resolved => Accepted Supporters added: tseaver The patch seems a little iffy to me, given that the OP didn't know exactly how the various exceptions (e.g., the KeyError in the first stanza) could be raised. Given that the bug only affects people doing something unusual (trying to import a .zexp file containing a whole CMF site), and that it introduces iffy behavior in a very-frequently used pair of methods, I think perhaps we should revert. I discussed this with the OP on IRC: another workaround would be to patch a '__setstate__' into the index class, which would convert the '__len__' at unpickling; that would allow the user to import the site, and then run 'manage_convertIndexes' on its catalog. If we made that '__setstate__' as a monkey-patch product, then it could be in effect only during the export / import part of the conversion product. ________________________________________ = Resolve - Entry #2 by ajung on Sep 15, 2005 2:02 am Status: Pending => Resolved Patch applied to SVN trunk (r38478) and 2.8 branch (r38477). ________________________________________ = Request - Entry #1 by runyaga on Sep 14, 2005 2:18 am Uploaded: "UnIndex.py.diff" - http://www.zope.org/Collectors/Zope/1899/UnIndex.py.diff/view In Zope 2.8 you are recommeneded to run covertIndexes on all catalogs. But if you export a catalog from 2.7 and import it into 2.8 - there is no way to run covertIndexes. What seems to bomb is in PluginInxes/common/UnIndex.py where the internal state of the indexes are referring to _length for BTrees.Length.Length but the older indexes attribute is __len__. So we have to try/except AttrError around this and migrate in-place. NOTE: after I imported I still had to run catalog/manage_convertIndexes ==============================================================