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 <rep...@bugs.python.org>
<https://bugs.python.org/issue31460>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to