[Zope-dev] Re: [Zope 2.10] ZPT going Unicode
Dieter Maurer wrote: I'd rather have a one-time update method that trawls the database, like is done for Python Scripts recompiling for instance. Or I can call it myself in my upgrade procedures on the exact objects I know will need updates. I've implemented the setstate() variant as proof-of-concept. I am not sure if there is overhead for CMF-based sites since they FSPageTemplates inherit from PageTemplateFile which has nothing in mind with persistence. So only persistent ZopePageTemplate would be affected. If there is need for a dedicated migration we could easily write one..that's the lamest task of the whole ZPT unicode issue :-) Modern ZODB versions allow modifications made in "__setstate__" to be reliably persisted. This means that "__setstate__" updates can now be one time (though the test whether an upgrade is necessary is done always). The "recompile" hack for "PythonScript"s would no longer be necessary. I know but that means you have backward compatibility cruft that stays there forever. And no good way to tell the administrators how to upgrade before a given date. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: [Zope 2.10] ZPT going Unicode
Andreas Jung wrote at 2006-1-5 17:44 +0100: > ... >> I'd rather have a one-time update method that trawls the database, like >> is done for Python Scripts recompiling for instance. Or I can call it >> myself in my upgrade procedures on the exact objects I know will need >> updates. >> > > >I've implemented the setstate() variant as proof-of-concept. I am not sure >if there is overhead for CMF-based sites since they FSPageTemplates inherit >from PageTemplateFile which has nothing in mind with persistence. So only >persistent ZopePageTemplate would be affected. If there is need for a >dedicated migration we could easily write one..that's the lamest task of >the whole ZPT unicode issue :-) Modern ZODB versions allow modifications made in "__setstate__" to be reliably persisted. This means that "__setstate__" updates can now be one time (though the test whether an upgrade is necessary is done always). The "recompile" hack for "PythonScript"s would no longer be necessary. -- Dieter ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: [Zope 2.10] ZPT going Unicode
Florent Guillaume wrote: Andreas Jung wrote: ToDo: in-place conversion of persistent ZPT instance through setstate() or so... Could we avoid doing things in __setstate__ please? It imposes a runtime cost that doesn't disappear. I'd rather have a one-time update method that trawls the database, like is done for Python Scripts recompiling for instance. Or I can call it myself in my upgrade procedures on the exact objects I know will need updates. Perhaps we can use the generations framework. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Zope 2.10] ZPT going Unicode
--On 5. Januar 2006 17:36:45 +0100 Florent Guillaume <[EMAIL PROTECTED]> wrote: Andreas Jung wrote: ToDo: in-place conversion of persistent ZPT instance through setstate() or so... Could we avoid doing things in __setstate__ please? It imposes a runtime cost that doesn't disappear. I'd rather have a one-time update method that trawls the database, like is done for Python Scripts recompiling for instance. Or I can call it myself in my upgrade procedures on the exact objects I know will need updates. I've implemented the setstate() variant as proof-of-concept. I am not sure if there is overhead for CMF-based sites since they FSPageTemplates inherit from PageTemplateFile which has nothing in mind with persistence. So only persistent ZopePageTemplate would be affected. If there is need for a dedicated migration we could easily write one..that's the lamest task of the whole ZPT unicode issue :-) -aj pgpo72s9XA6e2.pgp Description: PGP signature ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Zope 2.10] ZPT going Unicode
Andreas Jung wrote: ToDo: in-place conversion of persistent ZPT instance through setstate() or so... Could we avoid doing things in __setstate__ please? It imposes a runtime cost that doesn't disappear. I'd rather have a one-time update method that trawls the database, like is done for Python Scripts recompiling for instance. Or I can call it myself in my upgrade procedures on the exact objects I know will need updates. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )