[Idle-dev] cleanups

Kurt B. Kaiser kbk@shore.net
02 Dec 2002 00:33:18 -0500


Neal Norwitz <neal@metaslash.com> writes:

> I've tried to make sure everything checked into python was also in
> idlefork.  I've also run pychecker which resulted in some additional
> checkins.  

Thanks for the review and the updates!

> There are still problems, though.  The most serious ones are listed
> below.
> 
> There's lots of style issues that should be cleaned up.
> Is there a preference who is to do this and when?

Some examples would be helpful in answering this question.  Since time is
pressing and correcting issues of style can introduce bugs I'd rather
defer this if possible. 

> I've noticed comments and commented out code which should probably
> be removed.

Clearly one doesn't want to remove comments which are part of the code
documentation.  Other comments by GvR and me pertain to design issues
which need addressing and IMO should not be removed until that is
done.  As the issues are resolved, the comments are removed.  

There is some dead code which is commented out and could be removed.
I can take a look at that.  If I do something which I think might be
controversial, I comment out the code and leave it there for a couple
of weeks pending objections.  If none are forthcoming, I delete it. 

Finally, there are some debugging prints in the RPC and debugger code
which I would like to leave in for now.

> Generally, what is the status of idlefork?  Is it fairly stable?
> Are there known major problems in particular areas?

It is stable but still under development.  The startup code could use
work before Alpha, and once that is done the help message will need
updating.  

My focus continues to be the debugger and rpc.  Although most of the
necessary functionality is implemented, here are some performance
issues.

I will take another look at the startup code if no one else has the
time to do so.

> Here are some problems:
> 
>   * ClassBrowser.py, PathBrowser.py, StackViewer.py cannot work
>     - ClassBrowser.main() & PathBrowser.main() both reference 
>       PyShell.flist which does not exist

PyShell.flist is a global which is set up when IDLE starts.
ClassBrowser and PathBrowser .main() can be called from IDLE, but not
from the Python command line.  Both of these could probably be
modified to start the same way as StackViewer.main(), which will run
in IDLE or from the commmand line.  When used in IDLE, all three
appear to work correctly.  

This is not a priority for me, feel free to jump in there.

These issues, and others you raise, predate IDLEfork and are also
seen in Python IDLE, pretty much since the beginning.

>     - StackViewer.get_stack(), self does not exist, see bug 610756

Fixed this evening.

>   * Debugger.py, the local variable text does not exist in several
>     places.  I believe the patch below fixes this, but I'm not sure.

self.pyshell.text.bell(), actually.  But once I fixed it I decided to
remove it entirely, just an unnecessary annoyance.  The breakpoint
highlighting is all that is needed.

KBK