[issue1785] "inspect" gets broken by some descriptors

2012-01-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've backed out the part of the changeset that "fixed" getmembers(), so the old behaviour is restored. Other parts of the changeset (that e.g. fixed pydoc) have not been reverted. -- versions: +Python 2.7, Python 3.3 _

[issue1785] "inspect" gets broken by some descriptors

2012-01-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset f824744557ba by Antoine Pitrou in branch '2.7': Revert part of 13f56cd8dec1 (issue #1785) to avoid breaking getmembers() with unbound methods. http://hg.python.org/cpython/rev/f824744557ba -- ___ Python

[issue1785] "inspect" gets broken by some descriptors

2012-01-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for noticing. The doc for ismethod() says: “Return true if the object is a bound method written in Python.” and the docstring agrees with that: “Return true if the object is an instance method. [...]” So the change isn't properly a regression when

[issue1785] "inspect" gets broken by some descriptors

2012-01-18 Thread Vincent Pelletier
Vincent Pelletier added the comment: Sorry, I forgot to mention I'm using python2.7 . -- ___ Python tracker ___ ___ Python-bugs-list m

[issue1785] "inspect" gets broken by some descriptors

2012-01-18 Thread Vincent Pelletier
Vincent Pelletier added the comment: This change causes the following behaviour: >>> import inspect >>> class B(object): ... def f(self): ... pass ... >>> inspect.getmembers(B, inspect.ismethod) [] While I would expect the result to contain f: >>> inspect.ismethod(B.f) True Isn't this

[issue1785] "inspect" gets broken by some descriptors

2011-12-21 Thread Éric Araujo
Éric Araujo added the comment: Great stuff. -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue1785] "inspect" gets broken by some descriptors

2011-12-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Now fixed in all 3 branches. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue1785] "inspect" gets broken by some descriptors

2011-12-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 13f56cd8dec1 by Antoine Pitrou in branch '2.7': Issue #1785: Fix inspect and pydoc with misbehaving descriptors. http://hg.python.org/cpython/rev/13f56cd8dec1 -- ___ Python tracker

[issue1785] "inspect" gets broken by some descriptors

2011-12-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 902f694a7b0e by Antoine Pitrou in branch '3.2': Issue #1785: Fix inspect and pydoc with misbehaving descriptors. http://hg.python.org/cpython/rev/902f694a7b0e New changeset b08bf8df8eec by Antoine Pitrou in branch 'default': Issue #1785: Fix inspec

[issue1785] "inspect" gets broken by some descriptors

2011-12-16 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue1785] "inspect" gets broken by some descriptors

2011-12-16 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file23976/inspect-and-pydoc-bug3.patch ___ Python tracker ___ ___ Python-bugs-li

[issue1785] "inspect" gets broken by some descriptors

2011-12-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch that adds a test for classifying builtin types (checks that ``inspect.classify_class_attrs(type)`` does not throw as in issue13581). -- ___ Python tracker __

[issue1785] "inspect" gets broken by some descriptors

2011-12-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch for 3.2. -- stage: -> patch review versions: +Python 3.2 -Python 2.6 Added file: http://bugs.python.org/file23975/inspect-and-pydoc-bug2.patch ___ Python tracker ___

[issue1785] "inspect" gets broken by some descriptors

2011-12-12 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue1785] "inspect" gets broken by some descriptors

2011-12-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The 'type' object now has the same issue: __abstractmethods__ appears in dir(type) but type.__abstractmethods__ fails with an AttributeError. See issue13581 -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue1785] "inspect" gets broken by some descriptors

2010-09-19 Thread Mark Lawrence
Mark Lawrence added the comment: I can't apply the patch to any current SVN version. -- nosy: +BreamoreBoy ___ Python tracker ___ ___

[issue1785] "inspect" gets broken by some descriptors

2010-03-29 Thread John Trammell
Changes by John Trammell : -- nosy: +jotr ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue1785] "inspect" gets broken by some descriptors

2009-02-18 Thread Floris Bruynooghe
Changes by Floris Bruynooghe : -- nosy: +flub ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue1785] "inspect" gets broken by some descriptors

2008-06-06 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Really don't know why this was assigned to me... -- assignee: facundobatista -> ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue1785] "inspect" gets broken by some descriptors

2008-03-17 Thread Sean Reifschneider
Changes by Sean Reifschneider <[EMAIL PROTECTED]>: -- assignee: -> facundobatista keywords: +patch nosy: +facundobatista priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1785] "inspect" gets broken by some descriptors

2008-01-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a (hopefully complete) patch against both pydoc and inspect. It fixes one more bug compared to the previous one (descriptors can also have a special __getattr__ in addition to __get__, which gave problems when trying to access __classobj__). Added file:

[issue1785] "inspect" gets broken by some descriptors

2008-01-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: For the record the same problem also happens with toscawidgets. >>> from toscawidgets.widgets.forms import validators >>> help(validators) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.5/site.py", line 351, in __call__ re

[issue1785] "inspect" gets broken by some descriptors

2008-01-10 Thread Antoine Pitrou
Changes by Antoine Pitrou: -- versions: +Python 2.6 -Python 2.5 __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe

[issue1785] "inspect" gets broken by some descriptors

2008-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is my attempt at a patch for this. It fixes inspect.getmembers and inspect.classify_class_attrs to work with Dieter's example. I hope it doesn't mess anything else. As for pydoc, things look a bit more complicated... The annoying thing is that the logic to

[issue1785] "inspect" gets broken by some descriptors

2008-01-10 Thread Dieter Maurer
Dieter Maurer added the comment: In "dm.zdoc" (a "pydoc" wrapper for Zope) I simply filter out all names returned by "dir" which cannot be "getattr"ed. But, I am not sure, that this is good enough to be accepted as a patch (although it already improves upon the current state) ___

[issue1785] "inspect" gets broken by some descriptors

2008-01-10 Thread Guido van Rossum
Guido van Rossum added the comment: Please submit a patch. -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing l

[issue1785] "inspect" gets broken by some descriptors

2008-01-10 Thread Dieter Maurer
New submission from Dieter Maurer: The inspect functions "getmembers(cls)" and "classify_class_attrs(cls)" require that for a class *cls* each name in "dir(cls)" can be retrieved by "getattr(cls, name)". While this holds for usual class attributes, it may well fail for descriptors (descriptors se