[issue1785] inspect gets broken by some descriptors

2012-01-18 Thread Vincent Pelletier
Vincent Pelletier plr.vinc...@gmail.com 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

[issue1785] inspect gets broken by some descriptors

2012-01-18 Thread Vincent Pelletier
Vincent Pelletier plr.vinc...@gmail.com added the comment: Sorry, I forgot to mention I'm using python2.7 . -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1785 ___

[issue1785] inspect gets broken by some descriptors

2012-01-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue1785] inspect gets broken by some descriptors

2012-01-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za 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 --

[issue1785] inspect gets broken by some descriptors

2012-01-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

2011-12-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za 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

[issue1785] inspect gets broken by some descriptors

2011-12-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za 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 -- ___

[issue1785] inspect gets broken by some descriptors

2011-12-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Now fixed in all 3 branches. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1785

[issue1785] inspect gets broken by some descriptors

2011-12-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Great stuff. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1785 ___ ___

[issue1785] inspect gets broken by some descriptors

2011-12-16 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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 rep...@bugs.python.org

[issue1785] inspect gets broken by some descriptors

2011-12-16 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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 rep...@bugs.python.org

[issue1785] inspect gets broken by some descriptors

2011-12-16 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Added file: http://bugs.python.org/file23976/inspect-and-pydoc-bug3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1785 ___

[issue1785] inspect gets broken by some descriptors

2011-12-16 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1785 ___ ___ Python-bugs-list

[issue1785] inspect gets broken by some descriptors

2011-12-12 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1785 ___ ___ Python-bugs-list

[issue1785] inspect gets broken by some descriptors

2011-12-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com 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 ___

[issue1785] inspect gets broken by some descriptors

2010-09-19 Thread Mark Lawrence
Mark Lawrence breamore...@yahoo.co.uk added the comment: I can't apply the patch to any current SVN version. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1785 ___

[issue1785] inspect gets broken by some descriptors

2010-03-29 Thread John Trammell
Changes by John Trammell johntramm...@gmail.com: -- nosy: +jotr ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1785 ___ ___ Python-bugs-list

[issue1785] inspect gets broken by some descriptors

2009-02-18 Thread Floris Bruynooghe
Changes by Floris Bruynooghe floris.bruynoo...@gmail.com: -- nosy: +flub ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1785 ___ ___

[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] http://bugs.python.org/issue1785 ___

[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] http://bugs.python.org/issue1785 __

[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 stdin, line 1, in module File /usr/lib/python2.5/site.py, line 351, in __call__

[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-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 set by

[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] http://bugs.python.org/issue1785 __ ___ Python-bugs-list mailing list

[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 getattred. 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 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 Antoine Pitrou
Changes by Antoine Pitrou: -- versions: +Python 2.6 -Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1785 __ ___ Python-bugs-list mailing list Unsubscribe: