[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
>>> AbstractGCProtector.default is original_protector

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>

More information about the New-bugs-announce mailing list