[issue31460] IDLE: Revise ModuleBrowser API

2017-09-30 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31460] IDLE: Revise ModuleBrowser API

2017-09-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset c8198c92320bc35b1e3de5ff0118bd8e20e8d68a by Terry Jan Reedy in 
branch '3.6':
[3.6] bpo-31460: Simplify the API of IDLE's Module Browser. (GH-3842) (#3843)
https://github.com/python/cpython/commit/c8198c92320bc35b1e3de5ff0118bd8e20e8d68a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31460] IDLE: Revise ModuleBrowser API

2017-09-30 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
pull_requests: +3824

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31460] IDLE: Revise ModuleBrowser API

2017-09-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset d6bb65f378e34fe0c11fdb39588357ecf22964eb by Terry Jan Reedy in 
branch 'master':
bpo-31460: Simplify the API of IDLE's Module Browser. (#3842)
https://github.com/python/cpython/commit/d6bb65f378e34fe0c11fdb39588357ecf22964eb


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31460] IDLE: Revise ModuleBrowser API

2017-09-30 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +3823
stage: test needed -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31460] IDLE: Revise ModuleBrowser API

2017-09-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Menu item 'Module Browser' invokes '<>', which calls 
Editor_Window.open_module_browser.  If the window is an actual editor, its path 
is used; otherwise open_module is called.  In either case, ModuleBrowser is 
called with flist and path pieces.

PathBrowser subclasses ModuleBrowser.  Menu item 'Path Browser' invokes 
'<>', which calls Editor_Window.open_path_browser, which 
calles PathBrowser.  PathBrowser.__init__'s only parameter is flist and it does 
not call ModuleBrowser.__init__.  So the APIs are independent and can be 
modified or not separately.  

For ModuleBrowser, changing flist to master and changing (name, path) to to 
filepath can be done independently.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31460] IDLE: Revise ModuleBrowser API

2017-09-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I meant .py?, as in .py, .pyw, .pyo, not .p?

--
nosy: +csabella

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31460] IDLE: Revise ModuleBrowser API

2017-09-13 Thread Terry J. Reedy

New submission from Terry J. Reedy:

The signature of browser.ClassBrowser(to be renamed ModuleBrowser).__init__ is

def __init__(self, flist, name, path, _htest=False, _utest=False)

flist is only used to access the application root.  Change it to master.  Then 
text can directly pass the test root.

name and path are the split apart pieces of the module path, minus '.py', which 
are promptly rejoined, with '.py'.  Callers always start valid path and have to 
split it and delete '.py' for the call.  Let them pass the full path.  A 
side-effect is that the browser will not work with a file without '.py'.

ModuleBrowser can them split off the filename and remove a '.p?' extension, if 
present.

The patch will have to change both .__init__ and callers, and ideally should 
somehow test that everything works.

--
assignee: terry.reedy
components: IDLE
messages: 302119
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: Revise ModuleBrowser API
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com