[New-bugs-announce] [issue1878] class attribute cache failure (regression)
Paul Pogonyshev
report at bugs.python.org
Sun Jan 20 18:40:58 CET 2008
New submission from Paul Pogonyshev:
I have a regression from Python 2.5 to Python SVN (would-be-2.6). I
believe this because of class attribute caching. The problem shown
below happens because AbstractGCProtector is an extension class. So,
Python interpreter doesn't have a chance to notice set_default() method
below changes a class attribute.
>>> from notify.all import *
>>> original_protector = AbstractGCProtector.default
>>> new_protector = FastGCProtector ()
>>> AbstractGCProtector.default is new_protector
False
>>> AbstractGCProtector.default is original_protector
True
Please note that this a regression. This code works as expected in 2.3
and 2.5.
----------
components: Interpreter Core
messages: 61316
nosy: _doublep
severity: major
status: open
title: class attribute cache failure (regression)
type: behavior
versions: Python 2.6
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1878>
__________________________________
More information about the New-bugs-announce
mailing list