Commit Graph

370 Commits

Author SHA1 Message Date
Miss Islington (bot) b61a51a450
bpo-35675: IDLE - separate config_key window and frame (GH-11427)
bpo-35598: IDLE: Refactor window and frame class

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 1cc308d03c)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2022-09-30 10:27:14 -07:00
Miss Islington (bot) a978e2fa19
gh-87179: Fix more IDLE class headers (GH-96899)
Remove unneeded '(object)' and '()'.
(cherry picked from commit aa671b48d6)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-09-17 15:14:54 -07:00
Gregory P. Smith 8f0fa4bd10
[3.10] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96501)
Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds.

This PR comes fresh from a pile of work done in our private PSRT security response team repo.

This backports https://github.com/python/cpython/pull/96499 aka 511ca94520

Signed-off-by: Christian Heimes [Red Hat] <christian@python.org>
Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org>
Reviews via the private PSRT repo via many others (see the NEWS entry in the PR).

<!-- gh-issue-number: gh-95778 -->
* Issue: gh-95778
<!-- /gh-issue-number -->

I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#).
2022-09-02 09:51:49 -07:00
Miss Islington (bot) 654d62adc6
gh-95191: IDLE: Include prompts when saving Shell GH-95554 (#95558)
(cherry picked from commit b85411fc5e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-08-02 13:17:50 +02:00
Miss Islington (bot) 4eab100e0d
gh-95511: IDLE - fix Shell context menu copy-with-prompts bug (GH-95512)
If one selects whole lines, as the sidebar makes easy, do not
add an extra line.  Only move the end of a selection to the
beginning of the next line when not already at the beginning
of a line.  (Also improve the surrounding code.)
(cherry picked from commit fc31a13dc1)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-07-31 22:25:56 -07:00
Miss Islington (bot) fa7904cb52
gh-95411: IDLE - Enable using the module browser with .pyw files (GH-95397)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 7e19e417b5)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-29 22:05:48 -07:00
Miss Islington (bot) 34be807139
gh-84623: Remove unused imports in idlelib (GH-94143) (#94148)
Remove commented code in test_debugger_r.py.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 576dd90117)

Co-authored-by: Victor Stinner <vstinner@python.org>

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-06-23 13:21:08 +02:00
Miss Islington (bot) 372afb7a9b
Fix typo in Lib/idlelib/idle_test/test_parenmatch.py (GH-93332) (#93340)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 4f195f9db1)

Co-authored-by: luzpaz <luzpaz@users.noreply.github.com>
2022-05-29 23:03:11 -04:00
Terry Jan Reedy 9fabcfbe68
bpo-45447: Add syntax highlighting for `.pyi` files in IDLE (GH-28950)
Also add .pyi to the python extensions in the "File-open" and "File-save" dialogues.
Add util.py to contain objects that are used in multiple idlelib modules
and have no dependencies on any of them.

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 50cf4991c4)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-02-12 19:52:37 -05:00
Miss Islington (bot) 9ce0b00fb1
bpo-46588: fix typo in test_calltip.py (GH-31119)
(cherry picked from commit 222865daab)

Co-authored-by: Caio Agiani <agianicaio@gmail.com>
2022-02-03 21:11:15 -08:00
Miss Islington (bot) 2ddc278875
bpo-45975: Use walrus operator for some idlelib while loops (GH-31083)
(cherry picked from commit 51a95be1d0)

Co-authored-by: Nick Drozd <nicholasdrozd@gmail.com>
2022-02-02 18:28:52 -08:00
Miss Islington (bot) 7dee93c2d2
bpo-46591: Make About IDLE doc link label clickable (GH-30251)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 53c7808057)

Co-authored-by: Wes <5124946+wesinator@users.noreply.github.com>
2022-02-01 17:47:51 -08:00
Miss Islington (bot) a294703073
[3.10] bpo-45495: Add 'case' and 'match' to IDLE completions list. (GH-29000) (GH-29001)
Since the keyword list is frozen, only compute it once per
session.  The colorizer already handles context keywords.
(cherry picked from commit 42ac06dcd2)


Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>

Automerge-Triggered-By: GH:terryjreedy
2021-10-16 16:14:11 -07:00
Christian Clauss cfca4a6774
[3.10] Fix typos in the Lib directory (GH-28775) (GH-28804)
Fix typos in the Lib directory as identified by codespell.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>.
(cherry picked from commit 745c9d9dfc)

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-10-07 11:49:47 -04:00
Łukasz Langa 8c1e1da565
[3.10] [codemod] Fix non-matching bracket pairs (GH-28473) (GH-28511)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 8f943ca257)

