zope.proxy: class attributes shadow __slots__

Bug #186631 reported by Christian Theune
2
Affects Status Importance Assigned to Milestone
BlueBream
New
Undecided
Unassigned
Zope 3
Won't Fix
Undecided
Unassigned
zope.proxy
Won't Fix
Undecided
Unassigned

Bug Description

Define a subclass from SpecificationDecoratorBase with slots:

class MyProxy(SpecificationDecoratorBase):
    __slots__ = ('foo',)

    foo = None

Now, when using an instance of `MyProxy` the following will happen:

>>> f = MyProxy([])
>>> print f.foo
None
>>> f.foo = 'bar'
>>> print f.foo
None

When not assigning `foo` as a class attribute, it works. IMHO this isn't exactly intended to work this way, but the tests don't specify anything here.

Tres Seaver (tseaver)
Changed in zope3:
status: New → Won't Fix
Revision history for this message
Tres Seaver (tseaver) wrote :
Changed in zope.proxy:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.