summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* [3.6] bpo-31130: IDLE -- stop leaks in test_configdialog. (GH-3016) (#3018)Terry Jan Reedy2017-08-072-38/+49
| | | | Initial patch by Victor Stinner. (cherry picked from commit 733d0f6)
* [3.6] bpo-29910: IDLE - revert `break`s that disabled calltip close. ↵Terry Jan Reedy2017-08-071-4/+4
| | | | | (GH-2997) (#3017) (cherry picked from commit 8922587)
* bpo-31029: test_tokenize Add missing import unittest (#2998)Rajath Agasthya2017-08-051-0/+1
|
* [3.6] bpo-31107: Fix copyreg mangled slot names calculation. (GH-2989) (#3003)Shane Harvey2017-08-052-1/+15
| | | (cherry picked from commit c4c9866064f03646c686d7e08b00aeb203c35c19)
* [3.6] bpo-31071: Avoid masking original TypeError in call with * unpacking ↵Serhiy Storchaka2017-08-031-0/+16
| | | | | | (GH-2957) (#2991) when other arguments are passed. (cherry picked from commit 25e4f77)
* [3.6] bpo-30978: str.format_map() now passes key lookup exceptions through. ↵Serhiy Storchaka2017-08-032-1/+8
| | | | | | (GH-2790) (#2992) Previously any exception was replaced with a KeyError exception. (cherry picked from commit 5075416)
* bpo-31061: fix crash in asyncio speedup module (GH-2984)INADA Naoki2017-08-022-0/+27
| | | (cherry picked from commit de34cbe9cdaaf7b85fed86f99c2fd071e1a7b1d2)
* [3.6] bpo-31083: IDLE: Describe the Page classes in configdialog (GH-2965) ↵Terry Jan Reedy2017-08-011-15/+27
| | | | | | | (#2973) Add template as comment. Update existing classes to match outline. Initial patch by Cheryl Sabella. (cherry picked from commit 6f446be)
* [3.6] bpo-25684: ttk.OptionMenu radiobuttons weren't unique (GH-2276) (#2959)csabella2017-07-312-1/+27
| | | | | | | between instances of OptionMenu. (cherry picked from commit a568e5273382a5dca0c27274f7d8e34c41a87d4d) * Update Misc/ACKS
* [3.6] bpo-31050: IDLE: Factor GenPage class from ConfigDialog (GH-2952) (#2955)Terry Jan Reedy2017-07-302-284/+267
| | | | | The slightly modified tests for the General tab continue to pass. Patch by Cheryl Sabella. (cherry picked from commit e8eb17b)
* [3.6] bpo-31004: IDLE: Factor out FontPage class from configdialog (step 1) ↵Terry Jan Reedy2017-07-302-239/+267
| | | | | | | | (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)
* [3.6] bpo-30928: Update IDLE News.txt. (GH-2948) (#2949)Terry Jan Reedy2017-07-301-2/+40
| | | (cherry picked from commit c3aa47f655abe564a2c2fb6d091ab19bdc0113b5)
* [3.6] bpo-31027: Fix test_listcomps failure when run directly (GH-2939) (#2945)Terry Jan Reedy2017-07-291-1/+1
| | | | Bug appears to be incomplete copy-paste-edit. (cherry picked from commit ceb93f4)
* [3.6] bpo-30781: IDLE - Use ttk Notebook in ConfigDialog (GH-2938) (#2944)Terry Jan Reedy2017-07-292-35/+42
| | | | | | 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)
* [3.6] bpo-30853: IDLE - touch-up configdialog.VarTrace and tests. (GH-2936) ↵Terry Jan Reedy2017-07-282-16/+23
| | | | | | | (#2937) Add clear method for tests. Adjust tests to use global instance. Remove unneeded ConfigDialog method. (cherry picked from commit 5d0f30a)
* [3.6] bpo-30853: IDLE: Convert font and general vars to use VarTrace ↵Terry Jan Reedy2017-07-281-62/+42
| | | | | | | | (GH-2914) (#2935) Instance tracers manages pairs consisting of a tk variable and a callback function. When tracing is turned on, setting the variable calls the function. Test coverage for the new class is 100%. (cherry picked from commit 5b59154)
* [3.6] bpo-31060: IDLE: Finish regrouping ConfigDialog methods (GH-2908) (#2925)Terry Jan Reedy2017-07-281-768/+772
| | | | Finish resorting the 72 ConfigDialog methods into 7 groups that represent the dialog, action buttons, and font, highlight, keys, general, and extension pages. This will help with continuing to add tests and improve the pages. It will enable splitting ConfigDialog into 6 or 7 more comprehensible classes. (cherry picked from commit b166080)
* bpo-31044: Skip test_posix.test_makedev() on FreeBSD (#2915) (#2917)Victor Stinner2017-07-271-0/+4
| | | | | | There is a bug in FreeBSD CURRENT with 64-bit dev_t. Skip the test if dev_t is larger than 32-bit, until the bug is fixed in FreeBSD CURRENT. (cherry picked from commit 12953ffe12ac781332b384c36b25d12216b1db62)
* bpo-31028: Fix test_pydoc when run directly (#2864) (#2910)Victor Stinner2017-07-271-1/+1
| | | | | | | | | | | * bpo-31028: Fix test_pydoc when run directly Fix get_pydoc_link() of test_pydoc to fix "./python Lib/test/test_pydoc.py": get the absolute path to __file__ to prevent relative directories. * Use realpath() instead of abspath() (cherry picked from commit fd46561167af6cd697191dd7ebb8c2fef5ad6493)
* [3.6] bpo-31003: IDLE - Add more tests for General tab (GH-2859) (#2906)Terry Jan Reedy2017-07-273-198/+379
| | | | | | | * 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)
* [3.6] bpo-30853: IDLE: Factor a VarTrace class from ↵Terry Jan Reedy2017-07-272-2/+147
| | | | | | | 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)
* bpo-30980: Fix double close in asyncore.file_wrapper (#2789) (#2898)Nir Soffer2017-07-262-2/+6
| | | | | | | | | | | | | | * bpo-30980: Fix close test to fail test_close_twice was not considering the fact that file_wrapper is duping the file descriptor. Closing the original descriptor left the duped one open, hiding the fact that close protection is not effective. * bpo-30980: Fix double close protection Invalidated self.fd before closing, handling correctly the case when os.close raises. * bpo-30980: Fix fd leak introduced in the fixed test
* [3.6] bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal ↵Dong-hee Na2017-07-262-1/+7
| | | | command (#1214) (#2886)
* [3.6] bpo-30822: Fix testing of datetime module. (GH-2530) (GH-2783) (#2816)Utkarsh Upadhyay2017-07-263-9/+14
| | | | | | | | | | | | * [3.6] bpo-30822: Fix testing of datetime module. (GH-2530) (GH-2783) Only C implementation was tested. (cherry picked from commit 287c5594edc1ca08db64d1f4739cc36bfe75ae75) * [3.6] bpo-30822: Fix testing of datetime module. (GH-2530) (GH-2783) Only C implementation was tested.. (cherry picked from commit 287c5594edc1ca08db64d1f4739cc36bfe75ae75)
* [3.6] bpo-30595: Fix multiprocessing.Queue.get(timeout) (#2027) (#2881)Victor Stinner2017-07-261-1/+1
| | | | | | | | | | | | | | | | | | * bpo-30595: Fix multiprocessing.Queue.get(timeout) (#2027) multiprocessing.Queue.get() with a timeout now polls its reader in non-blocking mode if it succeeded to aquire the lock but the acquire took longer than the timeout. Co-Authored-By: Grzegorz Grzywacz <grzgrzgrz3@gmail.com> (cherry picked from commit 1b7863c3b6519c6e134c28cab8b8af0dea43e375) * bpo-30595: Increase test_queue_feeder_donot_stop_onexc() timeout (#2148) _test_multiprocessing.test_queue_feeder_donot_stop_onexc() now uses a timeout of 1 second on Queue.get(), instead of 0.1 second, for slow buildbots. (cherry picked from commit 8f6eeaf21cdf4aea25fdefeec814a1ce07453fe9)
* bpo-30845: Enhance test_concurrent_futures cleanup (#2564) (#2880)Victor Stinner2017-07-262-1/+9
| | | | | | | | | | | | * bpo-30845: reap_children() now logs warnings * bpo-30845: Enhance test_concurrent_futures cleanup In setUp() and tearDown() methods of test_concurrent_futures tests, make sure that tests don't leak threads nor processes. Clear explicitly the reference to the executor to make it that it's destroyed (to prevent "dangling threads" warning). (cherry picked from commit 3df9dec425b0254df1cdf41922fd8d6b08bf47e4)
* [3.6] bpo-26762, bpo-31019: Backport multiprocessing fixes from master to ↵Victor Stinner2017-07-262-24/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3.6 (#2879) * bpo-26762: Avoid daemon process in _test_multiprocessing (#2842) test_level() of _test_multiprocessing._TestLogging now uses regular processes rather than daemon processes to prevent zombi processes (to not "leak" processes). (cherry picked from commit 06634950c553f8df83330ed468c11483b857b7dc) * test_multiprocessing: Fix dangling process/thread (#2850) bpo-26762: Fix more dangling processes and threads in test_multiprocessing: * Queue: call close() followed by join_thread() * Process: call join() or self.addCleanup(p.join) (cherry picked from commit d7e64d9934d86aa6173229de5af5fe908662a33a) * test_multiprocessing detects dangling per test case (#2841) bpo-26762: test_multiprocessing now detects dangling processes and threads per test case classes: * setUpClass()/tearDownClass() of mixin classes now check if multiprocessing.process._dangling or threading._dangling was modified to detect "dangling" processses and threads. * ManagerMixin.tearDownClass() now also emits a warning if it still has more than one active child process after 5 seconds. * tearDownModule() now checks for dangling processes and threads before sleep 500 ms. And it now only sleeps if there is a least one dangling process or thread. (cherry picked from commit ffb49408f0780ae80a553208aa133bc5bb3ba129) * bpo-26762: test_multiprocessing close more queues (#2855) * Close explicitly queues to make sure that we don't leave dangling threads * test_queue_in_process(): remove unused queue * test_access() joins also the process to fix a random warning (cherry picked from commit b4c52966c810b5c5e088fceff403247f610b7d13) * bpo-31019: Fix multiprocessing.Process.is_alive() (#2875) multiprocessing.Process.is_alive() now removes the process from the _children set if the process completed. The change prevents leaking "dangling" processes. (cherry picked from commit 2db64823c20538a6cfc6033661fab5711d2d4585)
* bpo-31034: Reliable signal handler for test_asyncio (#2867) (#2876)Victor Stinner2017-07-262-31/+45
| | | | | | | | | | * bpo-31034: Reliable signal handler for test_asyncio Don't rely on the current SIGHUP signal handler, make sure that it's set to the "default" signal handler: SIG_DFL. * Add comments (cherry picked from commit 830080913c22a9834d310294b9f7653234dc6a59)
* bpo-30908: Fix dangling thread in test_os.TestSendfile (#2680) (#2844)Victor Stinner2017-07-241-0/+1
| | | | | | | | | | | | | | tearDown() now clears explicitly the self.server variable to make sure that the thread is completely cleared when tearDownClass() checks if all threads have been cleaned up. Fix the following warning: $ ./python -m test --fail-env-changed -m test.test_os.TestSendfile.test_keywords -R 3:1 test_os (...) Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) (...) Tests result: ENV CHANGED (cherry picked from commit d1cc037d1442cc35d1b194ec8e50901514360949)
* [3.6] bpo-30993: IDLE - Improve configdialog font page and tests. (GH-2831) ↵Terry Jan Reedy2017-07-242-197/+213
| | | | | | | | (#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)
* [3.6] bpo-30993: IDLE - Improve configdialog font page and tests. (GH-2818) ↵Terry Jan Reedy2017-07-232-56/+63
| | | | | | | | | | (#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)
* [3.6] Make test_shutil test_disk_usage not depend on the cwd fs (GH-2597) ↵Gregory P. Smith2017-07-231-1/+1
| | | | | | (#2820) Make test_shutil test_disk_usage not depend on the current working directory's filesystem. (cherry picked from commit 529746c90584069270cd122920270bd7be38bca3)
* [3.6] bpo-30981: IDLE -- Add more configdialog font page tests. (GH-… (#2796)Terry Jan Reedy2017-07-222-65/+75
| | | | | | | | 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.
* [3.6] bpo-29403: Fix mock's broken autospec behavior on method-bound builtin ↵Berker Peksag2017-07-212-1/+16
| | | | | | | | | | | | | | | | | | | | | functions (GH-3) Cython will, in the right circumstances, offer a MethodType instance where im_func is a builtin function. Any instance of MethodType is automatically assumed to be a Python-defined function (more specifically, a function that has an inspectable signature), but _set_signature was still conservative in its assumptions. As a result _set_signature would return early with None instead of a mock since the im_func had no inspectable signature. This causes problems deeper inside mock, as _set_signature is assumed to _always_ return a mock, and nothing checked its return value. In similar corner cases, autospec will simply not check the spec of the function, so _set_signature is amended to now return early with the original, not-wrapped mock object. Patch by Aaron Gallagher. (cherry picked from commit 856cbcc12f2e4cca93af5dc7ed6bcea4dd942f10)
* bpo-30891: Fix again importlib _find_and_load() (#2665) (#2801)Victor Stinner2017-07-211-5/+5
| | | | | | | | | | Use sys.modules.get() in the "with _ModuleLockManager(name):" block to protect the dictionary key with the module lock and use an atomic get to prevent race condition. Remove also _bootstrap._POPULATE since it was unused (_bootstrap_external now has its own _POPULATE object), add a new _SENTINEL object instead. (cherry picked from commit e72b1359f81d1dd42bd8a5c5cc2b3928b74f8023)
* [3.6] bpo-28523: IDLE: Use 'color' instead of 'colour'. (GH-2787) (#2791)Terry Jan Reedy2017-07-211-54/+54
| | | (cherry picked from commit a54a8f1)
* bpo-30822: Exclude tzdata from regrtest --all (#2775) (#2777)Victor Stinner2017-07-203-5/+25
| | | | | | | | | | | | | | When running the test suite using --use=all / -u all, exclude tzdata since it makes test_datetime too slow (15-20 min on some buildbots) which then times out on some buildbots. -u tzdata must now be enabled explicitly, -u tzdata or -u all,tzdata, to run all test_datetime tests. Fix also regrtest command line parser to allow passing -u extralargefile to run test_zipfile64. Travis CI: remove -tzdata. Replace -u all,-tzdata,-cpu with -u all,-cpu since tzdata is now excluded from -u all. (cherry picked from commit 5b392bbaeb9d9b1db961ecfc7315d8c8662c27f6)
* [3.6] bpo-30917: IDLE: Add config.IdleConf unittests (GH-2691) (#2753)terryjreedy2017-07-202-18/+457
| | | | | | | | | 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)
* [3.6] bpo-30883: Use pythontest.net instead of debian.org in test_urllib2net ↵Ammar Askar2017-07-201-3/+3
| | | | (GH-2755)
* [3.6] bpo-30936: Fix a reference leak in json when fail to sort keys. ↵Serhiy Storchaka2017-07-161-0/+4
| | | | | (GH-2712). (#2727) (cherry picked from commit 49f6449ef4b81537c19b82329caaf60596c516c2)
* [3.6] bpo-30876: Relative import from unloaded package now reimports the ↵Serhiy Storchaka2017-07-165-8/+22
| | | | | | | | | package (GH-2639) (#2676) instead of failing with SystemError. Relative import from non-package now fails with ImportError rather than SystemError. (cherry picked from commit 8a9cd20edca7d01b68292036029ae3735ce65edd)
* [3.6] bpo-30934: Document coverage details for idlelib tests (GH-2711) (#2726)terryjreedy2017-07-161-0/+56
| | | | | | * 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)
* [3.6] Update idlelib/NEWS.txt. (GH-2703) (#2704)terryjreedy2017-07-141-0/+31
| | | (cherry picked from commit 0d0a32f)
* [3.6] bpo-30913: IDLE: Document tk vars, attributes, and methods for ↵terryjreedy2017-07-141-45/+437
| | | | | | | ConfigDialog (GH-2697) (#2702) The will help writing dialog improvements and splitting the class into multiple classes. Original patch by Cheryl Sabella. (cherry picked from commit 36329a4)
* [3.6] bpo-30870: IDLE: Add configdialog fontlist selection unittest ↵terryjreedy2017-07-143-29/+108
| | | | | | (GH-2666) (#2701) Initial patch by Louie Lu. (cherry picked from commit 9b622fb)
* [3.6] bpo-30911: Add tests for bad boolean arguments for accelerated json ↵Serhiy Storchaka2017-07-131-0/+22
| | | | | | (GH-2690) (#2692) encoder and decoder. (cherry picked from commit d3aaa2f)
* [3.6] bpo-30899: Add unittests, 100% coverage, for IDLE's two ConfigParser ↵terryjreedy2017-07-123-30/+197
| | | | | | subclasses. (GH-2662) (#2685) Patch by Louie Lu. (cherry picked from commit 50c9435)
* [3.6] bpo-30779: IDLE: fix changes.delete_section calls in configdialog ↵terryjreedy2017-07-113-5/+9
| | | | | | | (GH-2667) (#2674) Also improve test of config.ConfigChanges.delete_section. Original patch by Cheryl Sabella. (cherry picked from commit 6d13b22)
* [3.6] bpo-30881: IDLE: add docstrings to browser.py (GH-2638) (#2663)terryjreedy2017-07-111-4/+93
| | | | Patch by Cheryl Sabella. (cherry picked from commit ba35227)
* [3.6] bpo-30870: IDLE -- fix logic error in eae2537. (GH-2660) (#2661)terryjreedy2017-07-111-2/+5
| | | (cherry picked from commit 5b62b35)