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