[Zope3-dev] No, backward compatibility
Roger Ineichen
dev at projekt01.ch
Sat Dec 11 14:15:14 EST 2004
Hi I've found a older version of a data.sf
Remember, For me it's not important to fix it.
I can live with the new version. It was just a question
if other have the same problem and if it's a problem
where we raise into if we migrate Zope3X 3.0.0 to newer
versions.
The problem is that I used a inherited Utility registration
with the following methods:
-------------------
def activated(self):
"""Activate the Property Sheet"""
component = self.getComponent()
component = removeSecurityProxy(component)
component.name = self.name
def deactivated(self):
"""Deactivate the Property Sheet"""
component = self.getComponent()
component = removeSecurityProxy(component)
component.name = None
The new version uses:
---------------------
def activated(self):
"""Activate the Property Sheet"""
self.component.name = self.name
def deactivated(self):
"""Deactivate the Property Sheet"""
self.component.name = None
You can see it in ViewCVS under the following url:
http://svn.tiks.org/viewcvs/Tiks/trunk/src/tiks/siteproperty/utility/propert
ydefinition.py
Now if I delete the old utility, I get the following traceback:
Traceback (most recent call last):
File "D:\projektCompiler\trunkAmadeus\src\zope\publisher\publish.py", line
138, in publish
result = publication.callObject(request, object)
File
"D:\projektCompiler\trunkAmadeus\src\zope\app\publication\zopepublication.py
", line 154, in callObject
return mapply(ob, request.getPositionalArguments(), request)
File "D:\projektCompiler\trunkAmadeus\src\zope\publisher\publish.py", line
113, in mapply
return debug_call(object, args)
File "D:\projektCompiler\trunkAmadeus\src\zope\publisher\publish.py", line
119, in debug_call
return object(*args)
File
"D:\projektCompiler\trunkAmadeus\src\zope\app\pagetemplate\simpleviewclass.p
y", line 45, in __call__
return self.index(*args, **kw)
File
"D:\projektCompiler\trunkAmadeus\src\zope\app\pagetemplate\viewpagetemplatef
ile.py", line 80, in __call__
return self.im_func(im_self, *args, **kw)
File
"D:\projektCompiler\trunkAmadeus\src\zope\app\pagetemplate\viewpagetemplatef
ile.py", line 49, in __call__
sourceAnnotations=debug_flags.sourceAnnotations)
File
"D:\projektCompiler\trunkAmadeus\src\zope\pagetemplate\pagetemplate.py",
line 120, in pt_render
strictinsert=0, sourceAnnotations=sourceAnnotations)()
File "D:\projektCompiler\trunkAmadeus\src\zope\tal\talinterpreter.py",
line 240, in __call__
self.interpret(self.program)
File "D:\projektCompiler\trunkAmadeus\src\zope\tal\talinterpreter.py",
line 315, in interpret
handlers[opcode](self, args)
File "D:\projektCompiler\trunkAmadeus\src\zope\tal\talinterpreter.py",
line 804, in do_useMacro
self.interpret(macro)
File "D:\projektCompiler\trunkAmadeus\src\zope\tal\talinterpreter.py",
line 315, in interpret
handlers[opcode](self, args)
File "D:\projektCompiler\trunkAmadeus\src\zope\tal\talinterpreter.py",
line 502, in do_optTag_tal
self.do_optTag(stuff)
File "D:\projektCompiler\trunkAmadeus\src\zope\tal\talinterpreter.py",
line 487, in do_optTag
return self.no_tag(start, program)
File "D:\projektCompiler\trunkAmadeus\src\zope\tal\talinterpreter.py",
line 482, in no_tag
self.interpret(program)
File "D:\projektCompiler\trunkAmadeus\src\zope\tal\talinterpreter.py",
line 315, in interpret
handlers[opcode](self, args)
File "D:\projektCompiler\trunkAmadeus\src\zope\tal\talinterpreter.py",
line 774, in do_defineMacro
self.interpret(macro)
File "D:\projektCompiler\trunkAmadeus\src\zope\tal\talinterpreter.py",
line 315, in interpret
handlers[opcode](self, args)
File "D:\projektCompiler\trunkAmadeus\src\zope\tal\talinterpreter.py",
line 876, in do_defineSlot
self.interpret(block)
File "D:\projektCompiler\trunkAmadeus\src\zope\tal\talinterpreter.py",
line 315, in interpret
handlers[opcode](self, args)
File "D:\projektCompiler\trunkAmadeus\src\zope\tal\talinterpreter.py",
line 866, in do_defineSlot
self.interpret(slot)
File "D:\projektCompiler\trunkAmadeus\src\zope\tal\talinterpreter.py",
line 315, in interpret
handlers[opcode](self, args)
File "D:\projektCompiler\trunkAmadeus\src\zope\tal\talinterpreter.py",
line 552, in do_setLocal_tal
self.engine.setLocal(name, self.engine.evaluateValue(expr))
File "D:\projektCompiler\trunkAmadeus\src\zope\tales\tales.py", line 698,
in evaluate
return expression(self)
File "D:\projektCompiler\trunkAmadeus\src\zope\tales\expressions.py", line
204, in __call__
return self._eval(econtext)
File "D:\projektCompiler\trunkAmadeus\src\zope\tales\expressions.py", line
198, in _eval
return ob()
File
"D:\projektCompiler\trunkAmadeus\src\zope\app\registration\browser\__init__.
py", line 55, in update
self.registrations[0].status = RegisteredStatus
File
"D:\projektCompiler\trunkAmadeus\src\zope\app\registration\registration.py",
line 94, in __set__
registry.deactivate(registration)
File
"D:\projektCompiler\trunkAmadeus\src\zope\app\registration\registration.py",
line 389, in deactivate
self._deactivate(registration)
File
"D:\projektCompiler\trunkAmadeus\src\zope\app\registration\registration.py",
line 572, in _deactivate
self.__parent__.notifyDeactivated(self, registration)
File "D:\projektCompiler\trunkAmadeus\src\zope\app\adapter\adapter.py",
line 188, in adaptersChanged
sub.adaptersChanged()
File "D:\projektCompiler\trunkAmadeus\src\zope\app\adapter\adapter.py",
line 178, in adaptersChanged
self._updateAdaptersFromLocalData(adapters)
File "D:\projektCompiler\trunkAmadeus\src\zope\app\utility\utility.py",
line 63, in _updateAdaptersFromLocalData
LocalAdapterService._updateAdaptersFromLocalData(self, adapters)
File "D:\projektCompiler\trunkAmadeus\src\zope\app\adapter\adapter.py",
line 169, in _updateAdaptersFromLocalData
radapters[key] = removeSecurityProxy(registration.factory)
File "D:\projektCompiler\trunkAmadeus\src\zope\app\utility\utility.py",
line 102, in <lambda>
factory = property(lambda self: self.component)
File
"D:\projektCompiler\trunkAmadeus\src\zope\app\registration\registration.py",
line 666, in __BBB_getComponent
return self.__BBB_old_getComponent(self._BBB_componentPath)
File
"D:\projektCompiler\trunkAmadeus\src\zope\app\registration\registration.py",
line 683, in __BBB_old_getComponent
component = zapi.traverse(root, path)
File "D:\projektCompiler\trunkAmadeus\src\zope\app\traversing\api.py",
line 92, in traverse
return traverser.traverse(path, request=request)
File
"D:\projektCompiler\trunkAmadeus\src\zope\app\traversing\adapters.py", line
118, in traverse
curr = traversePathElement(curr, name, path, request=request)
File
"D:\projektCompiler\trunkAmadeus\src\zope\app\traversing\adapters.py", line
173, in traversePathElement
next_item = traversable.traverse(nm, further_path)
File
"D:\projektCompiler\trunkAmadeus\src\zope\app\container\traversal.py", line
101, in traverse
raise TraversalError, name
Regards
Roger Ineichen
Projekt01 GmbH
www.projekt01.ch
_____________________________
END OF MESSAGE
> -----Original Message-----
> From: Stephan Richter [mailto:srichter at cosmos.phy.tufts.edu]
> Sent: Saturday, December 11, 2004 4:18 PM
> To: zope3-dev at zope.org; dev at projekt01.ch
> Subject: Re: [Zope3-dev] No, backward compatibility
>
> On Saturday 11 December 2004 08:53, Roger Ineichen wrote:
> > One of the last changes isn't backward compatible.
> >
> > If somebody has local persistent utilities registred.
> > There is a problem with the new 'component' reater then
> > 'componentPath' registration.
> >
> > My utility was not directly borken, but I wasn't able to
> > add other utilities.
> >
> > There was also no way to remove my utility, because of,
> > "the remove process couldn't find the location of my old
> > utility instance".
>
> Hi Roger,
>
> I made some corrections on Thursday. Is it still broken for
> you? I really
> cannot imagine it. Can you send me more specific error
> messages? Maybe even a
> small package with one of your utilities in it?
>
> Regards,
> Stephan
> --
> Stephan Richter
> CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
> Web2k - Web Software Design, Development and Training
>
More information about the Zope3-dev
mailing list