[issue1615] descriptor protocol bug

2013-09-20 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger priority: high -> normal versions: -Python 2.7, Python 3.2, Python 3.3 ___ Python tracker ___ _

[issue1615] descriptor protocol bug

2013-09-17 Thread Ethan Furman
Ethan Furman added the comment: Benjamin Peterson added the comment: > > I consider this to be a feature. Properties can raise AttributeError to defer > to > __getattr__. Micah Friesen added the comment: > >I submit that this is not a feature - I can't imagine a real-world scenario >[...] No

[issue1615] descriptor protocol bug

2013-09-16 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue1615] descriptor protocol bug

2013-02-22 Thread Eric Snow
Eric Snow added the comment: The whole AttributeError gaining an attribute seems impractical, but the second approach still seems reasonable to me. I've attached a rough patch to demonstrate. If that looks okay, I can flesh it out. -- keywords: +patch Added file: http://bugs.python.o

[issue1615] descriptor protocol bug

2013-02-15 Thread Eric Snow
Eric Snow added the comment: Got bit by a variation of this today in 2.7: class Spam(object): def __getattr__(self, attr): raise AttributeError(attr) @property def eggs(self): return self.ham s = Spam() s.eggs Traceback (most recent call last): File "", line 1, in

[issue1615] descriptor protocol bug

2012-04-18 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo versions: +Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker ___ ___ Python-bugs-lis

[issue1615] descriptor protocol bug

2012-04-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue1615] descriptor protocol bug

2012-04-17 Thread Micah Friesen
Micah Friesen added the comment: I ran into this recently, as well, and have lost probably a day's worth of time debugging it. I submit that this is not a feature - I can't imagine a real-world scenario where you actually want to write debuggable code where a descriptor defers to __getattr__

[issue1615] descriptor protocol bug

2010-09-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: I consider this to be a feature. Properties can raise AttributeError to defer to __getattr__. -- nosy: +benjamin.peterson ___ Python tracker ___

[issue1615] descriptor protocol bug

2010-09-18 Thread Mark Lawrence
Mark Lawrence added the comment: This is still an issue with the latest trunk. -- nosy: +BreamoreBoy ___ Python tracker ___ ___ Python

[issue1615] descriptor protocol bug

2010-08-16 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue1615] descriptor protocol bug

2010-05-11 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: +Python 2.7 -Python 2.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1615] descriptor protocol bug

2008-12-09 Thread Thomas Lee
Thomas Lee <[EMAIL PROTECTED]> added the comment: Related reading from a few years back: http://coding.derkeiler.com/Archive/Python/comp.lang.python/2005-05/msg03829.html -- nosy: +thomas.lee ___ Python tracker <[EMAIL PROTECTED]>

[issue1615] descriptor protocol bug

2008-12-03 Thread ganges master
ganges master <[EMAIL PROTECTED]> added the comment: here's a short example of the bug >>> class Foo(object): ... def __getattr__(self, name): ... return 42 ... @property ... def bacon(self): ... return int.lalala ... @property ... def eggs(self): ... return 17 ... >>>

[issue1615] descriptor protocol bug

2008-01-20 Thread Christian Heimes
Changes by Christian Heimes: -- priority: -> high __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue1615] descriptor protocol bug

2008-01-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: PyObject_GenericGetAttr is invoked from slot_tp_getattr_hook in typeobject.c via tp_getattro. The problem is that, when tp_getattro returns with an AttributeError, there is no way for slot_tp_getattr_hook to know whether the error was raised by PyObject_GenericGe

[issue1615] descriptor protocol bug

2008-01-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: I can confirm that with SVN trunk, and it's actually even worse because it can return unexpected results without raising an exception at all: >>> class Foo(object): ... def __getattr__(self, name): return 42 ... @property ... def bacon(self): return int.la

[issue1615] descriptor protocol bug

2007-12-13 Thread ganges master
New submission from ganges master: it seems the code of PyObject_GenericGetAttr, which invokes the descriptor protocol, silences any AttributeErrors raised by the descriptor, for classes that also define __getattr__. it should propagate up rather than being silently ignored. the attached example