Commit Graph

2356 Commits

Author SHA1 Message Date
Terry Jan Reedy 1f6c87ca7b
IDLE - fix module browser test (#100647) 2022-12-31 19:01:44 -05:00
Terry Jan Reedy 5eff82fdde
bpo-33964: IDLE macosx - removed unused local dict. (GH-7926) 2022-11-06 20:10:22 +00:00
Terry Jan Reedy 35fa5d5e7f
gh-97527: IDLE - fix buggy macosx patch (#98313)
#97530 fixed IDLE tests possibly crashing on a Mac without a GUI.
But it resulted in IDLE not starting in 3.10.8, 3.12.0a1, and
Microsoft Python 3.10.2288.0 when test/* is not installed.
After this patch, test.* is only imported when testing on Mac.
2022-10-16 10:23:11 -04:00
Pablo Galindo Salgado bb56dead33
gh-98254: Include stdlib module names in error messages for NameErrors (#98255) 2022-10-15 23:13:33 +01:00
Cheryl Sabella 1cc308d03c
bpo-35675: IDLE - separate config_key window and frame (#11427)
bpo-35598: IDLE: Refactor window and frame class

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-09-30 12:44:44 -04:00
Terry Jan Reedy 9704f8da33
gh-97527: IDLE: protect macosx Tk() call when no GUI (#97530)
Only call tkinter.tk and its follow-up code in _init_tk_type when requires('gui')
does not raise.  This function can be called as an unintended side-effect of
calling other idlelib code as part of tests on macOS without a GUI enabled.
2022-09-24 17:38:58 -04:00
Terry Jan Reedy aa671b48d6
gh-87179: Fix more IDLE class headers (#96899)
Remove unneeded '(object)' and '()'.
2022-09-17 17:53:23 -04:00
Terry Jan Reedy 837ce6460d
gh-75500: Update idlelib/help.html (#96523) 2022-09-03 03:38:57 -04:00
Gregory P. Smith 511ca94520
gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96499)
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.

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#). Much of that text wound up in the Issue. Backports PRs already exist. See the issue for links.
2022-09-02 09:35:08 -07:00
Terry Jan Reedy f6b811059a
gh-78143: IDLE - fix settings dialog page label. (#96009)
'/Tab' should have been removed from the font page label
when the tab-spaces setting was moved to the Windows page.
2022-08-15 19:03:56 -04:00
Terry Jan Reedy bdb2cf8e91
gh-95841: IDLE - Revise Windows local doc url (#95845)
#91242 replaced the Windows chm help file with a copy
of the html docs.  This PR replaces the IDLE code that
fetches the Windows local help url passed to os.startfile.
Co-authored-by: Steve Dower
2022-08-11 16:54:03 -04:00
Terry Jan Reedy 05a0f37029
gh-84910: Change 'IDLE Help' to 'IDLE Doc' (#95873)
'IDLE Help' was a plain text file.  It was superceded years ago
by a copy of the much more complete html doc.  .
2022-08-11 16:50:49 -04:00
Terry Jan Reedy 70fc9641b5
gh-75500: Add idlelib section to IDLE doc (#95832)
This enables accessing IDLE as 'idlelib' in the Doc Module listing.
2022-08-09 14:34:42 -04:00
Terry Jan Reedy 63140b445e
gh-95491: Mention IDLE Issue project in Readme (#95750) 2022-08-08 09:37:43 -04:00
Terry Jan Reedy a302a27489
gh-95251: IDLE - Add What's New section to README (#95688)
Document what I (TJR) currently do for 3.10/3.11.

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-08-05 17:15:18 -04:00
Terry Jan Reedy 834064c19a
gh-89362: Doc IDLE menu and search (#95697)
Update menu item position and capitalization.
Add paragraph about search.
For help.html, include save-as addition.
2022-08-05 12:21:45 -04:00
Terry Jan Reedy 9890f86ae2
gh-65802: IDLE - explain SaveAs and extensions (#95690)
File name extensions may or may not be shown for the current name
and are added in an OS-dependent manner if not given for the new
name.
2022-08-04 21:51:14 -04:00
Terry Jan Reedy 621b33ce25
gh-95638: Update idlelib README file and menu lists (#95639) 2022-08-04 03:35:42 -04:00
Jo, Yunjin b53aed76d2
gh-95597: Fix typo in Lib directory files (#95599) 2022-08-03 17:16:15 -04:00
Erlend Egeberg Aasland 698fa8bf60
gh-83270: Update IDLE's credits (#95528)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-08-02 00:23:42 -04:00
Terry Jan Reedy b85411fc5e
gh-95191: IDLE: Include prompts when saving Shell #95554 2022-08-02 00:10:39 -04:00
Terry Jan Reedy fc31a13dc1
gh-95511: IDLE - fix Shell context menu copy-with-prompts bug (#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.)
2022-08-01 01:06:13 -04:00
Serhiy Storchaka 0f17a754d9
IDLE: Fix docs URL in the About window (#28417) 2022-07-31 16:47:28 -04:00
Terry Jan Reedy 53357b3ee5
gh-95471: IDLE - Tweak Edit menu (#95481)
Move `Select All` above  `Cut` as it is used with `Cut` and `Copy` but not `Paste`.  Add a separator between `Replace` and `Go to Line` to separate items that belong to the 'Edit-find' (above) and 'Edit-show' (below) IDLE github project topics.
2022-07-30 21:09:07 -04:00
Terry Jan Reedy 9ec6abf6dc
gh-90654: IDLE - Insert blank line in NEWS.txt (#95478)
Needed for backports.
2022-07-30 15:57:37 -04:00
Erlend Egeberg Aasland 7e19e417b5
gh-95411: IDLE - Enable using the module browser with .pyw files (#95397)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-07-30 00:42:13 -04:00
Erlend Egeberg Aasland 06fc249135
gh-89610: Add .pyi as a recognised extension for IDLE on macOS (#95393)
This allows opening stub files by double clicking on them in the Finder.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-07-28 19:04:26 -04:00
Terry Jan Reedy bd390ef825
gh-90654: Remove unneeded blank line (#95044) 2022-07-20 05:38:56 -04:00
Terry Jan Reedy acb105a7c1
gh-90654: Add item missing from idlelib/NEWS.txt (#95038) 2022-07-20 03:18:10 -04:00
Terry Jan Reedy 6a15f918b5
idlelib: replace 'while 1' with 'while True' (#94827) 2022-07-13 21:09:07 -04:00
John Belmonte da717519ec
gh-93883: elide traceback indicators when possible (#93994)
* gh-93883: elide traceback indicators when possible

Elide traceback column indicators when the entire line of the
frame is implicated.  This reduces traceback length and draws
even more attention to the remaining (very relevant) indicators.

Example:
```
Traceback (most recent call last):
  File "query.py", line 99, in <module>
    bar()
  File "query.py", line 66, in bar
    foo()
  File "query.py", line 37, in foo
    magic_arithmetic('foo')
  File "query.py", line 18, in magic_arithmetic
    return add_counts(x) / 25
           ^^^^^^^^^^^^^
  File "query.py", line 24, in add_counts
    return 25 + query_user(user1) + query_user(user2)
                ^^^^^^^^^^^^^^^^^
  File "query.py", line 32, in query_user
    return 1 + query_count(db, response['a']['b']['c']['user'], retry=True)
                               ~~~~~~~~~~~~~~~~~~^^^^^
TypeError: 'NoneType' object is not subscriptable
```

Rather than going out of our way to provide indicator coverage
in every traceback test suite, the indicator test suite should
be responible for sufficient coverage (e.g. by adding a basic
exception group test to ensure that margin strings are covered).
2022-07-11 07:40:53 +01:00
Terry Jan Reedy 39c29f753e
IDLE doc: Tweek RESTART and Windows console start (#94530) 2022-07-03 12:56:44 -04:00
Terry Jan Reedy e6391e08bf
gh-82006: IDLE doc improvements (#94349)
0. Update text start and stop conditions.
1. Title-case sections but not subsections.
2. Edit Shell Window sections: title, execute, restart.
2022-06-27 18:59:26 -04:00
Terry Jan Reedy 91f9947f23
IDLE: replace if statement with expression (#94228) 2022-06-24 12:59:49 -04:00
Victor Stinner 576dd90117
gh-84623: Remove unused imports in idlelib (#94143)
Remove commented code in test_debugger_r.py.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-06-23 00:09:48 +02:00
Victor Stinner 259dd71c32
gh-84623: Remove unused imports in stdlib (#93773) 2022-06-13 16:28:41 +02:00
luzpaz 4f195f9db1
Fix typo in Lib/idlelib/idle_test/test_parenmatch.py (GH-93332)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-05-29 21:41:59 -04:00
Serhiy Storchaka 3680ebed7f
bpo-44712: Replace "type(literal)" with corresponding builtin types (GH-27294)
I suppose it is a remnants of very old code written when str, int, list, dict, etc
were functions and not classes.
2022-05-08 17:10:11 +03:00
Serhiy Storchaka 15dbe8570f
gh-91827: Add method info_pathlevel() in tkinter (GH-91829) 2022-05-06 13:50:38 +03:00
Oleg Iarygin 7fbc7f6128
gh-91098: Use Argument Clinic for Object/classobject.c to fix docstrings (#31711)
Closes GH-91098.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-18 19:56:53 -07:00
Serhiy Storchaka 383a3bec74
bpo-46996: IDLE: Drop workarounds for old Tk versions (GH-31962) 2022-03-19 17:14:21 +02:00
Alex Waygood 50cf4991c4
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>
2022-02-12 19:04:48 -05:00
Manish Kumar ⛄ ba650af7d6
Optimize images by IMGbot (GH-21348)
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
2022-02-04 15:49:43 +09:00
Caio Agiani 222865daab
bpo-46588: fix typo in test_calltip.py (GH-31119) 2022-02-03 23:39:59 -05:00
Terry Jan Reedy d1df81a730
bpo-46630: Fix initial focus of IDLE query dialogs (GH-31112)
On Windows, one had to Tab or click on the entry box
to get a cursor and be able to enter anything.
2022-02-03 17:06:17 -05:00
Terry Jan Reedy 916d0d822c
bpo-45975: IDLE - Remove extraneous parens (GH-31107)
mistakenly included in 3 files in previous PR
and backported both to 3.10 and 3.9.
2022-02-03 14:44:35 -05:00
Nick Drozd 51a95be1d0
bpo-45975: Use walrus operator for some idlelib while loops (GH-31083) 2022-02-02 20:59:24 -05:00
Wes 53c7808057
bpo-46591: Make About IDLE doc link label clickable (GH-30251)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-02-01 20:20:23 -05:00
Terry Jan Reedy 9f0881476e
bpo-46496: news11-10 for bpo45296 (GH-30937) 2022-01-26 22:19:32 -05:00
Terry Jan Reedy fcde0bc10d
bpo-45296: Clarify close, quit, and exit in IDLE (GH-30936)
In the File menu, 'Close' and 'Exit' are now 'Close Window' (the current
one) and 'Exit' is now 'Exit IDLE' (by closing all windows).
In Shell, 'quit()' and 'exit()' mean 'close Shell'.
If there are no other windows, this also exits IDLE.
2022-01-26 22:16:31 -05:00