Commit graph

405 commits

Author SHA1 Message Date
Miss Islington (bot)
564d8484d1
[3.12] gh-103820: IDLE: Do not interpret buttons 4/5 as scrolling on non-X11 (GH-103821) (GH-114901)
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:12:31 +02:00
Miss Islington (bot)
e7a5577b53
[3.12] gh-96905: In IDLE code, stop redefining built-ins 'dict' and 'object' (GH-114227) (#114228)
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 05:09:26 +00:00
Miss Islington (bot)
d63e4c49d3
[3.12] gh-113903: Fix an IDLE configdialog test (GH-113973) (#113974)
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:39:45 +00:00
Miss Islington (bot)
4d5328cbeb
[3.12] gh-113729: Fix IDLE's Help -> "IDLE Help" menu bug in 3.12.1 and 3.11.7 (GH-113731) (#113765)
(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 06:53:34 +00:00
Serhiy Storchaka
fc4d2c3dc6
[3.12] gh-81682: Fix test failures when CPython is built without docstrings (GH-113410) (GH-113429)
(cherry picked from commit 4e5b27e6a3)
2023-12-23 11:50:01 +00:00
Miss Islington (bot)
1c2fcd8b99
[3.12] gh-113269: IDLE - Fix test_editor hang (macOS) (GH-113271) (#113272)
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:03 +00:00
Miss Islington (bot)
f7cacc43f5
[3.12] IDLE: Add util and stub example comments (GH-113222) (#113223)
(cherry picked from commit cde1335485)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-17 01:18:21 +00:00
Terry Jan Reedy
7d24eb854e
[3.12] gh-112953: Rename idlelib/NEWS.txt to News3.txt and update (GH-112988) (#112990) 2023-12-12 01:01:56 -05:00
Miss Islington (bot)
838e968e69
[3.12] gh-66819: More IDLE htest updates(4) (GH-112686) (#112688)
Mostly double spacing before 'if __name__...'.
(cherry picked from commit e5b0db0315)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-04 07:08:01 +00:00
Miss Islington (bot)
55a4bb99fc
[3.12] gh-66819: More IDLE htest updates(3) (GH-112683) (#112684)
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 05:10:19 +00:00
Miss Islington (bot)
ee3ef7f196
[3.12] gh-66819: More IDLE htest updates(2) (GH-112642) (#112643)
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:08 -05:00
Miss Islington (bot)
88d9142639
[3.12] gh-66819: More IDLE htest updates (GH-112574) (#112575)
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:20:28 +00:00
Miss Islington (bot)
46adf6b701
[3.12] IDLE: fix config_key htest (GH-112545) (#112546)
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:59 -05:00
Miss Islington (bot)
89c5180839
[3.12] IDLE: Fix test_debugger bug and buildbot failures (GH-112258) (#112259)
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:53:37 +00:00
Miss Islington (bot)
a62dcacc6e
[3.12] gh-79871: IDLE - Fix and test debugger module (GH-11451) (#112256)
gh-79871: IDLE - Fix and test debugger module (GH-11451)

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:35:59 +00:00
Miss Islington (bot)
e11ea5a400
[3.12] gh-108303: Move config parser data to Lib/test/configparserdata/ (gh-111879) (gh-111882)
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:41:44 +01:00
Miss Islington (bot)
e37d56e8dd
[3.12] gh-111050: IDLE - Simplify configdialog.HighPage.theme_elements (GH-111053) (#111055)
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:32:06 +00:00
Miss Islington (bot)
b8ce5d9c17
[3.12] gh-103737: IDLE - Remove unneeded .keys() for dict iteration (GH-110960) (#111026)
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 09:05:08 +00:00
Miss Islington (bot)
f565fed548
[3.12] gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer (GH-103339) (#105526)
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 21:57:33 +00:00
Miss Islington (bot)
8ca29573a8
[3.12] gh-104972: Ensure that line attributes in tokens in the tokenize module are correct (GH-104975) (#104982)
gh-104972: Ensure that line attributes in tokens in the tokenize module are correct (GH-104975)
(cherry picked from commit 3fdb55c482)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-05-26 11:25:46 -04:00
Terry Jan Reedy
2b54ea5ba2
[3.12] gh-104825: add omitted idlelib text fix (#104880)
Order of events:
Terry merged new idlelib test into main.
Ms. I. made a 3.12 backport; tests passed.
Pablo merged the tokenize change with idlelib test fix into main.
Pablo merged a 3.12 backport without the idle test fix
as the backport of the latter had not yet been been merged.
Terry merged the idlelib test backport.  The new test failed
on at least 4 3.12 buildbots because of the tokenize change.
This PR backports the now needed idlelib test fix.

(cherry picked from commit c8cf9b4)
2023-05-24 17:41:50 +00:00
Miss Islington (bot)
5e1799ea2e
[3.12] gh-104719: IDLE - test existence of all tokenize references. (GH-104767) (#104844)
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:22 -04:00
Terry Jan Reedy
aed643baa9
gh-104496: IDLE - fix About for mixed tcl/tk versions (#104585)
Print both if they are different, as may happen in the future.
2023-05-17 15:59:13 -04:00
Terry Jan Reedy
080a596152
GH-71383: IDLE - Document testing subsets of modules (#104463) 2023-05-13 23:55:20 -04:00
Terry Jan Reedy
690df4c16c
gh-88496: IDLE - fix another test on macOS (#104075)
Needed for Catalina: test_sidebar add 'idletasks' and skip assert.
2023-05-02 02:53:16 +00:00
Christopher Chavez
014f131934
Change 'dependant' to 'dependent' (#103745)
The word 'dependent' is both an adjective and a noun. A 'dependant' is a British alternative spelling for the noun form. In idlelib.sidebar, 'OS-dependant' is an adjective and clearly wrong. In 'Using', 'dependant' as a noun would be acceptable in Britain, but we use American spellings in Python docs.
https://www.merriam-webster.com/words-at-play/spelling-variants-dependent-vs-dependant
2023-04-24 09:40:30 -04:00
Nikita Sobolev
bd2dca035a
gh-103668: Run pyugrade on idlelib (#103671)
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-04-23 19:25:08 -04:00
Irit Katriel
4d1f033986
gh-102778: revert changes to idlelib (#102825) 2023-03-19 12:19:59 -04:00
Irit Katriel
e1e9bab006
gh-102778: Add sys.last_exc, deprecate sys.last_type, sys.last_value,sys.last_traceback (#102779) 2023-03-18 11:47:11 +00:00
Terry Jan Reedy
1f6c87ca7b
IDLE - fix module browser test (#100647) 2022-12-31 19:01:44 -05: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
aa671b48d6
gh-87179: Fix more IDLE class headers (#96899)
Remove unneeded '(object)' and '()'.
2022-09-17 17:53:23 -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
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
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
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
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
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
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