Hi, I have a working implementation for Zope 3 ZPTs within Zope 2. It is currently implemented through a new class ZPT which implements the same functionality as Products.PageTemplates.ZopePageTemplate. I am currently thinking about the migration to the new implementation. Would it be possible to perform an in-place migration using setstate() when replacing the ZopePageTemplate implementation with the prototype code from my ZPT class? Andreas
Am Sonntag, den 11.12.2005, 13:16 +0100 schrieb Andreas Jung:
Hi,
I have a working implementation for Zope 3 ZPTs within Zope 2. It is currently implemented through a new class ZPT which implements the same functionality as Products.PageTemplates.ZopePageTemplate. I am currently thinking about the migration to the new implementation. Would it be possible to perform an in-place migration using setstate() when replacing the ZopePageTemplate implementation with the prototype code from my ZPT class?
Are there different object-attributes in both classes? If not, you could simple replace with the same old class name. If there are (you would have to know them anyway to do the __setstate__ approach) I'd like an approach with an upgrade script (similar to 'stale Python Scripts') better. Buts just me ;-) Regards Tino
--On 11. Dezember 2005 13:42:58 +0100 Tino Wildenhain <tino@wildenhain.de> wrote:
Are there different object-attributes in both classes? If not, you could simple replace with the same old class name.
The Z3 ZPT implementation seems to use the same attrs. So I could just replace the class implementation. Some first quick tests show that there is no further need for a migration..it just works :-) -aj
Am Sonntag, den 11.12.2005, 15:03 +0100 schrieb Andreas Jung:
...
The Z3 ZPT implementation seems to use the same attrs. So I could just replace the class implementation. Some first quick tests show that there is no further need for a migration..it just works :-)
Lets praise the wonderful world of pickle ;)) ++Tino
participants (2)
-
Andreas Jung -
Tino Wildenhain