PEP238 and zope

kosh kosh at aesaeion.com
Tue Jul 24 11:45:58 EDT 2001


Tom Jenkins wrote:

> We're a zope shop.  Its quite possible that the work we do now will be
> still in use for many years (not guaranteed but we still use code now
> that we wrote 2 years ago - before it was zope ;) )
> 
> We use Python Methods in Zope... python snippets stored directly in
> zope's zodb.  grepping *.py won't find any of these snippets.  I don't
> believe zope will surface any warnings that PEP238 stipulates (tho I may
> be wrong).  How do we code _now_ so as to minimize our pain?
> 
> Tom

We are a zope shop also so I really feel your pain on this one. My current 
suggestion is to use the search tool from the root of the ZODB and see if 
you can find them from there. Thankfully so far zope does not track python 
versions very fast. I hope it stays with python 2.1 for a good while. Now 
that Zope 2.4 requires 2.1 maybe zope could almost be frozen at the 2.1 
state for a while until python comes up with a good method not to change 
the behavior of existing code. I have no idea how much code I would have to 
search through to try and fix some of our ZODBs since I have python 
products that allow python to be executed in them also and they store that 
python individually so that a change to the master product that is screwed 
up can't take out many instances of the product.

My feeling is that some kind of upgrader will need to be written to port 
those objects. What pissed me off is that it will become necessary to do 
that because the meaning of a language feature changed. 

Also in zope you will need to check all your dtml for this kind of problem 
since python is often embedded in the dtml. On the whole I don't think this 
will be just a few hour cleanup problem. This could take a long time to 
clean up and while I might do it once, twice will see me off the language 
for something else. The biggest problem I can see is that this will fail 
silently and lead to incorrect results.



More information about the Python-list mailing list