New-style classes and ClassSecurityInfo, fixed already?
http://zope.org/Collectors/Zope/1055 Is a bug report I filed a while ago for a fairly trivial breakage of the ClassSecurityInfo class due to the use of assignment to the class dictionary during the apply method. I'm wondering, is this fixed now on CVS head? I've been using a work-around module sub-class for Zope 2.7 work w/ new-style classes, but I can't imagine that's something that would be wanted as a solution. The ClassSecurityInfo.apply method is changed to use setattr instead of dict['x'] = y. The InitializeClass function also needs to have the same transformation applied to it. If desired I can pull the CVS tree and produce a diff if the problem isn't already solved. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/
On Mon, 2004-01-05 at 00:06, Mike C. Fletcher wrote:
http://zope.org/Collectors/Zope/1055
Is a bug report I filed a while ago for a fairly trivial breakage of the ClassSecurityInfo class due to the use of assignment to the class dictionary during the apply method. [...]
The InitializeClass function also needs to have the same transformation applied to it.
If desired I can pull the CVS tree and produce a diff if the problem isn't already solved.
If you do that, and attach the patch to the bug report, people with CVS access will have even less excuses not to fix it :-)
Leonardo Rochael Almeida wrote:
On Mon, 2004-01-05 at 00:06, Mike C. Fletcher wrote:
http://zope.org/Collectors/Zope/1055
Is a bug report I filed a while ago for a fairly trivial breakage of the ClassSecurityInfo class due to the use of assignment to the class dictionary during the apply method. [...]
The InitializeClass function also needs to have the same transformation applied to it.
If desired I can pull the CVS tree and produce a diff if the problem isn't already solved.
If you do that, and attach the patch to the bug report, people with CVS access will have even less excuses not to fix it :-)
Okay, this appears to have been fixed in CVS by Jim back in November. Revision : 1.15 Date : 2003/11/28 16:45:22 Author : 'jim' State : 'Exp' Lines : +7 -5 Description : New-style class dictionaries are immutable. Changed some class-update code to use setattr rather thah class-dictionary modifications. If someone wants to close the issue out, that'd be cool. Enjoy yourselves, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/
participants (2)
-
Leonardo Rochael Almeida -
Mike C. Fletcher