"Dr. Ross Lazarus" wrote:
The point that I find hard to understand is that namespace in DT_Util has changed from 2.1.6 as follows
===========2.1.6================== class namespace_: pass
def namespace(self, **kw): """Create a tuple consisting of a single instance whos attributes are provided as keyword arguments.""" r=namespace_() d=r.__dict__ for k, v in kw.items(): d[k]=v return r,
========2.2.0b3============ class namespace_: __allow_access_to_unprotected_subobjects__=1
def namespace(self, **kw): """Create a tuple consisting of a single instance whos attributes are provided as keyword arguments.""" return apply(self, (), kw)
Now, I can easily put the old definition back and it might work - but I'm not in a position to understand why the method has changed from what looks like a simple dictionary construction to the apply function - which doesn't seem to have anything to do with the namespace_ class !!
In Zope 2.1.6 and before we had two ways of creating a new namespace: _() and _.namespace(). The former was implemented in C and the latter was in Python, but they did virtually the same thing (and there certainly wasn't any reason to believe they should do anything different.) So we merged the two implementations into one by causing the namespace() method to call the _() method, implemented in cDocumentTemplate.py. AFAIK the namespace_ class definition was left in by accident. It now does absolutely nothing. There have been more problems with the merge than expected. But we are engineers--the last thing we want is code bloat by reverting to the old method. Instead we'd like to get bugs truly corrected. So I'll plan to look into this problem. Shane