[New-bugs-announce] [issue31460] IDLE: Revise ModuleBrowser API

Terry J. Reedy report at bugs.python.org
Wed Sep 13 17:33:39 EDT 2017


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 <report at bugs.python.org>
<https://bugs.python.org/issue31460>
_______________________________________


More information about the New-bugs-announce mailing list