Commit Graph

400 Commits

Author SHA1 Message Date
Miss Islington (bot) e995c585e7
[3.11] gh-103820: IDLE: Do not interpret buttons 4/5 as scrolling on non-X11 (GH-103821) (GH-114902)
Also fix test_mousewheel: do not skip a check which was broken due to incorrect
delta on Aqua and XQuartz, and probably not because of `.update_idletasks()`.
(cherry picked from commit d25d4ee60c)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
2024-02-02 15:13:00 +02:00
Miss Islington (bot) f49a1ce6b2
[3.11] gh-96905: In IDLE code, stop redefining built-ins 'dict' and 'object' (GH-114227) (#114229)
Prefix 'dict' with 'o', 'g', or 'l' for 'object', 'global', or 'local'.
Suffix 'object' with '_'.
(cherry picked from commit 6f4b242a03)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-01-18 00:05:00 -05:00
Miss Islington (bot) 96eff8c150
[3.11] gh-113903: Fix an IDLE configdialog test (GH-113973) (#113975)
test_configdialog.HighPageTest.test_highlight_target_text_mouse fails
if a line of the Highlight tab text sample is not visible. If so, bbox()
in click_char() returns None and the unpacking iteration fails.

This occurred on a Devuan Linux system. Fix by moving the
'see character' call inside click_char, just before the bbox call.

Also, reduce the click_char calls to just one per tag name and
replace the other nested function with a dict comprehension.
(cherry picked from commit c4992f4106)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-01-12 03:23:52 +00:00
Miss Islington (bot) 320c160b1a
[3.11] gh-113729: Fix IDLE's Help -> "IDLE Help" menu bug in 3.12.1 and 3.11.7 (GH-113731) (#113766)
(cherry picked from commit 66f3964815)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-01-06 01:45:41 -05:00
Serhiy Storchaka fe2b4dd3c0
[3.11] gh-81682: Fix test failures when CPython is built without docstrings (GH-113410) (GH-113430)
(cherry picked from commit 4e5b27e6a3)
2023-12-23 11:38:07 +00:00
Miss Islington (bot) 1dd2ad6f8e
[3.11] gh-113269: IDLE - Fix test_editor hang (macOS) (GH-113271) (#113273)
gh-113269: IDLE - Fix test_editor hang (macOS) (GH-113271)

Hangs on installed 3.13.0a2 on macOS Catalina.
Behavior on installed 3.12.1 and 3.11.7 is unknown.
(cherry picked from commit fa9ba02353)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-19 05:42:59 +00:00
Miss Islington (bot) fbaf00ee57
[3.11] IDLE: Add util and stub example comments (GH-113222) (#113224)
(cherry picked from commit cde1335485)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-17 01:20:36 +00:00
Terry Jan Reedy ada2d77977
[3.11] gh-112953: Rename idlelib/NEWS.txt to News3.txt and update (GH… (#112992) 2023-12-12 06:10:29 +00:00
Miss Islington (bot) 5ada3e5e91
[3.11] gh-66819: More IDLE htest updates(4) (GH-112686) (#112689)
Mostly double spacing before 'if __name__...'.
(cherry picked from commit e5b0db0315)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-04 01:59:19 -05:00
Miss Islington (bot) e347a8e0e3
[3.11] gh-66819: More IDLE htest updates(3) (GH-112683) (#112685)
Revise spec-callable pairs from percolator to end.
(cherry picked from commit 5a1b5316af)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-04 00:10:22 -05:00
Miss Islington (bot) 36ad8e61a6
[3.11] gh-66819: More IDLE htest updates(2) (GH-112642) (#112644)
Examine and update spec -- callable pairs.
Revise run method.
(cherry picked from commit 3855b45874)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-03 11:34:37 -05:00
Miss Islington (bot) ddf6cfd456
[3.11] gh-66819: More IDLE htest updates (GH-112574) (#112576)
Revise htest.py docstring and move 2 specs to alphabetical position.
(cherry picked from commit e44f1940bd)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-01 07:22:07 +00:00
Miss Islington (bot) 03ac9e6ee1
[3.11] IDLE: fix config_key htest (GH-112545) (#112547)
Change 'Dialog' to 'Window' in two places to match the name of the config_key class being tested.
(cherry picked from commit 81261fa67f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-11-30 03:29:23 -05:00
Miss Islington (bot) d065e30b00
[3.11] IDLE: Fix test_debugger bug and buildbot failures (GH-112258) (#112260)
IDLE: Fix test_debugger bug and buildbot failures (GH-112258)

Missing "requires('gui')" causes Tk() to fail when no gui.
This caused CI Hypothesis test to fail, but I did not understand
the its error message. Then buildbots failed.

IdbTest failed on draft Bdb replacement because so different.
Simplified version works on old and new.
(cherry picked from commit 14fd86a59d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-11-19 06:59:56 +00:00
Miss Islington (bot) e19d75df76
[3.11] gh-79871: IDLE - Fix and test debugger module (GH-11451) (#112257)
Add docstrings to the debugger module. Fix two bugs: initialize Idb.botframe (should be in Bdb); In Idb.in_rpc_code, check whether prev_frame is None before trying to use it. Make other code changes.

Expand test_debugger coverage from 19% to 66%.
---------

(cherry picked from commit adedcfa06b)

Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-11-19 04:34:54 +00:00
Miss Islington (bot) 409a0ac8e5
[3.11] gh-108303: Move config parser data to `Lib/test/configparserdata/` (gh-111879) (gh-111883)
gh-108303: Move config parser data to `Lib/test/configparserdata/` (gh-111879)
(cherry picked from commit cc18b886a5)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-11-09 15:43:28 +01:00
Miss Islington (bot) 2258d6cfa2
[3.11] gh-111050: IDLE - Simplify configdialog.HighPage.theme_elements (GH-111053) (#111056)
gh-111050: IDLE - Simplify configdialog.HighPage.theme_elements (GH-111053)

Replace tuple value with internal name, removing numbers.
Remove sorting of already ordered dislay names.
Remove '[0]' indexing into now-gone tuple.
(cherry picked from commit 642eb8df95)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-10-19 04:30:43 +00:00
Miss Islington (bot) 7c308f4c64
[3.11] gh-103737: IDLE - Remove unneeded .keys() for dict iteration (GH-110960) (#111027)
gh-103737: IDLE - Remove unneeded .keys() for dict iteration (GH-110960)

Add comments where .keys() is needed.
Leave debugger usages along because situation is unclear as indicated in expanded comment.
Most testing is manual.
(cherry picked from commit baefbb21d9)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-10-18 08:40:39 +00:00
Miss Islington (bot) c2df09fb4d
[3.11] gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer (GH-103339) (#105527)
gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer (GH-103339)
(cherry picked from commit 3ee921d84f)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-06-08 20:48:10 +00:00
Miss Islington (bot) 22618a86f4
[3.11] gh-104719: IDLE - test existence of all tokenize references. (GH-104767) (#104845)
gh-104719: IDLE - test existence of all tokenize references. (GH-104767)

Class editor.IndentSearcher contains all editor references to tokenize module.
Module io tokenize reference cover those other modules.

(cherry picked from commit e561c09975)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-05-24 08:46:33 -04:00
Miss Islington (bot) 0560fd3f98
[3.11] gh-104496: IDLE - fix About for mixed tcl/tk versions (GH-104585) (#104587)
gh-104496: IDLE - fix About for mixed tcl/tk versions (GH-104585)

Print both if they are different, as may happen in the future.
(cherry picked from commit aed643baa9)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-05-17 20:31:22 +00:00
Miss Islington (bot) 03f0d75f1d
[3.11] GH-71383: IDLE - Document testing subsets of modules (GH-104463) (#104464)
GH-71383: IDLE - Document testing subsets of modules (GH-104463)
(cherry picked from commit 080a596152)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-05-14 04:18:30 +00:00
Miss Islington (bot) 9f191a1a77
[3.11] gh-88496: IDLE - fix another test on macOS (GH-104075) (#104076)
gh-88496: IDLE - fix another test on macOS (GH-104075)

Needed for Catalina: test_sidebar add 'idletasks' and skip assert.
(cherry picked from commit 690df4c16c)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-05-02 03:22:57 +00:00
Miss Islington (bot) 34df9e740d
[3.11] Change 'dependant' to 'dependent' (GH-103745) (#103754)
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
2023-04-24 08:22:24 -06:00
Miss Islington (bot) 5054459678
[3.11] gh-103668: Run pyugrade on idlelib (GH-103671) (#103730)
---------
(cherry picked from commit bd2dca035a)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Terry Jan Reedy tjreedy@udel.edu
2023-04-23 21:09:46 -04:00
Miss Islington (bot) 83f85539a1
IDLE - fix module browser test (GH-100647)
(cherry picked from commit 1f6c87ca7b)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-12-31 16:31:53 -08:00
Miss Islington (bot) ab2f1a6152
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:08:36 -07:00
Miss Islington (bot) 98b81c2ac3
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:15:23 -07:00
Gregory P. Smith f8b71da9aa
[3.11] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96500)
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:48:57 -07:00
Miss Islington (bot) 8570f6d1a0
gh-95191: IDLE: Include prompts when saving Shell GH-95554 (#95557)
(cherry picked from commit b85411fc5e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-08-02 02:14:19 -04:00
Miss Islington (bot) e4541c474a
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:32:33 -07:00
Miss Islington (bot) a459ee9543
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:09:32 -07:00
John Belmonte 45896f2a02
[3.11] gh-93883: elide traceback indicators when possible (GH-93994) (GH-94740)
Elide traceback column indicators when the entire line of the
frame is implicated.  This reduces traceback length and draws
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
```

Automerge-Triggered-By: GH:pablogsal
2022-07-11 04:27:29 -07:00
Miss Islington (bot) a562d2dc8b
gh-84623: Remove unused imports in idlelib (GH-94143)
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>
2022-06-22 15:36:47 -07:00
Miss Islington (bot) da184517f5
Fix typo in Lib/idlelib/idle_test/test_parenmatch.py (GH-93332) (#93339)
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:02:23 -04: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
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
Caio Agiani 222865daab
bpo-46588: fix typo in test_calltip.py (GH-31119) 2022-02-03 23:39:59 -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 42ac06dcd2
bpo-45495: Add 'case' and 'match' to IDLE completions list. (GH-29000)
Since the keyword list is frozen, only compute it once per
session.  The colorizer already handles context keywords.
2021-10-16 18:44:00 -04:00
Christian Clauss 745c9d9dfc
Fix typos in the Lib directory (GH-28775)
Fix typos in the Lib directory as identified by codespell.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-10-06 16:13:48 -07:00
Mohamad Mansour 8f943ca257
[codemod] Fix non-matching bracket pairs (GH-28473)
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>
2021-09-22 01:09:00 +02:00
Terry Jan Reedy 369bf949cc
bpo-45020: Don't test IDLE with frozen module. (GH-28344)
Otherwise, test would need special import.
2021-09-15 03:08:44 -04:00
Terry Jan Reedy 22fe0eb13c
bpo-45059: Add module cleanup to IDLE test_macosx (GH-28102) 2021-08-31 14:59:35 -04:00
Serhiy Storchaka 54f100514b
bpo-45059: Fix IDLE test typo: using "==" instead of "=" (GH-28086) 2021-08-31 13:32:01 -04:00
Ammar Askar 4823d9a512
bpo-43950: Add option to opt-out of PEP-657 (GH-27023)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
2021-07-07 20:07:12 +01:00
Ammar Askar 5644c7b3ff
bpo-43950: Print columns in tracebacks (PEP 657) (GH-26958)
The traceback.c and traceback.py mechanisms now utilize the newly added code.co_positions and PyCode_Addr2Location
to print carets on the specific expressions involved in a traceback.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
2021-07-05 00:14:33 +01:00
Mark Roseman 42d5a4fc3b
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>
2021-06-10 15:13:55 -04:00
Terry Jan Reedy 275d5f7957
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.
2021-06-09 16:17:58 -04:00