Commit Graph

218 Commits

Author SHA1 Message Date
Miss Islington (bot) 82adaf5ffe Fix idlelib comment typos reported by Mike on pull request 4803. (GH-4807) (#4809)
(cherry picked from commit e570211406)
2017-12-11 23:29:34 -05:00
Terry Jan Reedy ae3c5c7b9e
[3.6] bpo-32100: IDLE: Fix pathbrowser errors; improve tests. (GH-4484) (#4512)
Patch mostly by Cheryl Sabella.
(cherry picked from commit 20d48a44a5)
2017-11-22 20:05:35 -05:00
Terry Jan Reedy 646e4c8fcc
[3.6] Fix miscellaneous typos in idlelib (GH-4275) (#4291)
Manual partial backport of patch that fixed nearly 50 other files.
2017-11-05 20:30:06 -05:00
Miss Islington (bot) 6a2957de08 bpo-31860: Make the font sample in the IDLE font configuration dialog editable. (GH-4106) (#4154)
Changes persist while IDLE remains open
(cherry picked from commit ed6554c487)
2017-10-27 20:59:38 -04:00
Miss Islington (bot) 2712247ec9 [3.6] bpo-28603: Fix formatting tracebacks for unhashable exceptions (GH-4014) (#4024)
(cherry picked from commit de86073a76)
2017-10-18 01:14:19 +03:00
Terry Jan Reedy 0fee56c863 [3.6] bpo-25588: Document autotest in idle_test/README.txt. (GH-4000) (#4001)
Follow-up to Victor's patch that enabled autotest to run in IDLE's Shell.
(cherry picked from commit 620f70e)
2017-10-14 23:16:57 -04:00
Terry Jan Reedy c8198c9232 [3.6] bpo-31460: Simplify the API of IDLE's Module Browser. (GH-3842) (#3843)
Passing a widget instead of an flist with a root widget opens the option of
creating a browser frame that is only part of a window. Passing a full file
name instead of pieces assumed to come from a .py file opens the possibility
of browsing python files that do not end in .py.
(cherry picked from commit d6bb65f)
2017-09-30 20:32:29 -04:00
Miss Islington (bot) b650194652 [3.6] bpo-31459: Rename IDLE's module browser from Class Browser to Module Browser. (GH-3704) (#3710)
The original module-level class and method browser became a module
browser, with the addition of module-level functions, years ago.
Nested classes and functions were added yesterday.  For back-
compatibility, the virtual event <<open-class-browser>>, which
appears on the Keys tab of the Settings dialog, is not changed.
Patch by Cheryl Sabella.
(cherry picked from commit cd99e79dc7)
2017-09-23 17:16:47 -04:00
Miss Islington (bot) 429b3b1188 [3.6] bpo-31559: Remove test order dependence in idle_test.test_browser. (GH-3708) (#3709)
Order dependence caused leak-test buildbots to fail when running test_idle repeatedly.
(cherry picked from commit 99167f85b7)
2017-09-23 15:24:18 -04:00
Terry Jan Reedy fa1cae5832 [3.6] bpo-1612262: IDLE: Class Browser shows nested functions, classes (GH-2573) (#3702)
Original patches for code and tests by Guilherme Polo and
Cheryl Sabella, respectively.

(cherry picked from commit 058de11360)
2017-09-22 17:28:01 -04:00
Miss Islington (bot) 77b52e463a [3.6] bpo-31488: IDLE - update former extensions when options change. (GH-3612) (#3613)
When apply ConfigDialog changes, call .reload on each class with non-key options.
Change ParenMatch so that updates affect current instances.
(cherry picked from commit 5777ecc438)
2017-09-16 02:14:34 -04:00
Terry Jan Reedy 93d5f91fff [3.6] bpo-31462: IDLE - remove trailing whitespaces (GH-3564) (#3594)
Reproduction of Idlelib changes in Serhiy's 3.7 patch.
2017-09-14 22:52:16 -04:00
Miss Islington (bot) 7b62416d86 [3.6] bpo-31480: IDLE - fix tests to pass with zzdummy extension disabled. (GH-3590) (#3591)
Enabled by default was a temporary expedient.  The fix is to add a user override to enable.
(cherry picked from commit d384a81f55)
2017-09-14 20:34:42 -04:00
Miss Islington (bot) 31b242459c [3.6] bpo-31414: IDLE -- fix tk entry box tests by deleting first. (GH-3501) (#3502)
Adding to an int entry is not the same as deleting and inserting
because int('') will fail.
(cherry picked from commit 667522efa8)
2017-09-11 16:34:11 -04:00
Terry Jan Reedy d6c397bf77 [3.6] bpo-27099: IDLE - Convert built-in extensions to regular features (GH-2494) (#3487)
About 10 IDLE features were implemented as supposedly optional
extensions.  Their different behavior could be confusing or worse for
users and not good for maintenance.  Hence the conversion.

The main difference for users is that user configurable key bindings
for builtin features are now handled uniformly.  Now, editing a binding
in a keyset only affects its value in the keyset.  All bindings are
defined together in the system-specific default keysets in config-
extensions.def.  All custom keysets are saved as a whole in config-
extension.cfg.  All take effect as soon as one clicks Apply or Ok.

The affected events are '<<force-open-completions>>', '<<expand-word>>',
'<<force-open-calltip>>', '<<flash-paren>>', '<<format-paragraph>>',
'<<run-module>>', '<<check-module>>', and '<<zoom-height>>'.  Any
(global) customizations made before 3.6.3 will not affect their keyset-
specific customization after 3.6.3. and vice versa.

Inital patch by Charles Wohlganger, revised by Terry Jan Reedy.
(cherry picked from commit 58fc71c)
2017-09-10 20:30:46 -04:00
Terry Jan Reedy 5c89c2fd8a [3.6] bpo-30617: IDLE: docstrings and unittest for outwin.py (GH-2046) (#3223)
Move some data and functions from the class to module level. Patch by Cheryl Sabella.
(cherry picked from commit 998f496)
2017-08-27 18:29:24 -04:00
Terry Jan Reedy 7e248904cd [3.6] bpo-31287: IDLE - do not alter tkinter.messagebox in configdialog tests. (GH-3220) (#3221)
(cherry picked from commit 3457f42)
2017-08-27 17:14:19 -04:00
Terry Jan Reedy 7b556025ff [3.6] bpo-30781: IDLE - use ttk widgets in configdialog (GH-2654) (#3214)
Patch by Cheryl Sabella.
(cherry picked from commit 7028e59)
2017-08-26 16:12:14 -04:00
Cheryl Sabella 3d9c0d498d [3.6] bpo-31206: IDLE: Factor HighPage class from ConfigDialog (GH-3156) (#3159)
Patch 2 of 3, to avoid horrendous diff.  Create highlights page from new HighPage class instead of old ConfigDialog methods and change tests to match. Patch by Cheryl Sabella.
(cherry picked from commit 8f7a798edb)
2017-08-20 08:03:05 -04:00
Terry Jan Reedy 6db2edbe05 [3.6] bpo-31001: IDLE: Add tests for configdialog highlight tab (GH-3123) (#3124)
(cherry picked from commit 82aff62)
2017-08-17 21:02:20 -04:00
Terry Jan Reedy ff4b222b02 [3.6] bpo-31205: IDLE: Factor KeysPage class from ConfigDialog (GH-3096) (#3097)
* bpo-31205: IDLE: Factor KeysPage class from ConfigDialog (#3096)

  The slightly modified tests continue to pass.  Patch by Cheryl Sabella.

(cherry picked from commit e36d9f5568)

* [3.6] bpo-31205: IDLE: Factor KeysPage class from ConfigDialog (GH-3096)

  The slightly modified tests continue to pass.  Patch by Cheryl Sabella..
(cherry picked from commit e36d9f5568)
2017-08-15 19:13:11 -04:00
Terry Jan Reedy a31459008c [3.6] bpo-31002: IDLE: Add tests for configdialog keys tab (GH-2996) (#3092)
Patch by Cheryl Sabella.
(cherry picked from commit 2f89646)
2017-08-14 21:45:02 -04:00
Terry Jan Reedy 646f6c3096 [3.6] bpo-19903: IDLE: Calltips changed to use inspect.signature (GH-2822) (#3053)
Idlelib.calltips.get_argspec now uses inspect.signature instead of inspect.getfullargspec, like help() does.  This improves the signature in the call tip in a few different cases, including builtins converted to provide a signature.  A message is added if the object is not callable, has an invalid signature, or if it has positional-only parameters.
Patch by Louie Lu..
(cherry picked from commit 3b0f620c1a)
2017-08-10 00:46:29 -04:00
Terry Jan Reedy 9d7d928b58 [3.6] bpo-31130: IDLE -- stop leaks in test_configdialog. (GH-3016) (#3018)
Initial patch by Victor Stinner.
(cherry picked from commit 733d0f6)
2017-08-07 15:20:03 -04:00
Terry Jan Reedy 8c4e5be1df [3.6] bpo-31050: IDLE: Factor GenPage class from ConfigDialog (GH-2952) (#2955)
The slightly modified tests for the General tab continue to pass.
Patch by Cheryl Sabella.
(cherry picked from commit e8eb17b)
2017-07-30 19:02:51 -04:00
Terry Jan Reedy 7582226a92 [3.6] bpo-31004: IDLE: Factor out FontPage class from configdialog (step 1) (GH-2905) (#2950)
The slightly modified tests continue to pass. The General test
broken by the switch to Notebook is fixed.
Patch mostly by Cheryl Sabella.
(cherry picked from commit 9397e2a)
2017-07-30 15:00:50 -04:00
Terry Jan Reedy 8364feff67 [3.6] bpo-30781: IDLE - Use ttk Notebook in ConfigDialog (GH-2938) (#2944)
The notebook looks a bit better.  It will work better with separate page classes. Traversal of widgets by Tab works better.  Switching tabs with keys becomes possible.  The font sample box works better at large font sizes.

One of the two simulated click tests no longer works.  This will be investigated while fixing a bug with the widget itself.
(cherry picked from commit b331f80)
2017-07-29 01:28:05 -04:00
Terry Jan Reedy ecc80b3f1b [3.6] bpo-30853: IDLE - touch-up configdialog.VarTrace and tests. (GH-2936) (#2937)
Add clear method for tests.  Adjust tests to use global instance.
Remove unneeded ConfigDialog method.
(cherry picked from commit 5d0f30a)
2017-07-28 18:36:30 -04:00
Terry Jan Reedy 0c4c65104c [3.6] bpo-31003: IDLE - Add more tests for General tab (GH-2859) (#2906)
* In configdialog: Document causal pathways in create_page_general.
Move related functions to follow this. Simplify some attribute names.
* In test_configdialog: Add tests for load and helplist functions.
Coverage for the general tab is now complete, and 63% overall.
(cherry picked from commit 2bc8f0e)
2017-07-26 21:41:26 -04:00
Terry Jan Reedy 0243bea55d [3.6] bpo-30853: IDLE: Factor a VarTrace class from configdialog.ConfigDialog. (GH-2872) (#2903)
The new class manages pairs of tk Variables and trace callbacks.
It is completely covered by new tests.
(cherry picked from commit 45bf723)
2017-07-26 20:53:13 -04:00
Terry Jan Reedy 1daeb25979 [3.6] bpo-30993: IDLE - Improve configdialog font page and tests. (GH-2831) (#2834)
In configdialog: Document causal pathways in create_font_tab docstring.  Simplify some attribute names. Move set_samples calls to var_changed_font (idea from Cheryl Sabella).  Move related functions to positions after the create widgets function.

In test_configdialog: Fix test_font_set so not order dependent.  Fix renamed test_indent_scale so it tests the widget.  Adjust tests for movement of set_samples call.  Add tests for load functions.  Put all font tests in one class and tab indent tests in another.  Except for two lines, these tests completely cover the related functions.
(cherry picked from commit 77e97ca)
2017-07-24 02:50:28 -04:00
Terry Jan Reedy 5aa3bf041d [3.6] bpo-30993: IDLE - Improve configdialog font page and tests. (GH-2818) (#2826)
* Document causal event pathways in docstring.
* Simplify some attribute names.
* Rename test_bold_toggle_set_samples to make test_font_set fail.
* Fix test_font_set so not order dependent.
* Fix renamed test_indent_scale so it tests the widget.
(cherry picked from commit 07ba305)
2017-07-23 14:18:27 -04:00
Terry Jan Reedy 04864b491e [3.6] bpo-30981: IDLE -- Add more configdialog font page tests. (GH-… (#2796)
Verify that clicking the bold checkbutton and calling its command, set_samples, changes the bold setting of both samples. Simplify some names in configdialog.
(cherry picked from commit d0969d6)
(Incorporates changes and fixes from PRs 2798,  7c5798e, and 2810, 616ecf1)

* Fix broken test with PR2798 and PR2810 changes.
2017-07-22 00:56:18 -04:00
terryjreedy 65c24c8467 [3.6] bpo-30917: IDLE: Add config.IdleConf unittests (GH-2691) (#2753)
Patch by Louie Lu.
(cherry picked from commit f776eb0)
(includes diffs of  ed014f7 and 9f9192a)
* fix config reset from pr 2754

* Fix test_get_font (from pr 2769)
2017-07-20 01:23:00 -04:00
terryjreedy 65de1f3672 [3.6] bpo-30934: Document coverage details for idlelib tests (GH-2711) (#2726)
* Add section to idlelib/idle-test/README.txt.
* Include check that branches are taken both ways.
* Exclude IDLE-specific code that does not run during unit tests.
(cherry picked from commit 95bebb7)
2017-07-16 00:39:59 -04:00
terryjreedy 42abf7f973 [3.6] bpo-30870: IDLE: Add configdialog fontlist selection unittest (GH-2666) (#2701)
Initial patch by Louie Lu.
(cherry picked from commit 9b622fb)
2017-07-13 22:24:55 -04:00
terryjreedy a9bf62cadf [3.6] bpo-30899: Add unittests, 100% coverage, for IDLE's two ConfigParser subclasses. (GH-2662) (#2685)
Patch by Louie Lu.
(cherry picked from commit 50c9435)
2017-07-12 14:42:37 -04:00
terryjreedy c0179483f1 [3.6] bpo-30779: IDLE: fix changes.delete_section calls in configdialog (GH-2667) (#2674)
Also improve test of config.ConfigChanges.delete_section.
Original patch by Cheryl Sabella.
(cherry picked from commit 6d13b22)
2017-07-11 19:50:10 -04:00
terryjreedy edc034221f [3.6] bpo-30779: IDLE -- Factor ConfigChanges class from configdialog, put in config; test. (GH-2612) (#2625)
* In config, put dump test code in a function; run it and unittest in 'if __name__ == '__main__'.
* Add class config.ConfigChanges based on changes_class_v4.py on bpo issue.
* Add class test_config.ChangesTest, partly based on configdialog_tests_v1.py on bpo issue.
* Revise configdialog to use ConfigChanges, mostly as specified in tracker msg297804.
* Revise test_configdialog to match configdialog changes.  All tests pass in both files.
* Remove configdialog functions unused or moved to ConfigChanges.
Cheryl Sabella contributed parts of the patch.
(cherry picked from commit 349abd9)
2017-07-07 16:37:39 -04:00
terryjreedy df0f993298 [3.6] bpo-30780: Fix error in idlelib.test_idle.test_configdialog (GH-2606) (#2613)
(cherry picked from commit 25a4206)
2017-07-06 23:16:31 -04:00
terryjreedy 6f31717c47 [3.6] bpo-30495: IDLE: improve textview with docstrings, PEP8 names, more tests. (GH-2283) (#2496)
Split TextViewer class into ViewWindow, ViewFrame, and TextFrame classes so that instances
of the latter two can be placed with other widgets within a multiframe window.
Patch by Cheryl Sabella.
(cherry picked from commit 42bc8be)
2017-06-29 19:15:18 -04:00
terryjreedy af68382f68 [3.6] bpo-30723: IDLE -- Enhance parenmatch; add style, flash, and help (GH-2306) (#2460)
* Add 'parens' style to highlight both opener and closer.
* Make 'default' style, which is not default, a synonym for 'opener'.
* Make time-delay work the same with all styles.
* Add help for config dialog extensions tab, including parenmatch.
* Add new tests.
Original patch by Charles Wohlganger.
(cherry picked from commit fae2c35)
2017-06-27 23:02:19 -04:00
terryjreedy 93b88e9953 [3.6] bpo-21519: IDLE basic custom key entry better detects duplicates. (GH-2428) (#2433)
Original patch by Saimadhav Heblikar.
(cherry picked from commit 44913e5)
2017-06-27 01:58:18 -04:00
terryjreedy 8bdc3bd3d6 [3.6] bpo-29910: IDLE no longer deletes a character after commenting out a region (GH-825) (#2429)
This happened because shortcut has a class binding and 'break' was not returned.
Fix other potential conflicts between IDLE and default key bindings.

* Add news item

* Update NEWS
(cherry picked from commit 213ce12)
2017-06-27 01:53:40 -04:00
terryjreedy 8047f02a4b [3.6] bpo-24813: IDLE: Add build bitness to About Idle title (GH-2380) (#2426)
Patch by Cheryl Sabella.
(cherry picked from commit 9a02ae3)
2017-06-26 23:09:45 -04:00
terryjreedy 938e73809d [3.6] bpo-30728: IDLE: Refactor configdialog to PEP8 names (GH-2307) (#2421)
Also, change '*' in the tkinter import to an explicit list of names.
Patch by Cheryl Sabella.
(cherry picked from commit bac7d33)
2017-06-26 20:48:39 -04:00
terryjreedy 64a0c266e7 [3.6] bpo-6739: IDLE: Check for valid keybinding in config_keys (GH-2377) (#2397)
Verify user-entered key sequences by trying to bind them with tk.
Add tests for all 3 validation functions.
Original patch by G Polo.  Tests added by Cheryl Sabella.
(cherry picked from commit 8c78aa7)
2017-06-26 01:21:02 -04:00
terryjreedy bd570f4211 [3.6] bpo-24813: IDLE: Add default title to help_about (GH-2366) (#2369)
Patch by Cheryl Sabella.
(cherry picked from commit 18ede06)
2017-06-23 20:19:46 -04:00
terryjreedy 1b7474dedc [3.6] bpo-24813: IDLE: Add icon to help_about (GH-2335) (#2359)
Patch by Cheryl Sabella
(cherry picked from commit d352d68)
2017-06-23 12:59:59 -04:00
terryjreedy d92ee3ea62 [3.6]bpo-27922: Stop gui flash from idle_test.test_parenmatch (#2171) (#2172)
For unknown reasons, this does not work when running leak tests.
(cherry picked from commit 049cf2bb44)
2017-06-13 15:40:59 -04:00