I worked a bit with ZopeHead. Required CMF patches attached. Jim Fulton wrote at 2003-11-30 11:28 -0500:
Jim Fulton wrote:
Yuppie wrote: 1.) "from ZODB import Persistent, PersistentMapping" doesn't work anymore
"Persistent" was moved from ZODB into "Persistence". Had to modify DC-Workflow.
...
3.) 'rebinding by assignment' doesn't work anymore
With oldstyle ExtensionClasses you were able to rebind methods by assignment, without subclassing from the class that defines the method.
CMFCore/FSPageTemplate.py seems to be a good use case for that feature:
class FSPageTemplate(FSObject, Script, PageTemplate): pt_getContext = ZopePageTemplate.pt_getContext
This is still possible but only for subclasses of assigned methods. Appending ".im_func" removes this restriction.
...
4.) some objects publishable in Zope 2.7 aren't publishable anymore
Can you give any specifics?
No big deal to add docstrings, but what's the policy change?
Apparently, the old "ExtensionClass" was ready to inherit "__doc__" from a base class. Python 2.3 does not do this. Thus, "__doc__" strings have to be added...
5.) other issues
I was not able to track this error down, but maybe you've got an idea what's going wrong here?
http://localhost:8080/myCMFSite/portal_types/Document/manage_propertiesForm Traceback (innermost last): Module ZPublisher.Publish, line 100, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object Module Products.CMFCore.utils, line 350, in manage_propertiesForm Module Shared.DC.Scripts.Bindings, line 252, in __call__ Module Shared.DC.Scripts.Bindings, line 281, in _bindAndExec Module Shared.DC.Scripts.Bindings, line 1, in ? Module Shared.DC.Scripts.Bindings, line 218, in _getContext AttributeError: aq_parent
It is very obscure, indeed. Not that is does not work in "Zope 2.8" but that it worked in previous versions: "PropertyManager.manage_propertiesForm" ("mpF") is an "App.special_dtml.DTMLFile" instance. In "Products.CMFCore.utils.SimpleItemWithProperties.manage_propertiesForm" it is called by apply(mpF, (self, self, REQUEST,) ...) Apparently, former versions used the first "self" as "self" for the "DTMLFile" and passed the remaining arguments to "mpF"s "__call__", which seems really strange. Zope 2.8 does the natural thing: it does not change the "mpF"s "self" and passed all arguements to "__call__". As "mpF"s "self" is not acquisition wrapped, we get the "aq_parent" error. A fix calls "mpF" by: apply(mpF.__of__(self), (self, REQUEST,) ...) The attached patch to "CMFCore" fixes all CMF test failures with the exception of 2 ".security" errors. These are not related to Zope 2.8 but genuine bugs in my CMF 1.4.1 installation. -- Dieter