Commit Graph

2200 Commits

Author SHA1 Message Date
Terry Jan Reedy b8462477bf
bpo-38636: Fix IDLE tab toggle and file indent width (GH-17008)
These Format menu functions (default shortcuts Alt-T and Alt-U)
were mistakenly disabled in 3.7.5 and 3.8.0.
2019-11-20 01:18:39 -05:00
Zackery Spytz 9c2844927d bpo-4630: Add cursor no-blink option for IDLE (GH-16960)
This immediately toggles shell, editor, and output windows, but does not affect other input widgets.
2019-11-13 02:13:33 -05:00
Zackery Spytz c8b53dc3d8 bpo-26353: IDLE adds an unneeded newline when saving a shell window (GH-17103) 2019-11-12 05:54:10 -05:00
Terry Jan Reedy a8fb9327fb
bpo-37309: First idlelib/NEWS.txt for 3.9.0 (GH-16947) 2019-10-27 01:23:30 -04:00
Terry Jan Reedy e31a79a5b4
bpo-34162: Last idlelib/NEWS.txt items for 3.8.0. (GH-16943) 2019-10-26 22:19:57 -04:00
Terry Jan Reedy e3f90b217a
bpo-38598: Do not try to compile IDLE shell or output windows (GH-16939) 2019-10-26 21:15:10 -04:00
Serhiy Storchaka b690a2759e
bpo-36698: IDLE no longer fails when write non-encodable characters to stderr. (GH-16583)
It now escapes them with a backslash, as the regular Python interpreter.
Added the "errors" field to the standard streams.
2019-10-08 14:32:25 +03:00
Serhiy Storchaka 06cb94bc84
bpo-13153: Use OS native encoding for converting between Python and Tcl. (GH-16545)
On Windows use UTF-16 (or UTF-32 for 32-bit Tcl_UniChar) with the
"surrogatepass" error handler for converting to/from Tcl Unicode objects.

On Linux use UTF-8 with the "surrogateescape" error handler for converting
to/from Tcl String objects.