Co-authored-by: Mohamad Mansour <66031317+mohamadmansourX@users.noreply.github.com>
2021-09-22 01:33:59 +02:00
Miss Islington (bot) 8a9396cf1d
bpo-45020: Don't test IDLE with frozen module. (GH-28344)
Otherwise, test would need special import.
(cherry picked from commit 369bf949cc)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-09-15 00:33:32 -07:00
Miss Islington (bot) 0f274cb2d7
bpo-45059: Add module cleanup to IDLE test_macosx (GH-28102)
(cherry picked from commit 22fe0eb13c)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-08-31 12:21:28 -07:00
Miss Islington (bot) 337c8adf31
bpo-45059: Fix IDLE test typo: using "==" instead of "=" (GH-28086)
(cherry picked from commit 54f100514b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-08-31 10:50:42 -07:00
Miss Islington (bot) 540ebc4a88
bpo-33962: Use ttk spinbox for IDLE indent space config (GH-22954)
If ttk.Spinbox is not available (Tk < 8.5.9) use readonly ttk.Combobox.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 42d5a4fc3b)

Co-authored-by: Mark Roseman <mark@markroseman.com>
2021-06-10 16:16:38 -04:00
Miss Islington (bot) 664ae29e6f
bpo-40468: Split IDLE settings General tab (GH-26621)
Replace it with Windows tab for Shell and Editor options
and Shell/Ed for options exclusive to one of them.

Create room for more options and make dialog shorter,
to better fit small windows.
(cherry picked from commit 275d5f7957)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-06-09 13:37:56 -07:00
Miss Islington (bot) 33a7a24288
bpo-40468: Factor out class ExtPage in idlelib.configdialog (GH-26618)
(cherry picked from commit 5571cabf1b)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-06-08 19:11:26 -07:00
Miss Islington (bot) 2cfe0e7061
bpo-40468: Move IDLE helplist settings to extensions page of dialog. (GH-26593)
These are the settings that extend the help menu.  Moving them shortens the dialog and will help with it being too tall for small screens.
(cherry picked from commit ab36b9f834)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-06-08 13:01:23 -07:00
Miss Islington (bot) 8524e32d77
Use absolute imports in IDLE tests (GH-26581)
Relative imports do not work when running test_x as main.
(cherry picked from commit e915db3e9e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-06-07 15:15:31 -07:00
Miss Islington (bot) 9c89d62073
bpo-44282: Fix occasional test_incremental_editing failures on buildbots (GH-26491) (GH-26499)
Signed-off-by: Tal Einat <532281+taleinat@users.noreply.github.com>
(cherry picked from commit adef445dc3)

Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
2021-06-03 02:14:41 +02:00
Miss Islington (bot) 3357604db9
bpo-44010: IDLE: colorize pattern-matching soft keywords (GH-25851)
(cherry picked from commit 60d343a816)

Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
2021-05-19 02:44:14 -07:00
Miss Islington (bot) 5a5237c6d0
bpo-44026: Idle - display interpreter's 'did you mean' hints (GH-25912)
A C function accessible by the default exception handler, but not by python code,
finds the existing name closest to the name causing a name or attribute error.  For
such errors, call the default handler after capturing stderr and retrieve its message line.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 092f9ddb5e)
Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
2021-05-07 20:35:25 -04:00
Tal Einat b43cc31a27
bpo-37903: IDLE: add shell sidebar mouse interactions (GH-25708)
Left click and drag to select lines.  With selection, right click for context menu with copy and copy-with-prompts.
Also add copy-with-prompts to the text-box context menu.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-05-02 22:27:38 -04:00
Pablo Galindo 6689e45dfe
bpo-43981: Fix reference leaks in test_squeezer (GH-25758) 2021-04-30 19:34:29 +01:00
Terry Jan Reedy a62e424de0
bpo-43981: Fix error in idle-test leak test (GH-25739)
Remove call to macosx.setupApp, which calls macosc.overrideRootMenu, which modifies
the menus, which results in two failures in the second round of the leak test.
2021-04-29 23:52:47 -04:00
Tal Einat 15d3861856
bpo-37903: IDLE: Shell sidebar with prompts (GH-22682)
The first followup will change shell indents to spaces.
More are expected.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-04-28 18:27:55 -04:00
Aviral Srivastava 000cde5984
bpo-38307: Add end_lineno attribute to pyclbr Objects (GH-24348)
For back-compatibility, make the new constructor parameter for public classes Function and Class
keyword-only with a default of None.

