Crosstips.org Crosstips.org

My fun Crossword solver project. Crosstips.org & Krysstips.se

Kung Fu Kung Fu

Fujian White Crane Kung Fu

Fry-IT

Fry-IT is the company I work for

Photos Photos

Photoalbum, both old and new.

Zope Zope

What I have and am doing with Zope

Receptsamlingen Receptsamlingen

In Swedish only. About my "Collection of Recipes" website.

Contact me Contact me

My contact details and how to contact me.

  Mobile version of this page Mobile version of this page


 

Porting IssueTrackerProduct to Zope 2.8.0

http://www.issuetrackerproduct.com/News/zope-2.8.0

30th of June 2005

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:

 get_transaction().commit()

which I've now had to update to:

 import transaction
 transaction.get().commit()

(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)


Comment

Sascha Welter - 1st July 2005  [«« Reply to this]
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 - 29th September 2005  [«« Reply to this]
transaction.commit() is enough, actually.
 
Name:
Email:
hide my email address.

Your email address will be encoded to prevent email-extraction spiders from reading it so you won't get spammed if you decide to show your email address.