Converting strings from Tcl to Python and back now never fails
(except MemoryError).
2019-10-04 13:09:52 +03:00
Terry Jan Reedy dfd34a9cd5
bpo-35379: When exiting IDLE, catch any AttributeError. (GH-16212)
One happens when EditorWindow.close is called twice.
Printing a traceback, when IDLE is run from a terminal,
is useless and annoying.
2019-09-17 02:05:04 -04:00
Terry Jan Reedy 0048afc16a
bpo-38183: Test_idle ignores user config directory GH-16198)
It no longer tries to create or access .idlerc or any files within.
Users must run IDLE to discover problems with saving settings.
2019-09-16 19:04:21 -04:00
Terry Jan Reedy c59295a1ca
bpo-38077: IDLE no longer adds 'argv' to the user namespace (GH-15818)
This only happened when initializing the subprocess to run a module.
This recent bug only affected 3.7.4 and 3.8.0b2 to 3.8.0b4.
2019-09-09 23:10:44 -04:00
Terry Jan Reedy 38da805d56
bpo-38041: Refine IDLE Shell restart lines. (GH-15709)
Restart lines now always start with '=' and never end with ' ' and fill the width of the window unless that would require ending with ' ', which could be wrapped by itself and possible confusing the user.
2019-09-06 13:54:45 -04:00
GeeTransit 2cd9025858 bpo-37902: IDLE: Add scrolling for IDLE browsers. (#15368)
Modify the wheel event handler so it can also be used for module, path, and stack browsers.
Patch by George Zhang.
2019-09-04 21:33:33 -04:00
Terry Jan Reedy 6cd9666ce9
Fix idlelib.help comments (GH-15669) 2019-09-04 20:20:08 -04:00
Tal Einat 580bdb0ece bpo-38022: IDLE: upgrade help.html to sphinx 2.x HTML5 output (GH-15664)
The HTML5 output from Sphinx 2.x adds  '<p>' tags within list elements.  Using a new prevtag attribute, ignore these instead of emitting unwanted '\n\n'.

Also stop looking for 'first' classes on tags (no longer present) and fix the bug of double-spacing instead of single spacing after <pre> blocks.
2019-09-03 16:52:58 -04:00
Tal Einat 132acaba5a bpo-35771: IDLE: Fix flaky tool-tip hover delay tests (GH-15634)
Extending the hover delay in test_tooltip should avoid spurious test_idle failures.
One longer delay instead of two shorter delays results in a net speedup.
2019-09-03 01:17:00 -04:00
Terry Jan Reedy 15119bc2a7
IDLE: Fix 2 typos found by Min ho Kim. (GH-15617) 2019-08-30 16:16:37 -04:00
Terry Jan Reedy 1039f39c9c
bpo-37824: Properly handle user input warnings in IDLE shell. (GH-15500)
Cease turning SyntaxWarnings into SyntaxErrors.
2019-08-26 02:27:56 -04:00
Tal Einat d4b4c00b57
bpo-37929: IDLE: avoid Squeezer-related config dialog crashes (GH-15452)
These were caused by keeping around a reference to the Squeezer
instance and calling it's load_font() upon config changes, which
sometimes happened even if the shell window no longer existed.

This change completely removes that mechanism, instead having the
editor window properly update its width attribute, which can then
be used by Squeezer.
2019-08-25 08:52:58 +03:00
Greg Price 9ece4a5057 Unmark files as executable that can't actually be executed. (GH-15353)
There are plenty of legitimate scripts in the tree that begin with a
`#!`, but also a few that seem to be marked executable by mistake.

Found them with this command -- it gets executable files known to Git,
filters to the ones that don't start with a `#!`, and then unmarks
them as executable:

    $ git ls-files --stage \
      | perl -lane 'print $F[3] if (!/^100644/)' \
      | while read f; do
          head -c2 "$f" | grep -qxF '#!' \
          || chmod a-x "$f"; \
        done

Looking at the list by hand confirms that we didn't sweep up any
files that should have the executable bit after all.  In particular

 * The `.psd` files are images from Photoshop.

 * The `.bat` files sure look like things that can be run.
   But we have lots of other `.bat` files, and they don't have
   this bit set, so it must not be needed for them.



Automerge-Triggered-By: @benjaminp
2019-08-20 21:53:59 -07:00
Tal Einat 71662dc2f1 bpo-37849: IDLE: fix completion window positioning above line (GH-15267) 2019-08-14 13:06:06 -04:00
Terry Jan Reedy 1213123005
bpo-36419: IDLE - Refactor autocompete and improve testing. (#15121) 2019-08-04 19:48:52 -04:00
Terry Jan Reedy 14070299cd
bpo-37748: Re-order the Run menu. (GH-15115)
Put the most common choice, Run Module, at the top.
2019-08-04 16:45:15 -04:00
Tal Einat 86f1a18abf bpo-37706: IDLE - fix sidebar code bug and drag tests (GH-15103)
Convert mouse y to line number in the sidebar rather than the text.
2019-08-04 12:25:27 -04:00
Terry Jan Reedy fff5cb21ae
bpo-34162: Add missing items to idlelib/NEWS.txt. (GH-15034) 2019-07-31 00:58:45 -04:00
Terry Jan Reedy 0acb646b8e
Fix idlelib typos discovered by min ho, pr 15018. (GH-15029) 2019-07-30 18:14:58 -04:00
Terry Jan Reedy f35c51d2ea
bpo-34162: Update idlelib/news.txt. (#15011) 2019-07-29 18:12:14 -04:00
Terry Jan Reedy e8874b85b4
bpo-37706: Disable 3 IDLE scrollbar tests on Mac. (#15010)
They pass with tk 8.5.9 (Azure) but fail with the 8.6.x we install.
2019-07-29 17:57:36 -04:00
Terry Jan Reedy b222955355
bpo-37692: Improve highlight config sample (#14983)
Use an example shell interaction in the sample and better labels for shell elements.
2019-07-28 12:04:31 -04:00
Tal Einat 3221a63c69 bpo-37628: Fix IDLE config sample sizes (#14958)
The boxes for the font and highlight samples are now constrained by the overall config dialog size.  They gain scrollbars when the when a large font size makes the samples too large for the box.
2019-07-27 12:57:48 -04:00
Tal Einat 46ebd4a6a2 bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959) 2019-07-26 23:24:36 -04:00
Terry Jan Reedy c6fd6c83b7
bpo-29446: IDLE -- add explicit imports (GH-14919)
Stop depending on tkinter import *.
2019-07-23 16:14:59 -04:00
Tal Einat 7123ea009b
bpo-17535: IDLE editor line numbers (GH-14030) 2019-07-23 15:22:11 +03:00
Tal Einat 1ebee37dde
bpo-33610: validate non-negative integer inputs in IDLE's config (GH-14822) 2019-07-23 13:02:11 +03:00
Terry Jan Reedy 8e3a7380ec
Fix typo found by Min ho Kim (#14879) 2019-07-21 15:24:45 -04:00
Ngalim Siregar 35b87e6001 bpo-37627: Initialize IDLE Custom Run dialog with previous entries (#14870)
Repeat the command line arguments most recently entered before so the user can edit them.
2019-07-21 11:37:28 -04:00
Tal Einat e0a1f8fb5c bpo-33610: IDLE's code-context always shows current context immediately (GH-14821)
Eliminate delay of up to 100ms and accompanying visual artifact.
Fix bug of never showing context when hide and show.
2019-07-18 16:03:18 -04:00
Terry Jan Reedy 1b38922434
bpo-36390: Gather IDLE Format menu functions into format.py (#14827)
Add two indent spec methods from editor and Rstrip to existing file.
Tests are not added for indent methods because they need change
in lights of 3.x's prohibition on mixing tabs and spaces.
2019-07-17 20:48:36 -04:00
Cheryl Sabella 82494aa6d9 bpo-36390: IDLE: Combine region formatting methods. (GH-12481)
Rename paragraph.py to format.py and add region formatting methods
from editor.py.  Add tests for the latter.
2019-07-17 09:44:44 -04:00
Tal Einat 7036e1de3a
bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675)
* Only create CodeContext instances for "real" editors windows, but
  not e.g. shell or output windows.
* Remove configuration update Tk event fired every second, by having
  the editor window ask its code context widget to update when
  necessary, i.e. upon font or highlighting updates.
* When code context isn't being shown, avoid having a Tk event fired
  every 100ms to check whether the code context needs to be updated.
* Use the editor window's getlineno() method where applicable.
* Update font of the code context widget before the main text widget
2019-07-17 11:15:53 +03:00
Cheryl Sabella f8d4cc7dbb bpo-27452: IDLE: Cleanup config.py code (GH-14577) 2019-07-16 16:58:25 -04:00
Tal Einat 9b5ce62cac
bpo-36390: simplify classifyws(), rename it and add unit tests (GH-14500) 2019-07-11 17:20:14 +03:00
Terry Jan Reedy 6aeb2fe606
bpo-26806: IDLE should run without docstrings (#14657)
After fcf1d00, IDLE startup failed with python compiled without docstrings.
2019-07-09 14:37:25 -04:00
Tal Einat fcf1d003bf
bpo-26806: add 30 to the recursion limit in IDLE's shell (GH-13944)
This is done to compensate for the extra stack frames added by
IDLE itself, which cause problems when setting the recursion limit
to low values.

This wraps sys.setrecursionlimit() and sys.getrecursionlimit()
as invisibly as possible.
2019-07-06 15:35:24 +03:00
İsmail Arılık 8713aa6dfb Fix typo, 'widger' -> 'widget', in idlelib/tree.py (GH-14263) 2019-06-20 10:30:55 -04:00
Terry Jan Reedy 54cf2e0780
bpo-37325: Fix focus traversal for 2 IDLE dialogs (#14209)
Tab now moves focus across and down for Help Source and Custom Run.
2019-06-18 17:08:24 -04:00
Cheryl Sabella 201bc2d18b bpo-5680: IDLE: Customize running a module (GH-13763)
The initialize options are 1) add command line options, which are appended to sys.argv as if passed on a real command line, and 2) skip the shell restart. The customization dialog is accessed by a new entry on the Run menu.
2019-06-17 22:24:10 -04:00
Terry Jan Reedy 8fac122109
bpo-37321: Edit IDLE subprocess connection error messages. (#14170)
Mainly, add a doc reference to message in pyshell.
2019-06-17 17:23:28 -04:00
Tal Einat 5bff3c86ab bpo-37039: Make IDLE's Zoom Height adjust to users' screens (GH-13678)
Measure required height by quickly maximizing once per screen.
A search for a better method failed.
2019-06-17 15:41:00 -04:00
Terry Jan Reedy 66d47da86a
bpo-37220: Fix 2.7 test -R crash on Windows. (GH-13957)
The patch needed for 2.7 should make the test more stable on 3.x also.
2019-06-16 16:33:56 -04:00