Commit Graph

2420 Commits

Author SHA1 Message Date
Miss Islington (bot) 59e2a0922b
[3.13] Rewrite idlelib/Icons/README.txt (GH-123329) (#123330)
(cherry picked from commit 6401cdf908)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-09-02 17:56:16 +02:00
Miss Islington (bot) 39061814f2
[3.13] Fixes typo in idlelib/idle_test/example_stub.pyi (GH-122520) (#122738)
Fixes typo in idlelib/idle_test/example_stub.pyi (GH-122520)

(cherry picked from commit dbdbef3668)

Co-authored-by: Jonathon Vandezande <jevandezande@gmail.com>
2024-09-02 11:26:55 +00:00
Miss Islington (bot) 29733b084d
[3.13] gh-120083: Add IDLE Hovertip foreground color needed for recent macOS (GH-120605) (#122739)
gh-120083: Add IDLE Hovertip foreground color needed for recent macOS (GH-120605)

On recent versions of macOS (sometime between Catalina and Sonoma 14.5), the default Hovertip foreground color changed from black to white, thereby matching the background. This might be a matter of matching the white foreground of the dark-mode text. The unreadable result is shown here (GH-120083 (comment)).

The foreground and background colors were made parameters so we can pass different colors for future additional hovertips in IDLE.
---------

(cherry picked from commit 5a7f7c4864)

Co-authored-by: John Riggles <jriggles@icloud.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-09-02 12:50:39 +02:00
Sergey B Kirpichev c8f4069ab1
[3.13] gh-121804: Always show error location for SyntaxError's in new repl (GH-121886) (#123148)
(cherry picked from commit 354d55eb1f)
2024-08-19 20:01:58 +01:00
Miss Islington (bot) a21317f07b
[3.13] GH-122482: Make About IDLE direct discussion to DPO (GH-122483) (#122485)
Currently, idle-dev@python.org and idle-dev mailing list
serve to collect spam (90+%).  Change About IDLE to direct
discussions to discuss.python.org.  Users are already
doing so.
(cherry picked from commit 29c04dfa27)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-07-30 22:54:01 +00:00
Miss Islington (bot) 5a8e1373fe
[3.13] gh-78889: Stop IDLE Shell freezes from sys.stdout.shell.xyz (GH-121876) (#121911)
gh-78889: Stop IDLE Shell freezes from sys.stdout.shell.xyz (GH-121876)

Problem occurred when attribute xyz could not be pickled.
Since this is not trivial to selectively fix, block all
attributes (other than 'width').  IDLE does not access them
and they are private implementation details.
(cherry picked from commit 58753f33e4)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-07-17 14:10:13 +00:00
Miss Islington (bot) bdcc738fec
[3.13] gh-121008: Fix idlelib.run tests (GH-121046) (#121049)
gh-121008: Fix idlelib.run tests (GH-121046)

When testing IDLE, don't create a Tk to avoid side effects such as
installing a PyOS_InputHook hook.
(cherry picked from commit 44eafd6688)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-06-26 14:08:31 +00:00
Xie Yanbo 9c7ac7d041
[3.13] Fix typos in documentation (GH-120338) (#120438)
(cherry picked from commit ce3879bd45)
2024-06-13 09:39:46 +03:00
Miss Islington (bot) 51724620e8
[3.13] gh-120417: Remove unused imports in the stdlib (GH-120420) (#120429)
gh-120417: Remove unused imports in the stdlib (GH-120420)
(cherry picked from commit 4c6d4f5cb3)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-06-12 19:27:32 +00:00
Miss Islington (bot) f7303cd967
[3.13] gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (GH-119175) (#119289)
gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (GH-119175)

------

(cherry picked from commit 538ed5e481)

Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
2024-05-21 03:53:29 +00:00
Miss Islington (bot) 3b90807257
[3.13] IDLE: fix url in config.py comment (GH-119198) (#119199)
IDLE: fix url in config.py comment (GH-119198)
(cherry picked from commit 357f5a1f73)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-05-20 06:27:51 +00:00
Serhiy Storchaka 65f5e586a1
gh-66410: Do not stringify arguments of Tkinter callback (GH-98592)
Callbacks registered in the tkinter module now take arguments as
various Python objects (int, float, bytes, tuple), not just str.
To restore the previous behavior set tkinter module global wantobject to 1
before creating the Tk object or call the wantobject() method of the Tk object
with argument 1.
Calling it with argument 2 restores the current default behavior.
2024-05-07 12:07:32 +00:00
Terry Jan Reedy 7758be4318
gh-78955: Use user-selected color theme for Help => IDLE Doc (#9502) 2024-05-06 03:55:56 -04:00
Pablo Galindo Salgado 345e1e04ec
gh-112730: Make the test suite resilient to color-activation environment variables (#117672) 2024-04-24 21:25:22 +01:00
Ronald Oussoren b48101864c
gh-88516: show file proxy icon in IDLE editor windows on macOS (#112894)
The platform standard on macOS is to show a proxy icon for open
files in the titlebar of Windows. Make sure IDLE matches this
behaviour.

Don't use both the long and short names in the window title.
The behaviour of other editors (such as Text Editor) is to show
only the short name with the proxy icon.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-02-23 02:15:39 +00:00
Serhiy Storchaka d2c4baa41f
gh-97928: Partially restore the behavior of tkinter.Text.count() by default (GH-115031)
By default, it preserves an inconsistent behavior of older Python
versions: packs the count into a 1-tuple if only one or none
options are specified (including 'update'), returns None instead of 0.
Except that setting wantobjects to 0 no longer affects the result.

Add a new parameter return_ints: specifying return_ints=True makes
Text.count() always returning the single count as an integer
instead of a 1-tuple or None.
2024-02-11 12:43:14 +02:00
Christopher Chavez d25d4ee60c
gh-103820: IDLE: Do not interpret buttons 4/5 as scrolling on non-X11 (GH-103821)
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()`.
2024-02-02 10:38:43 +00:00
Terry Jan Reedy 6f4b242a03
gh-96905: In IDLE code, stop redefining built-ins 'dict' and 'object' (#114227)
Prefix 'dict' with 'o', 'g', or 'l' for 'object', 'global', or 'local'.
Suffix 'object' with '_'.
2024-01-18 04:39:12 +00:00
Terry Jan Reedy 4a32275389
gh-72284: Revise lists in IDLE doc (#114174)
Tkinter is a fact, not necessarily a feature.

Reorganize editor key bindings in a logical order
and remove those that do not work, at least on Windows.

Improve shell bindings list.
2024-01-17 07:52:32 +00:00
Terry Jan Reedy e07a400c31
gh-81479: For Help => IDLE Doc, stop double-spacing some lists. (#114168)
This matches Firefox format.  Edge double-spaces non-simple
list but I think it looks worse.
2024-01-17 05:24:59 +00:00
Terry Jan Reedy 7a24ecc953
Fix 'expresion' typo in IDLE doc (#114130)
The substantive change is on line 577/593. Rest is header/footer stuff ignored when displaying.
2024-01-16 17:12:59 +00:00
Terry Jan Reedy c4992f4106
gh-113903: Fix an IDLE configdialog test (#113973)
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.
2024-01-11 22:10:00 -05:00
Ronald Oussoren 66f3964815
gh-113729: Fix IDLE's Help -> "IDLE Help" menu bug in 3.12.1 and 3.11.7 (#113731)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-01-06 06:23:26 +00:00
Terry Jan Reedy 6c98fce33a
gh-57795: Add news to idlelib/News3.txt (#113522) 2023-12-27 15:51:49 -05:00
Zackery Spytz 712afab5ac
gh-57795: IDLE: Enter the selected text when opening the "Replace" dialog (GH-17593)
Co-authored-by: Roger Serwy <roger.serwy@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-27 16:27:40 +02:00
Serhiy Storchaka 4e5b27e6a3
gh-81682: Fix test failures when CPython is built without docstrings (GH-113410) 2023-12-23 09:56:30 +00:00
Terry Jan Reedy fa9ba02353
gh-113269: IDLE - Fix test_editor hang (macOS) (#113271)
Hangs on installed 3.13.0a2 on macOS Catalina.
Behavior on installed 3.12.1 and 3.11.7 is unknown.
2023-12-19 05:26:11 +00:00
Terry Jan Reedy cde1335485
IDLE: Add util and stub example comments (#113222) 2023-12-17 00:51:25 +00:00
Terry Jan Reedy e0fb7004ed
gh-112953: Rename idlelib/NEWS.txt to News3.txt and update (#112988) 2023-12-12 01:00:51 -05:00
achhina a01022af23
GH-83162: Rename re.error for better clarity. (#101677)
Renamed re.error for clarity, and kept re.error for backward compatibility.
Updated idlelib files at TJR's request.
---------

Co-authored-by: Matthias Bussonnier <mbussonnier@ucmerced.edu>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-11 15:45:08 -05:00
Ronald Oussoren 3251ba8f1a
gh-112898: warn about unsaved files when quitting IDLE on macOS (#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. 

Co-authored-by: Christopher Chavez chrischavez@gmx.us
2023-12-11 15:22:36 +01:00
Terry Jan Reedy ca1bde8943
IDLE: Tweak iomenu.IOBinding.maybesave (#112914)
Add docstring, use f-string, simplify code.
2023-12-09 21:29:40 -05:00
Terry Jan Reedy e5b0db0315
gh-66819: More IDLE htest updates(4) (#112686)
Mostly double spacing before 'if __name__...'.
2023-12-04 06:36:40 +00:00
Terry Jan Reedy 5a1b5316af
gh-66819: More IDLE htest updates(3) (#112683)
Revise spec-callable pairs from percolator to end.
2023-12-03 23:45:56 -05:00
Terry Jan Reedy 3855b45874
gh-66819: More IDLE htest updates(2) (#112642)
Examine and update spec -- callable pairs.
Revise run method.
2023-12-03 09:28:37 +00:00
Terry Jan Reedy e44f1940bd
gh-66819: More IDLE htest updates (#112574)
Revise htest.py docstring and move 2 specs to alphabetical position.
2023-12-01 07:02:31 +00:00
Terry Jan Reedy 81261fa67f
IDLE: fix config_key htest (#112545)
Change 'Dialog' to 'Window' in two places to match the name of the config_key class being tested.
2023-11-30 07:08:44 +00:00
Terry Jan Reedy 14fd86a59d
IDLE: Fix test_debugger bug and buildbot failures (#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.
2023-11-19 06:39:26 +00:00
Anthony Shaw adedcfa06b
gh-79871: IDLE - Fix and test debugger module (#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%.
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-11-18 23:20:38 -05:00
Nikita Sobolev cc18b886a5
gh-108303: Move config parser data to `Lib/test/configparserdata/` (gh-111879) 2023-11-09 14:52:32 +01:00
Serhiy Storchaka b8c20f9049
gh-97928: Change the behavior of tkinter.Text.count() (GH-98484)
It now always returns an integer if one or less counting options are specified.
Previously it could return a single count as a 1-tuple, an integer (only if
option "update" was specified) or None if no items found.
The result is now the same if wantobjects is set to 0.
2023-10-24 12:59:19 +03:00
Terry Jan Reedy 642eb8df95
gh-111050: IDLE - Simplify configdialog.HighPage.theme_elements (#111053)
Replace tuple value with internal name, removing numbers.
Remove sorting of already ordered dislay names.
Remove '[0]' indexing into now-gone tuple.
2023-10-19 00:03:24 -04:00
Terry Jan Reedy baefbb21d9
gh-103737: IDLE - Remove unneeded .keys() for dict iteration (#110960)
Add comments where .keys() is needed.
Leave debugger usages along because situation is unclear as indicated in expanded comment.
Most testing is manual.
2023-10-18 04:14:52 -04:00
Terry Jan Reedy eaa1eae55e
IDLE: Condense run.main threading.Thread start. (#106125)
Use daemon argument added in 3.3 and directly call .start.
Remove now unused 'sockthread' name.
2023-06-27 13:12:56 -04:00
Terry Jan Reedy bb3454c1a7
gh-102832: IDLE - update stackviewer open (#105528)
Use 'last_exc' instead of 'last_value' in 3.12/3.
2023-06-08 17:59:55 -04:00
Irit Katriel 3ee921d84f
gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer (#103339) 2023-06-08 21:19:05 +01:00
Pablo Galindo Salgado 3fdb55c482
gh-104972: Ensure that line attributes in tokens in the tokenize module are correct (#104975) 2023-05-26 15:46:22 +01:00
Pablo Galindo Salgado c8cf9b42eb
gh-104825: Remove implicit newline in the line attribute in tokens emitted in the tokenize module (#104846) 2023-05-24 09:59:18 +00:00
Terry Jan Reedy e561c09975
gh-104719: IDLE - test existence of all tokenize references. (#104767)
Class editor.IndentSearcher contains all editor references to tokenize module.
Module io tokenize reference cover those other modules.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-05-24 08:43:56 +00:00
Terry Jan Reedy 0c5e79bcdf
gh-104719: IDLE - delete useless monkeypatch of tokenize (#104726) 2023-05-21 18:42:26 +00:00