Porting IssueTrackerProduct to Zope 2.8.0

30 June 2005   2 comments   Zope


Powered by Fusion×

I've now migrated the IssueTrackerProduct so that it works on Zope 2.8.0 which was released a couple of days ago. Zope 2.8.0 used ZODB 3.4 which has multi-version concurrency control support and has taken up Martijn Faaseen's work on Five. The only two and a half problems I encountered were...:

The SomeClass.__dict__ attribute is no longer a simple dict which meant that one couldn't do something like this:

IssueTracker.__dict__['rss.xml'] = IssueTracker.RSS10

The new way to do stuff like this is to use 'setattr()':

setattr(IssueTracker, 'rss.xml', IssueTracker.RSS10)

The other problem was with the new ZCatalog which now stores it's __len__ in an attribute called _length which my old ZCatalog instances didn't have. Fortunately Zope 2.8.0 has some migration code in there but in my case unindex_object() was called before reindexing the catalog. The solution to this was to do nothing but to press the "Update Everthing" button which clears the catalog and reindexes the issue objects.

The other little caveat was a DeprecationWarning about get_transaction(). The old code looked like this:


which I've now had to update to:

import transaction

(obviously this new transaction stuff only works in Zope 2.8.0 so I had to put in some code that suits both 2.8.0 and older versions)


Sascha Welter
Great work Peter! These will be very usefull to me and I think a lot of other people when upgrading. Lets hope the search engines find this quickly, so the questions won't have to be asked all over on #zope :-)
Florent Guillaume
transaction.commit() is enough, actually.
Thank you for posting a comment

Your email will never ever be published

Related posts

ztar - my wrapper on tar -z 29 June 2005
Module dependencies of IssueTracker.py 02 July 2005
Related by keywords:
To readline() or readlines() 12 March 2004
bool is instance of int in Python 05 December 2008
Reciprocal lesson about gender perspectives 02 September 2011
Nginx vs. Squid 17 March 2009
IssueTrackerProduct now officially abandoned 30 March 2012
How and why to use django-mongokit (aka. Django to MongoDB) 08 March 2010
On the command line no one can hear you screen. Or can they? 03 May 2012
Nasty surprise of Django cache 09 December 2008
Random ID generator for Zope 02 September 2005
Google Calendar, iCalendar Validator but not bloody Apple iCal 09 April 2009
tempfile in Python standard library 07 February 2006
In Django, how much faster is it to aggregate? 27 October 2010