[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2014-02-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4cd620d8c3f6 by R David Murray in branch 'default': whatsnew: DynanicClassAttribute (#19030), Py_SetStandardStreamEncoding (#16129) http://hg.python.org/cpython/rev/4cd620d8c3f6 -- ___ Python tracker

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2014-02-25 Thread R. David Murray
R. David Murray added the comment: I added docs for DynamicClassAttribute by copying the docstring. I think the doc entry could use some expansion, though, as it isn't obvious how to use it (or what, in fact, it does exactly). -- ___ Python

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-22 Thread Stefan Krah
Stefan Krah added the comment: Here's the fix for --without-doc-strings (can't commit right now). -- Added file: http://bugs.python.org/file32297/issue19030-without-docstrings.patch ___ Python tracker rep...@bugs.python.org

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-22 Thread Ethan Furman
Ethan Furman added the comment: Stefan, do the other tests in PydocWithMetaClasses continue to work on your FreeBSD 9.0 box without docstrings? Because they all fail on my Linux Ubuntu 13.04 box. -- ___ Python tracker rep...@bugs.python.org

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-22 Thread Stefan Krah
Stefan Krah added the comment: Ethan Furman rep...@bugs.python.org wrote: Stefan, do the other tests in PydocWithMetaClasses continue to work on your FreeBSD 9.0 box without docstrings? Because they all fail on my Linux Ubuntu 13.04 box. I tested on Debian, and the remaining tests seem to

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-22 Thread Ethan Furman
Ethan Furman added the comment: Actually, you @skipif clued me in as to what was happening with the other pydoc tests and their skipif clauses. Added appropriate skipifs to the new tests and mimicked the docstring in/exclusion. All tests now passing with and without docstrings, with and

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 64d94b21e731 by Ethan Furman in branch 'default': Issue #19030: fix new pydoc tests for --without-doc-strings http://hg.python.org/cpython/rev/64d94b21e731 -- ___ Python tracker rep...@bugs.python.org

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-21 Thread koobs
koobs added the comment: @Ethan, not sure if you've already seen them, but there are 4 pydoc failures since 2f09a6980e1a Attaching another complete log from build #245 on the koobs-freebsd9 buildslave here for posterity -- Added file:

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset dad1debba93c by Charles-François Natali in branch 'default': Fix test_pydoc failure introduced by 2f09a6980e1a (issue #19030). http://hg.python.org/cpython/rev/dad1debba93c -- ___ Python tracker

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-21 Thread Charles-François Natali
Charles-François Natali added the comment: I took the freedom to push a fix for the test_pydoc failures (all the buildbots were red). It should fix the failures, but since I'm not familiar with the code, it'd be good to have someone double-check it. Ethan, you just broke all the buildbots:

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-21 Thread Stefan Krah
Stefan Krah added the comment: The build --without-doc-strings still fails on the FreeBSD-9.0 bot. Antoine, could we make that option official on my build slave? Currently I'm subverting the build system by exporting an environment variable. It does not seem to be a heavy maintenance burden:

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-21 Thread Ethan Furman
Ethan Furman added the comment: Charles-François Natali added the comment: Ethan, you just broke all the buildbots: you're now officialy a core developer! ;-) I was actually hoping to put off this particular honor for a while... drat! :) -- ___

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-21 Thread Ethan Furman
Ethan Furman added the comment: Thanks, Charles-François! The problem occurred when I tried to push the commit and was told there was trailing white-space. Naturally I then ran the de-whitespacing tool which of course removed the whitespace from those lines where you added the \x20s back

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Antoine, could we make that option official on my build slave? Currently I'm subverting the build system by exporting an environment variable. Done. Can you please watch for failures and ensure they get fixed? --

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-21 Thread Stefan Krah
Stefan Krah added the comment: Antoine Pitrou rep...@bugs.python.org wrote: Done. Can you please watch for failures and ensure they get fixed? Thanks! Yes, I'll keep an eye on it. -- ___ Python tracker rep...@bugs.python.org

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2f09a6980e1a by Ethan Furman in branch 'default': Issue #19030: final pieces for proper location of various class attributes located in the metaclass. http://hg.python.org/cpython/rev/2f09a6980e1a --

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 39b06c3fbe2e by Ethan Furman in branch 'default': Close #19030: inspect.getmembers and inspect.classify_class_attrs http://hg.python.org/cpython/rev/39b06c3fbe2e -- resolution: - fixed stage: patch review - committed/rejected status: open

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-18 Thread koobs
Changes by koobs koobs.free...@gmail.com: Added file: http://bugs.python.org/file32166/koobs-freebsd10-amd64-py3x-build588.log ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19030 ___

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-18 Thread koobs
koobs added the comment: Multiple test_pydoc failures found on koobs-freebsd* buildbots after 39b06c3fbe2e6ef78a540513d4b81f2d095d1e62 Attaching complete logs from both bots to this issue, will reference #16938 as well -- nosy: +koobs Added file:

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 02c9d26d231f by Ethan Furman in branch 'default': Issue #19030: special-cased __dict__ as the actual dict is not returned, a proxy is. http://hg.python.org/cpython/rev/02c9d26d231f -- ___ Python

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-14 Thread Ethan Furman
Ethan Furman added the comment: Updated and renamed the DynamicClassAttribute tests, and discovered that classify_class_attrs is not handling instance portion correctly. class Meta(type): def __getattr__(self, name): if name == 'ham': return 'spam'

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-14 Thread Ethan Furman
Ethan Furman added the comment: Updated tests now passing. Will commit Thursday, or Friday at the latest. -- stage: - patch review Added file: http://bugs.python.org/file32123/issue19030.stoneleaf.05.patch ___ Python tracker rep...@bugs.python.org

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3752c94368dd by Ethan Furman in branch 'default': Issue19030: commit tests for DynamicClassAttribute http://hg.python.org/cpython/rev/3752c94368dd -- ___ Python tracker rep...@bugs.python.org

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 96081e7526f0 by Ethan Furman in branch 'default': Issue19030: fixed comment that was still referring to a changed descriptor. http://hg.python.org/cpython/rev/96081e7526f0 -- ___ Python tracker

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-27 Thread Martijn Pieters
Martijn Pieters added the comment: Note: there is a comment explaining the point of _RouteClassAttributeToGetattr right above the Enum.name and Enum.value methods you changed (now at line 474). You may want to update that comment now. -- nosy: +mjpieters

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 436b606ecfe8 by Ethan Furman in branch 'default': Close #19030: improvements to inspect and Enum. http://hg.python.org/cpython/rev/436b606ecfe8 -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-22 Thread Ethan Furman
Ethan Furman added the comment: Current patch has a little more code cleanup and a bunch more tests. I copied and adapted test_property to test_VirtualAttribute, and VirtualAttribute passes every test except the __slots__ test where __doc__ is not supposed to copy. I think the problem there

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-22 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: Added file: http://bugs.python.org/file31846/issue19030.stoneleaf.04.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19030 ___

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-22 Thread Nick Coghlan
Nick Coghlan added the comment: I suggest DynamicClassAttribute for the descriptor name. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19030 ___

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-18 Thread Ethan Furman
Ethan Furman added the comment: Okay, some slight reorganizing. Current patch gives preferential treatment to getattr, falling back on dict lookup if getattr raises an exception or if the resulting object's class is not found in the mro (including the metaclass mro). Amazingly, nothing

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-16 Thread Nick Coghlan
Nick Coghlan added the comment: types is the OO equivalent to functools these days, in addition to its original role of exposing the internal type objects that aren't builtins. However, it seems to me that the fix for issue 1785 is simply *wrong*: it eliminated the exceptions at the expense

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: However, it seems to me that the fix for issue 1785 is simply *wrong*: it eliminated the exceptions at the expense of sometimes returning the *wrong answer*. The underlying problem is that those functions are not very well-specified (actually,

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-16 Thread Nick Coghlan
Nick Coghlan added the comment: Right, we definitely want inspect to swallow the exceptions from descriptors. My suggestion is merely to switch the order to be: 1. Try getattr 2. If that throws an exception, check __dict__ directly 3. If neither works (e.g. due to a buggy __dir__ method), ignore

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Right, we definitely want inspect to swallow the exceptions from descriptors. My suggestion is merely to switch the order to be: 1. Try getattr 2. If that throws an exception, check __dict__ directly 3. If neither works (e.g. due to a buggy __dir__ method),

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-16 Thread Nick Coghlan
Nick Coghlan added the comment: On the class, since that's the case which is breaking here (instances are already OK, since they trigger the success path in the custom descriptors) -- title: inspect.getmembers and inspect.classify_class_attrs mishandle descriptors -

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-16 Thread Ethan Furman
Ethan Furman added the comment: Switching the order to try getattr first is going to make getting the doc from the descriptor problematic -- we have no way of knowing if the descriptor doc goes with the object we got back from getattr. Current patch adds VirtualAttribute to types, and reworks

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-16 Thread Nick Coghlan
Nick Coghlan added the comment: The current behaviour is broken for *any* descriptor which doesn't return itself when retrieved from the class. It just so happens that all the *other* descriptors in the standard library work that way, so it doesn't matter if you retrieve them directly from