msg30777 - (view) |
Author: Tal Einat (taleinat) *  |
Date: 2006-12-09 17:38 |
If I define a class within a class, like this:
class A:
class B:
pass
def foo(self):
pass
The class browser shows that A contains foo, but it doesn't show B at all.
|
msg84594 - (view) |
Author: Daniel Diniz (ajaksu2) *  |
Date: 2009-03-30 17:39 |
Confirmed on trunk and py3k.
|
msg89549 - (view) |
Author: Roger Serwy (roger.serwy) *  |
Date: 2009-06-20 20:48 |
The class browser relies on the pyclbr module to scan the code. This
module doesn't support classes within classes. Both pyclbr and IDLE's
class browser need to be modified.
|
msg91499 - (view) |
Author: Guilherme Polo (gpolo) *  |
Date: 2009-08-12 16:43 |
The attached patch adds support for nested objects in pyclbr and also in
ClassBrowser.
I have yet to find an optimal way to test this on test_pyclbr (I did
some things here, none very nice), so you will notice tests are missing
on this patch.
|
msg91509 - (view) |
Author: Guilherme Polo (gpolo) *  |
Date: 2009-08-12 22:51 |
I've removed the previous patch from here and attached an updated one on
issue6691.
Now the patch attached here only contains changes related to
idlelib.ClassBrowser.
|
msg250596 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2015-09-14 02:29 |
Class Browser is now a module browser as it includes functions not in classes. I guess pyclbr does this. Enhancing this for current versions would require adding a private copy of enhanced pyclbr to idlelib.
|
msg297297 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2017-06-29 19:37 |
I believe the patch for #6691 will also add detection of nested functions. If so, the IDLE patch must also make use of that new information.
If the patch for #6691 is only applied to 3.7, I want to put a temporary copy of the revised pyclbr in 3.6 idlelib, perhaps as _pyclbr, and change the 3.6 import accordingly.
|
msg297974 - (view) |
Author: Cheryl Sabella (cheryl.sabella) *  |
Date: 2017-07-09 00:02 |
I created issue 30881 to add docstrings to browser.py to make creating user tests easier.
|
msg299794 - (view) |
Author: Cheryl Sabella (cheryl.sabella) *  |
Date: 2017-08-05 21:08 |
I added a more complete set of unit tests to the PR.
|
msg301929 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2017-09-12 00:41 |
Nick, this over-due improvement to IDLE depends on the over-due improvement to pyclbr in 3.7. I would like to backport the IDLE improvement by putting a copy of 3.7 pyclbr in 3.6 idlelib. Do you agree that PEP434 allows this?
|
msg301930 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2017-09-12 00:44 |
Would it make any difference if the module were renamed? and made to only work with IDLE?
|
msg301947 - (view) |
Author: Alyssa Coghlan (ncoghlan) *  |
Date: 2017-09-12 10:18 |
I think a bundled copy as idlelib._pyclbr in the 3.6 branch would be within the intent of PEP 434.
|
msg302716 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2017-09-21 18:04 |
I am revising the codecontext patch to use comprehensions and the sort key option. I will rename the new function 'collect_objects' (GPolo) / '_traverse_node' (CSabella) as 'list_children' and have it return the name-object list, ordered by line number, needed by the tree widget.
[The input is a dictionary of children of a node, rather than a node, because pyclbr returns the dictionary of the children of the root module node of the tree, rather than a root node itself. Sorting is not actually needed for 3.6/7 because the dicts are already ordered, but pyclbr does not guarantee this by using OrderedDict. Proposing these two changes is a separate potential issue.]
|
msg302767 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2017-09-22 20:08 |
New changeset 058de11360ea6816a6e978c7be0bcbea99a3f7da by Terry Jan Reedy (Cheryl Sabella) in branch 'master':
bpo-1612262: IDLE: Class Browser shows nested functions, classes (#2573)
https://github.com/python/cpython/commit/058de11360ea6816a6e978c7be0bcbea99a3f7da
|
msg302776 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2017-09-22 21:28 |
New changeset fa1cae5832cbcfafedc4b1879c2abc85452f4edd by Terry Jan Reedy in branch '3.6':
[3.6] bpo-1612262: IDLE: Class Browser shows nested functions, classes (GH-2573) (#3702)
https://github.com/python/cpython/commit/fa1cae5832cbcfafedc4b1879c2abc85452f4edd
|
msg302777 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2017-09-22 21:34 |
I settled on 'transform_children' for the new function. #31461 is the master issue for improving the browsers.
|
|
Date |
User |
Action |
Args |
2022-04-11 14:56:21 | admin | set | github: 44322 |
2017-09-23 20:45:10 | terry.reedy | set | title: Class Browser doesn't show internal classes -> IDLE: Include nested functions and classes in module browser |
2017-09-22 21:34:32 | terry.reedy | set | status: open -> closed resolution: fixed messages:
+ msg302777
stage: patch review -> resolved |
2017-09-22 21:28:03 | terry.reedy | set | messages:
+ msg302776 |
2017-09-22 20:49:45 | terry.reedy | set | pull_requests:
+ pull_request3686 |
2017-09-22 20:08:46 | terry.reedy | set | messages:
+ msg302767 |
2017-09-21 18:04:01 | terry.reedy | set | messages:
+ msg302716 |
2017-09-13 22:03:45 | terry.reedy | link | issue31461 dependencies |
2017-09-12 10:18:57 | ncoghlan | set | messages:
+ msg301947 |
2017-09-12 00:44:57 | terry.reedy | set | messages:
+ msg301930 |
2017-09-12 00:41:24 | terry.reedy | set | nosy:
+ ncoghlan messages:
+ msg301929
|
2017-08-14 19:42:48 | terry.reedy | set | dependencies:
+ IDLE: add docstrings to browser.py stage: test needed -> patch review |
2017-08-05 21:08:43 | cheryl.sabella | set | messages:
+ msg299794 |
2017-07-09 00:02:55 | cheryl.sabella | set | messages:
+ msg297974 |
2017-07-04 23:41:11 | cheryl.sabella | set | pull_requests:
+ pull_request2644 |
2017-06-29 19:37:13 | terry.reedy | set | priority: normal -> high
nosy:
+ cheryl.sabella versions:
+ Python 3.7, - Python 2.7, Python 3.5 messages:
+ msg297297
assignee: terry.reedy |
2015-09-14 02:29:36 | terry.reedy | set | priority: low -> normal versions:
+ Python 2.7, Python 3.5, Python 3.6, - Python 3.2 nosy:
+ terry.reedy
messages:
+ msg250596
|
2014-02-04 12:05:48 | taleinat | set | nosy:
- taleinat
|
2010-08-25 14:37:43 | BreamoreBoy | set | versions:
+ Python 3.2, - Python 3.1, Python 2.7 |
2009-08-12 22:51:23 | gpolo | set | files:
- show_nested_objects.diff |
2009-08-12 22:51:14 | gpolo | set | files:
+ classbrowser_nesting_support.diff
dependencies:
+ Support for nested classes and function for pyclbr messages:
+ msg91509 |
2009-08-12 16:43:57 | gpolo | set | files:
+ show_nested_objects.diff
nosy:
+ gpolo messages:
+ msg91499
keywords:
+ patch |
2009-06-20 20:48:19 | roger.serwy | set | nosy:
+ roger.serwy messages:
+ msg89549
|
2009-03-30 17:39:48 | ajaksu2 | set | priority: normal -> low
type: enhancement versions:
+ Python 3.1, Python 2.7, - Python 2.6 nosy:
+ ajaksu2
messages:
+ msg84594 stage: test needed |
2006-12-09 17:38:55 | taleinat | create | |