Co-authored-by: Aviral Srivastava <aviralsrivastava@Avirals-MacBook-Air.local
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-02-01 12:38:44 -05:00
Zackery Spytz 23a567c11c
bpo-23544: Disable IDLE Stack Viewer when running user code (GH-17163)
Starting stack viewer when user code is running, including when Debugger is active, hangs or crashes IDLE.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-01-28 18:13:22 -05:00
Ken 7a34380ad7
bpo-43008: Make IDLE respect sys.excepthook (GH-24302)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-01-26 18:55:52 -05:00
Terry Jan Reedy 879986d8a9
bpo-43013: Fix old tkinter module names in idlelib (GH-24326)
Lowercase 'tkColorChooser', 'tkFileDialog', 'tkSimpleDialog', and
'tkMessageBox' and remove 'tk'.  Just lowercase 'tkFont' as 'font'
is already used.  Adjust import.
2021-01-25 06:33:18 -05:00
Terry Jan Reedy 8dfe15625e
bpo-43013: Update idlelib code to 3.x (GH-24315)
Remove 9 remaining '(object)' occurrences in class headers in idlelib
and 25 '()' occurrences in idlelib.idle_test class headers.
2021-01-24 14:08:50 -05:00
Terry Jan Reedy 81f87bbf9f
bpo-33065: Fix problem debugging user classes with __repr__ method (GH-24183)
If __repr__ uses instance attributes, as normal, and one steps
through the __init__ method, debugger may try to get repr before
the instance attributes exist.  reprlib.repr handles the error.
2021-01-10 01:59:47 -05:00
Cheryl Sabella e40e2a2cc9
bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491)
Make menu items work with formatter, add docstrings, add 100% tests.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-01-05 02:26:43 -05:00
Serhiy Storchaka 453bc1da20
bpo-42426: IDLE: Fix reporting offset of the RE error in searchengine (GH-23447) 2020-11-22 00:06:51 -05:00
Terry Jan Reedy 7ddbaa7a1b
bpo-42416: Use inspect.getdoc for IDLE calltips (GH-23416)
Inspect.getdoc(ob) sometimes gets docstrings when ob.__doc__ is None.
2020-11-20 01:59:11 -05:00
Tal Einat da7bb7b4d7
bpo-40511: Stop unwanted flashing of IDLE calltips (GH-20910)
They were occurring with both repeated 'force-calltip' invocations and by typing parentheses
 in expressions, strings, and comments in the argument code.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-11-01 22:59:52 -05:00
Mark Roseman 5df6c99cb4
bpo-33987: Add master ttk Frame to IDLE search dialogs (GH-22942) 2020-10-24 23:14:02 -04:00
Terry Jan Reedy 40a0625792
bpo-40181: Remove '/' reminder in IDLE calltips. (GH-22350)
The marker was added to the language in 3.8 and
3.7 only gets security patches.
2020-09-22 01:43:55 -04:00
Terry Jan Reedy 416f0b71ba
bpo-41514: Fix buggy IDLE test (GH-21808)
test_run method test_fatal_error failed when run twice, as with
python -m test -m test_fatal_error test_idle test_idle
because func.called was not reinitialized to 0.
This bug caused a failure on a refleak buildbot.
2020-08-10 06:43:56 -07:00
Terry Jan Reedy f2e161c279
bpo-41468: Improve and test IDLE run error exit (GH-21798)
A message box pops up when an unexpected error stops the run process.  Tell users it is likely a random glitch, but report it if not.
2020-08-09 16:08:30 -04:00
Terry Jan Reedy 8b67bf907c
Improve renamed test_run.RecursionLimitTest (GH-21794)
PEP 8 style and new comments.
2020-08-09 13:08:19 -04:00
Terry Jan Reedy bce2eb4646
bpo-37765: Add keywords to IDLE tab completions (GH-15138)
Keywords are present in the main module tab completion lists generated by rlcompleter, which is used by REPLs on *nix. Add all keywords to IDLE's main module name list except those already added from builtins (True, False, and None) . This list may also be used by Show Completions on the Edit menu, and its hot key.

Rewrite Completions doc.

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2020-07-09 18:08:33 -04:00
Serhiy Storchaka 2515a28230
bpo-41152: IDLE: always use UTF-8 for standard IO streams (GH-21214) 2020-06-29 20:18:22 -04:00
E-Paine 8ab77c6f9f
bpo-41144: Fix IDLE open module error (#21182)
Could not open os.path.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-06-28 02:02:47 -04:00
Terry Jan Reedy 97e4e0f53d
bpo-39885: Make IDLE context menu cut and copy work again (GH-18951)
Leave selection when right click within.  This exception to clearing selections when right-clicking was omitted from the previous commit, 4ca060d.  I did not realize that this completely disabled the context menu entries, and  I should have merged a minimal fix immediately.  An automated test should follow.
2020-05-29 18:54:14 -04:00
Florian Dahlitz 905b3cd05f
bpo-40723: Make IDLE autocomplete test run without __main__.__file__ (GH-20311)
This was the only failure running unittest.main(test.test_idle) after imports.
2020-05-24 06:53:44 -04:00