[issue21880] IDLE: Ability to run 3rd party code checkers

Terry J. Reedy report at bugs.python.org
Fri Oct 5 14:30:14 EDT 2018


Terry J. Reedy <tjreedy at udel.edu> added the comment:

This issue is specifically based on msg195711 of #18704.  Anyone working on this should read it.

Saimadhav's work was part of his Google Summer of Code (GSOC) project, which ended soon after V4 was submitted.  I recorded reviews of V1 and V2 above. I don't remember which tests and reviews, if any, I did with V3 and V4.

Some needed changes starting with v4:
 Checker.py should be checker.py.
 Implement it as a feature, not an extension.
 Access the in-memory config object for .idlrc/checker.cfg directly rather than through idleConf.  idleConf accesses the fixed defaults and mutable user overrides as if they are one config. I am a bit surprised that idleConf worked without an empty idlelib/config-checker.def.

The main blocker was and is keeping the GUI responsive while the 3rd party program is executing.  V1 & V2 used subprocess through a pipe.  V3 did not use subprocess.  V4 uses subprocess without a pipe.  It has this blocking polling loop:
                    while process.poll() is None:
                        continue

If a 3rd party program is expected to revise a file, the corresponding editor should be read-only for the duration.

I intended that any issue like this should start with a coherent specification separate from the code.  A doc patch is needed and that might be enough.

Since this issue was opened, it has been more firmly stated that the stdlib should not have any hard-coded dependencies on 3rd party code.  In April 2016, the proposal for a GSOC project to add a GUI front end for pip got no opposition and 2 overt approvals on pydev.  In August 2016, the result was rejected by the release manager and one of the additional approvers because it necessarily used the (public) pip (command-line) interface.

Not withstanding that, there could be a separate idle-checker repository containing a checker.cfg with entries for multiple checkers.  Such a file would be needed to do manual tests with multiple checkers.  This could include a typing annotation checker, like mypy, which is a new type of code checker added since this issue was created.

Tal, what do you think is the easiest way to turn a .diff on the tracker into a git master branch?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21880>
_______________________________________


More information about the Python-bugs-list mailing list