abnormal exit situations cleanly, especially stuck user threads. Future
plan is to intercept the user's atexit functions and run them under
IDLE's control.
The default font is not highlighted in the Options dialog when
IDLEfork is first installed.
2. Reduce default font to 10 pt and increase default window height to give
a better initial impression on Windows.
M config-main.def
M configDialog.py
SF 661318
Adds autosave capability to IDLE and IDLE configuration dialog.
User can Run/F5 without explicit save dialog.
The default is to require the user to confirm the save.
M ScriptBinding.py
M config-main.def
M configDialog.py
e.g. further improve subprocess interrupt, exceptions, and termination.
2. Remove the workarounds in PyShell.py and ScriptBinding.py involving
interrupting the subprocess prior to killing it, not necessary anymore.
3. Fix a bug introduced at PyShell Rev 1.66: was getting extra shell menu
every time the shell window was recreated.
M PyShell.py
M ScriptBinding.py
M rpc.py
M run.py
[ 735527 ] Re Bug [ 678325 ] ParenMatching Missing AutoIndent
AutoIndent was merged with EditorWindow, this patch corrects
the references in ParenMatch.
SF Patch 686254 "Run IDLEfork from any directory without set-up"
Allows IDLE to run when not installed and cwd is not the IDLE directory.
I took the liberty of moving it to the startup scripts since once IDLEfork
is again a part of Python it will be superfluous and I don't want it to
be forgotten. But it is very useful for those using IDLEfork standalone!
M CREDITS.txt
M NEWS.txt
M idle
M idle.py
M idle.pyw
sys.path, prepend it. This allows the module to import other modules
in the same directory. Do the same for a script run from the command
line.
2. Tweak the IDLE usage message a bit more.
SF Bug 706860 (closed)
SF Patch 686254 (reject specific solution)
SF Patch 507327 (similar)
M PyShell.py
M ScriptBinding.py
2. Remove the shell menu and associated bindings when running
without the subprocess.
3. Update the IDLE Help and usage text.
4. Update display_port_binding_error to suggest using -n
M PyShell.py
M help.txt
2. Add an indicator to the shell startup notice when running w/o
subprocess.
3. Improve exception reporting when running a command or script from the
command line.
4. Clarify the fact that breakpoints set or cleared after a file is
saved will revert to the saved state if the file is closed without
re-saving.
5. If user tries to exit or restart when user code is running, interrupt
the user code. This helps to eliminate occasional hanging
subprocesses on Windows (except for Freddy :).
M NEWS.txt
M PyShell.py
M ScriptBinding.py
This bug, henceforth designated Freddy, was due to the mistaken
elimination of the KeyboardInterrupt exception at the previous revision.
PyShell's unix_terminate hammer was masking the problem on Linux. On W2K
the subprocess MainThread was trying to print the exception after the
SockThread had ceased to service the socket. The subprocess would then
detach and spin when the GUI created the new subprocess.
Modified Files: run.py
2. run.py: move exception printing to toplevel to allow access from main()
3. Clarification in PyShell.py: when the subprocess is restarted, the
debugger GUI is reused with a fresh instance of the subprocess
debugger.
M PyShell.py
M RemoteDebugger.py
M run.py
threading modules. Can debug user code which imports these modules,
though.
2. Re-enable debugger in PyShell.
3. Remove old code implementing previous approaches to this issue.
M Debugger.py
M PyShell.py
M rpc.py
is now interruptable on Windows.
2. Tweak signal.signal() wait parameters as called by various methods
to improve I/O response, especially on Windows.
3. Debugger is disabled at this check-in pending further development.
M NEWS.txt
M PyShell.py
M rpc.py
M run.py
M run.py
1. Move subprocess socket handling to a subthread - "SockThread".
2. In the subprocess, implement a queue and global completion and exit
flags. Execute code after it is passed through the queue. (Currently,
user code is executed in SockThread. The next phase of development will
move the tail of the queue to MainThread.)
3. Implement an RPC message used to shut down the execution server.
4. Improve normal and exception subprocess exits.
(At this checkin a "pass loop" interrupt doesn't work on any platform. It
will be restored for all platforms once user code execution is moved to
MainThread.)
M run.py
1. Clarify that rpc.SocketIO._getresponse() currently blocks on socket.
2. Improve exception handling in subprocess when GUI terminates abruptly.
Eliminate extra blank line in shell output. Caused by stdout not being
flushed
upon completion of subprocess' Executive.runcode() when user code ends by
outputting an unterminated line, e.g. print "test",
M run.py
Move exception formatting out of rpc.py. This allows each end of the
link to format and print exceptions how and where it sees fit and makes it
easier for threads to display their own exceptions.
M PyShell.py
M ScriptBinding.py
M rpc.py
M run.py
Clean up the way IDLEfork handles termination of the subprocess, restore
ability to interrupt user code in Windows (so long as it's doing terminal
I/O).
1. Handle subprocess interrupts in Windows with an RPC message.
2. Run/F5 will restart the subprocess even if user code is running.
3. Restart the subprocess if the link is dropped.
4. Exit IDLE cleanly even during I/O.
4. In rpc.py, remove explicit calls to statelock, let the condition
variable handle acquire() and release().
M rpc.py
SF Bug 676398 Doesn't handle non-built-in exceptions
1. Move exception formatting to the subprocess; allows subclassing of
exceptions, including subclasses created in the shell without
introducing excessive complexity in the RPC mechanism.
2. Provide access to linecache from subprocess to support this.
M RemoteDebugger.py
M rpc.py
Fix the incorrect shell exception tracebacks generated when running
under debugger control:
1. Use rpc.SocketIO.asynccall() instead of remotecall() to handle the
IdbProxy.run() command.
2. Add a 'shell' attribute to RemoteDebugger.IdbProxy to allow setting
of ModifiedInterpreter's active_seq attribute from RemoteDebugger code.
3. Cleanup PyShell.ModifiedInterpreter.runcode() and remove ambiguity
regarding use of begin/endexecuting().
4. In runcode() and cleanup_traceback() use 'console' instead of 'file' to
denote the entity to which the exception traceback is printed.
5. Enhance cleanup_traceback() so if the traceback is pruned entirely away
(the error is in IDLE internals) it will be displayed in its entirety
instead.
6. ModifiedInterpreter.runcode() now prints ERROR RPC returns to both
console and __stderr__.
7. Make a small tweak to the rpc.py debug messages.
M PyShell.py
M config-keys.def
M configHandler.py
1. Clear any un-entered characters from input line before printing the
restart boundary.
2. Restore the Debug menu: There are now both Shell and Debug menus.
3. Add Control-F6 keybinding to Restart Shell.
4. Clarify PyShell.cancel_check() comment.
5. Update doc string for Bindings.py and re-format the file slightly.
(Loewis) which uses 'SRCDIR' (if available) in package dir path.
2. Merge Python IDLE setup.py Rev 1.5 (Loewis) to allow installation
from the build directory. IDLEfork SF Patch 668998 (Loewis)
The Py2.3 updates to the pyclbr module return both Class and Function
objects. The IDLE ClassBrowser module only knew about Class and could
not handle objects which did not define "super".
Fixed by adding a guard.
M EditorWindow.py
M NEWS.txt
M config-main.def
M configDialog.py
M configHandler.py
M configHelpSourceEdit.py
M configSectionNameDialog.py
- Change default: IDLE now starts with Python Shell.
- Removed the File Path from the Additional Help Sources scrolled list.
- Add capability to access Additional Help Sources on the web if the
Help File Path begins with //http or www. (Otherwise local path is
validated, as before.)
- Additional Help Sources were not being posted on the Help menu in the
order entered. Implement sorting the list by [HelpFiles] 'option'
number.
- Add Browse button to New Help Source dialog. Arrange to start in
Python/Doc if platform is Windows, otherwise start in current directory.
- Put the Additional Help Sources directly on the Help menu instead of in
an Extra Help cascade menu. Rearrange the Help menu so the Additional
Help Sources come last. Update help.txt appropriately.
- Fix Tk root pop-ups in configSectionNameDialog.py and configDialog.py
M configHelpSourceEdit.py
1. Attach configHelpSourceEdit error dialogs to parent to avoid Tk root
pop-ups.
2. Make configHelpSourceEdit OK button the default and bind <Return>.
3. Reformat configHelpSourceEdit.
4. ConfigDialog.SaveAllChangedConfig() had a bug which caused additional
help sources to be deleted when other config items were changed.
4. Uniform capitalization in configDialog.
5. Update configDialog doc string.
M Bindings.py
M EditorWindow.py
M PyShell.py
M config-keys.def
M configHandler.py
M help.txt
1. Annotate the shell window with last restart boundary upon restart.
2. Provide a shell menu entry and hot key (F6) to jump to the last
restart boundary.
3. Add a new shell menu feature to restart the shell.
4. Update the help menu to add these features.
5. Update the help menu to put text in same order as the menus.
6. Correct a capitalization inconsistency on the Edit menu: Expand Word
7. Rename the "Debug" menu to be "Shell": it's doing more now.
8. Rearrange the "Shell" menu to make the StackViewer entries adjacent.
9. Add a get_geometry method to EditorWindow, which may be of use in
making window positions persisent.
10. Make <ctrl-v> the "Classic Windows" paste key.
11. Restore decorum on the Help menu by removing "Advice". As Guido said,
things will never be the same. Thanks, David!
M PyShell.py
1. PyShell Rev 1.39, EditorWindow Rev 1.37 fix was not handling a
multiline prompt.
2. The same fix introduced a bug where hitting <enter> at a previous
prompt-only line would copy the prompt to the iomark.
3. Move the setting of sys.ps1 earlier, into PyShell.main(), to allow
this code to work before a shell is started up.
4. If cursor is on the input line in the prompt, and you hit <enter>,
process the line instead of complaining.
5. If line has no stdin range (this includes the last line before shell
restart) strip any prompt before recalling.
M idle
M idle.py
M idle.pyw
M setup.py
Switch back to installing IDLE as a package. The IDLE GUI and the
subprocess will both attempt to start up via the package mechanism, but if
IDLE is not yet installed it is possible to run by calling python idle.py
in the IDLE source directory, or to add the source directory to sys.path.
One advantage of doing it this way is IDLE stays off sys.path.
Developed in collaboration with Tony Lownds.
M PyShell.py
M idlever.py
M setup.py
1. Update MANIFEST.in to include all non-pure Python files
2. PyShell and idlever reflect Rev 0.9a0
3. setup.py modified to install IDLE as a collection of modules with
a .pth file living at the idlelib level in site-packages. This was
done to make it easier to run from the source directory prior to
installing IDLE. This approach may change back to the package
technique depending on what happens with the Mac installation
development.
directory becomes sys.path[0]. What is wanted is the directory from which
IDLE was called.
Insert the current working directory in the path if it isn't there
already.
M idle
M setup.py
To be able to run from the source directory or from an installed version
of IDLE, and also to allow the subprocess to find run(), Python needs to
have the idlelib package on its path.
1. Modify setup.py to supply a .pth file living at same level as idlelib
2. Move boolcheck to PyShell.py
3. Remove boolcheck and path setting code from the "idle" script
1. Make it easier to change the package and script installation names.
2. Update the text files transferred to include the .def and new .txt
files.
3. Update the description and long description, change email to
python-dev, update the url to point at sourceforge.
4. Rename the build and install classes for clarity.
Another applet mechanism has been developed for Python on Mac OS X and
trying to use the -c "__import__('run').main()" trick is just not working.
macosx_main.py is a new file which should be used as the startup file for
Mac OS X applet bundles. This startup file understands a -p option, which
when seen will start run.main(). When running as an applet, this seems like
the best approach.
M PyShell.py
M ScriptBinding.py
1. Update ScriptBinding.py to highlight a syntax error in the Edit window,
and place the cursor on the error. Add a syntax check to the
Run Script event instead of waiting until the script tries to run and
raises a syntax error in the shell, forcing the user to navigate back
to the Edit window to fix it.
2. Modify tag_config's appropriately in PyShell.py and ColorDelegator.py
3. Some minor clean-up in ScriptBinding.py
M PyShell.py
Idlefork SF Bug 440383 - IDLE goes into beep loop
Fix loop in EditorWindow.newline_and_indent_event() and
in addition fix submission of >>> prompt to PyParse.Parser
Eliminate extra attribute EditorWindow.auto_indent
M IOBinding.py
M PyShell.py
* Could not remove last set of saved breakpoints from a file
* Starting with empty edit window, could not load a file
* Multiple adjacent breakpoints were saved as one breakpoint
* Storing breakpoints whenever a file is closed can get them out
of synch with the saved version of a file. Only store them when the
file is saved.
* Add comment on current limitations on file editing in the presence of
breakpoints.
* Replace get_current_breaks() with update_breakpoints(), add an update to
PyShellEditorWindow.breakpoints, which is the master breakpoint data
structure, and which is used to reload the subprocess debugger.
* Revert Debugger.Debugger.load_breakpoints() to use editwin.breakpoints.
It is easier to debug the debugger if the breakpoint list in IDLE is
identical to the list in the subprocess debugger and is transferred when
the subprocess debugger is restarted, because this list can be easily
queried.
* Cleanup some linespacing and comments in IOBinding.py
M CallTips.py
Calltip fetch was erroring when an Edit window was used without a Shell.
Also, fix CallTipWindow.py so test code will run and add a comment about a
bug which causes the calltip window to override all others.
1. Format and print exceptions raised in user code.
M rpc.py
1. Additional debug messages in rpc.py
2. Move debug message enable switch from SocketIO to Client and Server
to allow separate activation.
3. Add indication of origin (client or server) to debug message
4. Add sequence number to appropriate debug messages
5. Pass string exception arg as a string rather than a tuple.
[ 634250 ] SearchDialogBase.py fix for Tk 8.4.1
SearchDialogBase refers to the grid 'col' option
considered ambiguous with Python 2.2.2 and Tk 8.4.1.
The correct name is 'column'.
M Debugger.py
M EditorWindow.py
M PyShell.py
0. Polish PyShell.linecache_checkcache()
1. Move break clearing code to PyShell.PyShellEditorWindow from
EditorWindow.
2. Add PyShellEditorWindow.breakpoints attribute to __init__, a list of
line numbers which are breakpoints for that edit window.
3. Remove the code in Debugger which removes all module breakpoints when
debugger is closed. Want to be able to reload into debugger when
restarted.
4. Moved the code which sets EditorWindow.text breakpoints from Debugger
to PyShell.PyShellEditorWindow and refactored.
5. Implement reloading subprocess debugger with breakpoints from all open
PyShellEditorWindows when debugger is opened or subprocess restarted.
6. Eliminate the break_set attribute, use the breakpoint list instead.
refactor a bit and clean up.
M PyShell.py Cosmetic changes, delete blank lines, add # on some
blank lines.
M rpc.py Add more debugging capability
M run.py Add support for getting calltip from subprocess
Move import statements
[ 617097 ] EditorWindow.py: underline recent files
Added a couple of mods to reduce the indentation level.
Note that the recent files menu doesn't update until
Idle is restarted, pre-existing bug, at least on Linux.
"Merge Py Idle changes:
Rev 1.7 [Python-idle] loewis
Convert characters from the locale's encoding on output.
Reject characters outside the locale's encoding on input."
Not compatible with Python 2.2.1. Forwardport as a SF patch.
(cut vs. Cut etc.)
Fix Bug 613006 Ctrl-x Unix Binding Clears Selection
(do-nothing does something :)
Leave some debugging prints behind, commented out
M EditorWindow.py
M config-keys.def
M configHandler.py
Rev 1.6 GvR
Finally fix SF bug #441172, using a variant of patch ##443626:
canceling an edit operation would not revert the value of the field.
The fix takes care to destroy the Entry object, as suggested in the
patch.
Rev 1.7 Geiger Ho / GvR
(previously applied - Idlefork Rev 1.3)
Rev 1.8 doerwalter
(string methods)
Rev 1.11 GvR
Fix for SF bug #448835.
Fix this to work with the new (still undocumented) tabnanny API.
I'm afraid Stephen will have to add this fix to the IDLE fork code
base as well.
Rev 1.12 rhettinger
(skip, done differently in Idlefork)
Rev 1.13 time_one
(skip, NA)
Rev 1.35 fdrake
Use string.ascii_letters instead of string.letters (SF bug #226706).
Move computation of sets of characters out of the body of the function
that uses them.
Rev 1.36 tim_one
Convert a pile of obvious "yes/no" functions to return bool
Rev 1.37
(skip, done differently in Idlefork)
Rev 1.38 loewis
Patch #590913: PEP 263 support.
Rev 1.39 loewis
Convert characters from the locale's encoding on output.
Reject characters outside the locale's encoding on input.
Rev 1.40 doerwalter
(string methods)
Rev 1.41
(skipped, done by GvR in rpc)
Rev 1.5 tim_one
Convert a pile of obvious "yes/no" functions to return bool.
Rev 1.6 gvanrossum
(partially merged previously, move line outside try: block)
Provisional fix for writefile() [SF bug # 541730].
The problem was that an exception can occur in the text.get() call or
in the write() call, when the text buffer contains non-ASCII
characters. This causes the previous contents of the file to be lost.
The provisional fix is to call str(self.text.get(...)) *before*
opening the file, so that if the exception occurs, we never open the
file.
Two orthogonal better solutions have to wait for policy decisions:
1. We could try to encode the data as Latin-1 or as UTF-8; but that
would require IDLE to grow a notion of file encoding which requires
more thought.
2. We could make backups before overwriting a file. This requires
more thought because it needs to be fast and cross-platform and
configurable.
Rev 1.7 gvanrossum
(previously merged with modifications by Stephen M. Gava)
Add primitive printing support for Unix and Windows.
Rev 1.8 loewis
Patch #590913: PEP 263 support.
Rev 1.9 gvanrossum
(tempfile.py interface -- deferred)
Rev 1.10 tim_one
whitespace normalization
Rev 1.11 nnorwitz
(deferred pending 1.9 integration)
Rev 1.39 GvR
Properly fix SF bug #507298 (Gregor Lingl): shellpython2.2 -Qnew smart
indent error
Use // where int division is intended. (This breaks IDLE for use with
previous Python versions -- I don't care.)
Rev 1.40 tim_one
Convert a pile of obvious "yes/no" functions to return bool.
Rev 1.41 foffani/loewis
(already merged) - MS html help
Rev 1.42
(skip, done differently in Idlefork)
Rev 1.43 tzot/rhettinger
Extended IDLE's open module menu item to handle hierarchical module names.
Will look at doing something similar in import.c so that the effort won't
have to be repeated elsewhere.
Closes SF patch 600152.
Rev 1.44 doerwalter
(string methods)
Rev 1.16
(skip. The Edward K. Ream breakpoint fix has been added to bdb.py
and idlefork Debugger.py no longer overrides Bdb.set_break() )
Rev 1.17
Remove unnecessary imports
Rev 1.9
Improve handling of docstrings. I had feared this was a case of
introspection incompatibility, but in fact it's just that calltips
always gave up on a docstring that started with a newline (but
didn't realize they were giving up <wink>).
Rev 1.10
(already merged)
Rev 1.11
(whitespace normalization, skip this time)
Rev 1.12
Remove unnecessary imports
Rev 1.4
SF bug 546078: IDLE calltips cause application error.
Assorted crashes on Windows and Linux when trying to display a very
long calltip, most likely a Tk bug. Wormed around by clamping the
calltip display to a maximum of 79 characters (why 79? why not ...).
Bugfix candidate, for all Python releases.
Rev 1.5
Remove unnecessary imports
EditorWindow has incorporated AutoIndent
Rev 1.17
classifyws(): Fix a "/" to work under -Qnew (as well as without it).
Bugfix candidate!
Rev 1.18
(Already merged)
Rev 1.19
smart_backspace_event(): remove now-pointless int() call.
Bugfix candidate: the current state of AutoIdent.py should be in 2.2.1.
Rev 1.20
Apply diff2.txt from SF patch http://www.python.org/sf/572113
(with one small bugfix in bgen/bgen/scantools.py)
This replaces string module functions with string methods
for the stuff in the Tools directory. Several uses of
string.letters etc. are still remaining.
PyShell.py
don't track Py Idle patch 543222 - disable script bindings in shell
since it was done differently in MAIN
Remove "binding comments" 05 Aug 1.13.2.2 to 1.13.2.3
EditorWindow.py
don't track Py Idle patch 543222 - disable script bindings in shell
since it was done differently in MAIN
Remove "binding comments" 05 Aug 1.23.2.3 to 1.23.2.4
Remove last dependencies to old config backend 06Aug to 1.23.2.5
M RemoteDebugger.py
M ScriptBinding.py
Restart the execution server with a clean environment and execute the
active module from scratch upon activation of Run/F5.
Add functionality to PyShell.py to restart the execution server in a new
subprocess. The server makes a connection to the Idle client which sends a
block of code to be executed.
Modify ScriptBinding.py to restart the subprocess upon Run/F5, assuming that
an execution is not currently in progress. Remove Import Module functionality,
not required now that the code is executed in a clean environment.
If the Debugger is active, also restart the subprocess side of the split
debugger. Add functionality to RemoteDebugger.py to support this.
At this time breakpoints will be lost in the subprocess if Run/F5 is activated.
A subsequent checkin of PyShell.py will implement reloading of the breakpoints
into the subprocess debugger. I'm keeping this separate as the design may
change.
instead.
2. Preserve the Idle client's listening socket for reuse with the
fresh subprocess.
3. Remove some unused rpc code, comment out additional unused code.
Modified Files:
ScriptBinding.py rpc.py run.py
to executing Run/F5 from an EditorWindow.
M ScriptBinding.py : add call to clear_the_environment()
M run.py : implemented Executive.clear_the_environment()