Commit graph

2396 commits

Author SHA1 Message Date
Miss Islington (bot)
c1b396cdf3
[3.12] gh-57795: Add news to idlelib/News3.txt (GH-113522) (#113523)
gh-57795: Add news to idlelib/News3.txt (GH-113522)
(cherry picked from commit 6c98fce33a)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-27 21:05:59 +00:00
Miss Islington (bot)
b2ef35842c
[3.12] gh-57795: IDLE: Enter the selected text when opening the "Replace" dialog (GH-17593) (GH-113514)
(cherry picked from commit 712afab5ac)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Roger Serwy <roger.serwy@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-27 14:57:01 +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
fd3b894725
[3.12] gh-83162: Rename re.error in idlelib (GH-101677) (#112987)
Backport idlelib part of #101677 with simple rename.
2023-12-12 10:53:58 -05: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)
ceabbeaca3
[3.12] gh-112898: warn about unsaved files when quitting IDLE on macOS (GH-112939) (#112960)
gh-112898: warn about unsaved files when quitting IDLE on macOS (GH-112939)

* gh-112898: warn about unsaved files when quitting IDLE on macOS

Implement the TK function ``::tk::mac::Quit`` on macOS to
ensure that IDLE asks about saving unsaved files when
quitting IDLE.

(cherry picked from commit 3251ba8f1a)


Co-authored-by: Christopher Chavez chrischavez@gmx.us

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2023-12-11 17:14:15 +01:00
Miss Islington (bot)
fd5d3aec2a
[3.12] IDLE: Tweak iomenu.IOBinding.maybesave (GH-112914) (#112917)
Add docstring, use f-string, simplify code.
(cherry picked from commit ca1bde8943)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-10 02:56:28 +00: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)
264b54bf51
[3.12] IDLE: Condense run.main threading.Thread start. (GH-106125) (#106154)
IDLE: Condense run.main threading.Thread start. (GH-106125)

Use daemon argument added in 3.3 and directly call .start.
Remove now unused 'sockthread' name.
(cherry picked from commit eaa1eae55e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-06-27 17:35:48 +00:00
Miss Islington (bot)
3eccd95f56
[3.12] gh-102832: IDLE - update stackviewer open (GH-105528) (#105534)
gh-102832: IDLE - update stackviewer open (GH-105528)

Use 'last_exc' instead of 'last_value' in 3.12/3.
(cherry picked from commit bb3454c1a7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-06-08 22:29:24 +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
0c5e79bcdf
gh-104719: IDLE - delete useless monkeypatch of tokenize (#104726) 2023-05-21 18:42:26 +00:00
Terry Jan Reedy
c5b670efd1
gh-104499: Fix typo. (#104598) 2023-05-18 02:35:46 +00:00
Terry Jan Reedy
678bf57ed0
gh-104499: IDLE - fix completions for tk aqua 8.7 (#104591) 2023-05-17 21:36:58 -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
46f1c78eeb
gh-75710: IDLE - add docstrings and comments to editor module (#104446)
Commit extracted from PR #3669.  Will edit more later.

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2023-05-13 11:41:39 -04:00
Terry Jan Reedy
57139a6b5f
gh-99836: IDLE - update news.txt for 3.12 (#104444)
* gh-99836: IDLE 3.12 news.txt

* gh-99836: IDLE - update news.txt for 3.12
2023-05-13 04:35:45 +00: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
Terry Jan Reedy
4b27972f5f
gh-88496: Fix IDLE test hang on macOS (#104025)
Replace widget.update() with widget.update_idletasks in two places.
2023-04-30 21:36:27 -04: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
d1e4917e06
gh-102778: IDLE - make sys.last_exc available in Shell after traceback (#103314)
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-04-19 01:05:52 -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
JosephSBoyle
c41af812c9
IDLE: Simplify DynOptionsMenu __init__code (#101371)
Refactor DynOptionMenu's initializer to not copy  kwargs dict and use subscripting;
improve its htest.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-02-28 01:11:52 -05:00
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