]> granicus.if.org Git - python/log
python
7 years ago[3.6] bpo-30853: IDLE - touch-up configdialog.VarTrace and tests. (GH-2936) (#2937)
Terry Jan Reedy [Fri, 28 Jul 2017 22:36:30 +0000 (18:36 -0400)]
[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)

7 years ago[3.6] bpo-30853: IDLE: Convert font and general vars to use VarTrace (GH-2914) (...
Terry Jan Reedy [Fri, 28 Jul 2017 19:42:43 +0000 (15:42 -0400)]
[3.6] bpo-30853: IDLE: Convert font and general vars to use VarTrace (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)

7 years ago[3.6] bpo-31060: IDLE: Finish regrouping ConfigDialog methods (GH-2908) (#2925)
Terry Jan Reedy [Fri, 28 Jul 2017 00:50:39 +0000 (20:50 -0400)]
[3.6] bpo-31060: IDLE: Finish regrouping ConfigDialog methods (GH-2908) (#2925)

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)

7 years agobpo-31044: Skip test_posix.test_makedev() on FreeBSD (#2915) (#2917)
Victor Stinner [Thu, 27 Jul 2017 16:42:11 +0000 (18:42 +0200)]
bpo-31044: Skip test_posix.test_makedev() on FreeBSD (#2915) (#2917)

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)

7 years agobpo-31028: Fix test_pydoc when run directly (#2864) (#2910)
Victor Stinner [Thu, 27 Jul 2017 16:05:46 +0000 (18:05 +0200)]
bpo-31028: Fix test_pydoc when run directly (#2864) (#2910)

* 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)

7 years ago[3.6] bpo-30814, bpo-30876: Add new import test files to projects. (GH-2851). (#2912)
Serhiy Storchaka [Thu, 27 Jul 2017 10:15:59 +0000 (13:15 +0300)]
[3.6] bpo-30814, bpo-30876: Add new import test files to projects. (GH-2851). (#2912)

(cherry picked from commit d5ed47dea25e04a3a144eddf99a4ac4a29242dbc)

7 years ago[3.6] bpo-31003: IDLE - Add more tests for General tab (GH-2859) (#2906)
Terry Jan Reedy [Thu, 27 Jul 2017 01:41:26 +0000 (21:41 -0400)]
[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)

7 years ago[3.6] bpo-30853: IDLE: Factor a VarTrace class from configdialog.ConfigDialog. ...
Terry Jan Reedy [Thu, 27 Jul 2017 00:53:13 +0000 (20:53 -0400)]
[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)

7 years agobpo-30980: Fix double close in asyncore.file_wrapper (#2789) (#2898)
Nir Soffer [Wed, 26 Jul 2017 23:27:08 +0000 (02:27 +0300)]
bpo-30980: Fix double close in asyncore.file_wrapper (#2789) (#2898)

* 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

7 years agoFix build batch files (#2750) (#2897)
Steve Dower [Wed, 26 Jul 2017 21:20:41 +0000 (14:20 -0700)]
Fix build batch files (#2750) (#2897)

* Enable building MSI, zip and nuget packages when Py_OutDir is set.

* Restore the --build option, which got reverted at some point.

* Ensure output directory is created.

* Enables BuildForDaily and DailyBuildVersion options for nuget package.

7 years ago[3.6] bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal command...
Dong-hee Na [Wed, 26 Jul 2017 12:11:25 +0000 (21:11 +0900)]
[3.6] bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal command (#1214) (#2886)

7 years ago[3.6] bpo-30822: Fix testing of datetime module. (GH-2530) (GH-2783) (#2816)
Utkarsh Upadhyay [Wed, 26 Jul 2017 11:49:16 +0000 (13:49 +0200)]
[3.6] bpo-30822: Fix testing of datetime module. (GH-2530) (GH-2783) (#2816)

* [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)

7 years agoAdd the link to asyncio source code in the docs (GH-2373) (GH-2884)
Mariatta [Wed, 26 Jul 2017 04:05:17 +0000 (21:05 -0700)]
Add the link to asyncio source code in the docs (GH-2373) (GH-2884)

(cherry picked from commit 627d2c8e8dc9cfe6c1cdfd9b34899eb30b600a88)

7 years ago[3.6] bpo-30595: Fix multiprocessing.Queue.get(timeout) (#2027) (#2881)
Victor Stinner [Wed, 26 Jul 2017 03:38:22 +0000 (05:38 +0200)]
[3.6] bpo-30595: Fix multiprocessing.Queue.get(timeout) (#2027) (#2881)

* 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)

7 years agobpo-30845: Enhance test_concurrent_futures cleanup (#2564) (#2880)
Victor Stinner [Wed, 26 Jul 2017 03:05:09 +0000 (05:05 +0200)]
bpo-30845: Enhance test_concurrent_futures cleanup (#2564) (#2880)

* 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)

7 years ago[3.6] bpo-26762, bpo-31019: Backport multiprocessing fixes from master to 3.6 (#2879)
Victor Stinner [Wed, 26 Jul 2017 02:48:56 +0000 (04:48 +0200)]
[3.6] bpo-26762, bpo-31019: Backport multiprocessing fixes from master to 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)

7 years agobpo-31034: Reliable signal handler for test_asyncio (#2867) (#2876)
Victor Stinner [Wed, 26 Jul 2017 00:33:47 +0000 (02:33 +0200)]
bpo-31034: Reliable signal handler for test_asyncio (#2867) (#2876)

* 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)

7 years agobpo-26506: hex() documentation: mention %x % int (GH-2525) (GH-2870)
Mariatta [Tue, 25 Jul 2017 18:04:08 +0000 (11:04 -0700)]
bpo-26506: hex() documentation: mention %x % int (GH-2525) (GH-2870)

(cherry picked from commit 67ba4fa467ffff825d6a0c0a21cc54ff1df2ed1b)

7 years ago[3.6] bpo-31018: Switch to GH-pragma pack from __declspec(align) (GH-2848) (#2868)
Segev Finer [Tue, 25 Jul 2017 17:20:38 +0000 (20:20 +0300)]
[3.6] bpo-31018: Switch to GH-pragma pack from __declspec(align) (GH-2848) (#2868)

(cherry picked from commit 39243779f4c97ec6f700fa73c007ca66dfa9408e)

7 years ago[3.6] Minor typo in curses.rst (GH-2763) (#2853)
Terry Jan Reedy [Mon, 24 Jul 2017 22:54:53 +0000 (18:54 -0400)]
[3.6] Minor typo in curses.rst (GH-2763) (#2853)

I found a tiny typo in the curses how-to: changed 'Thy' to 'The' on line 68.
(cherry picked from commit d439d3e)

7 years agobpo-30908: Fix dangling thread in test_os.TestSendfile (#2680) (#2844)
Victor Stinner [Mon, 24 Jul 2017 15:40:50 +0000 (17:40 +0200)]
bpo-30908: Fix dangling thread in test_os.TestSendfile (#2680) (#2844)

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)

7 years ago[3.6] bpo-30993: IDLE - Improve configdialog font page and tests. (GH-2831) (#2834)
Terry Jan Reedy [Mon, 24 Jul 2017 06:50:28 +0000 (02:50 -0400)]
[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)

7 years agoMac installer build now needs venv for docs build (#2828) (#2830)
Ned Deily [Sun, 23 Jul 2017 21:10:40 +0000 (17:10 -0400)]
Mac installer build now needs venv for docs build (#2828) (#2830)

(cherry picked from commit 4c7532e96da19f2d5543bdab2b972797699c37d5)

7 years ago[3.6] bpo-30993: IDLE - Improve configdialog font page and tests. (GH-2818) (#2826)
Terry Jan Reedy [Sun, 23 Jul 2017 18:18:27 +0000 (14:18 -0400)]
[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)

7 years ago[3.6] Make test_shutil test_disk_usage not depend on the cwd fs (GH-2597) (#2820)
Gregory P. Smith [Sun, 23 Jul 2017 06:00:39 +0000 (23:00 -0700)]
[3.6] Make test_shutil test_disk_usage not depend on the cwd fs (GH-2597) (#2820)

Make test_shutil test_disk_usage not depend on the current working directory's filesystem.
(cherry picked from commit 529746c90584069270cd122920270bd7be38bca3)

7 years ago[3.6] bpo-30981: IDLE -- Add more configdialog font page tests. (GH-… (#2796)
Terry Jan Reedy [Sat, 22 Jul 2017 04:56:18 +0000 (00:56 -0400)]
[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.

7 years ago[3.6] bpo-29403: Fix mock's broken autospec behavior on method-bound builtin function...
Berker Peksag [Fri, 21 Jul 2017 22:31:04 +0000 (01:31 +0300)]
[3.6] bpo-29403: Fix mock's broken autospec behavior on method-bound builtin 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)

7 years agobpo-30891: Fix again importlib _find_and_load() (#2665) (#2801)
Victor Stinner [Fri, 21 Jul 2017 11:28:55 +0000 (13:28 +0200)]
bpo-30891: Fix again importlib _find_and_load() (#2665) (#2801)

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)

7 years ago[3.6] bpo-30964: Mention ensurepip in package installation docs (GH-2797)
Nicholas [Fri, 21 Jul 2017 06:44:43 +0000 (23:44 -0700)]
[3.6] bpo-30964: Mention ensurepip in package installation docs (GH-2797)

Adds a new 'Pip not installed' section that covers
running `ensurepip` manually, and also references
the relevant section of the Python Packaging User
Guide.

(cherry picked from commit b3527bfefd7a0188d43a2d7515ac6addd97a8202)

7 years ago[3.6] bpo-28523: IDLE: Use 'color' instead of 'colour'. (GH-2787) (#2791)
Terry Jan Reedy [Fri, 21 Jul 2017 05:29:09 +0000 (01:29 -0400)]
[3.6] bpo-28523: IDLE: Use 'color' instead of 'colour'. (GH-2787) (#2791)

(cherry picked from commit a54a8f1)

7 years agobpo-30466: Add brief explanation of classes to tutorial (GH-1804) (GH-2700)
Trey Hunner [Fri, 21 Jul 2017 03:10:54 +0000 (20:10 -0700)]
bpo-30466: Add brief explanation of classes to tutorial (GH-1804) (GH-2700)

7 years agobpo-30822: Exclude tzdata from regrtest --all (#2775) (#2777)
Victor Stinner [Thu, 20 Jul 2017 15:08:48 +0000 (17:08 +0200)]
bpo-30822: Exclude tzdata from regrtest --all (#2775) (#2777)

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)

7 years ago[3.6] Fix typo in Turtle Docs: yingyang -> yinyang (GH-2770) (GH-2778)
Mariatta [Thu, 20 Jul 2017 14:14:05 +0000 (07:14 -0700)]
[3.6] Fix typo in Turtle Docs: yingyang -> yinyang (GH-2770) (GH-2778)

(cherry picked from commit fff2a21057b98732562098e3bdd65980551f0135)

7 years agoUpdate doc download files size estimates. (#2771) (#2772)
Ned Deily [Thu, 20 Jul 2017 08:19:22 +0000 (04:19 -0400)]
Update doc download files size estimates. (#2771) (#2772)

7 years ago[3.6] bpo-30917: IDLE: Add config.IdleConf unittests (GH-2691) (#2753)
terryjreedy [Thu, 20 Jul 2017 05:23:00 +0000 (01:23 -0400)]
[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)

7 years ago[3.6] bpo-30883: Use pythontest.net instead of debian.org in test_urllib2net (GH...
Ammar Askar [Thu, 20 Jul 2017 00:21:09 +0000 (17:21 -0700)]
[3.6] bpo-30883: Use pythontest.net instead of debian.org in test_urllib2net (GH-2755)

7 years ago[3.6] bpo-30450: Improved logic for obtaining dependencies (#2751)
Steve Dower [Wed, 19 Jul 2017 07:11:08 +0000 (09:11 +0200)]
[3.6] bpo-30450: Improved logic for obtaining dependencies (#2751)

Adds alternate download approach for nuget.exe
Fall back to git.exe if no Python is found. (#2739)
Also check whether git.exe is on PATH if it will be used.
Add support for HOST_PYTHON variable.
Clear internal environment variables used in find_python.bat
Use HOST_PYTHON as the actual Python if it is recent enough.
Adds HOST_PYTHON variable to AppVeyor configuration

7 years agobpo-30961: Fix decrementing a borrowed reference in tracemalloc. (#2747) (#2748)
Xiang Zhang [Tue, 18 Jul 2017 16:50:52 +0000 (00:50 +0800)]
bpo-30961: Fix decrementing a borrowed reference in tracemalloc. (#2747) (#2748)

(cherry picked from commit 4ed5ad79ec6c6270e6018bd0a55656305ee60907)

7 years agoAlso bump README.rst
Ned Deily [Mon, 17 Jul 2017 04:59:03 +0000 (00:59 -0400)]
Also bump README.rst

7 years agoBump to v3.6.2+
Ned Deily [Mon, 17 Jul 2017 04:54:03 +0000 (00:54 -0400)]
Bump to v3.6.2+

7 years agoMerge tag 'v3.6.2' into 3.6
Ned Deily [Mon, 17 Jul 2017 04:42:07 +0000 (00:42 -0400)]
Merge tag 'v3.6.2' into 3.6

Version v3.6.2

7 years ago[3.6] bpo-30936: Fix a reference leak in json when fail to sort keys. (GH-2712)....
Serhiy Storchaka [Sun, 16 Jul 2017 04:48:08 +0000 (07:48 +0300)]
[3.6] bpo-30936: Fix a reference leak in json when fail to sort keys. (GH-2712). (#2727)

(cherry picked from commit 49f6449ef4b81537c19b82329caaf60596c516c2)

7 years ago[3.6] bpo-30876: Relative import from unloaded package now reimports the package...
Serhiy Storchaka [Sun, 16 Jul 2017 04:44:25 +0000 (07:44 +0300)]
[3.6] bpo-30876: Relative import from unloaded package now reimports the 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)

7 years ago[3.6] bpo-30934: Document coverage details for idlelib tests (GH-2711) (#2726)
terryjreedy [Sun, 16 Jul 2017 04:39:59 +0000 (00:39 -0400)]
[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)

7 years agobpo-30939: Avoid Sphinx deprecation warning in docs build. (#2721) (#2722)
Ned Deily [Sat, 15 Jul 2017 20:56:13 +0000 (16:56 -0400)]
bpo-30939: Avoid Sphinx deprecation warning in docs build. (#2721) (#2722)

(cherry picked from commit 50f58163a69abe2f35e91044d1df165ee7bdbb42)

7 years agoDoc that 'sorted' args are keyword-only, fix 'reverse' default (#2709)
Łukasz Rogalski [Fri, 14 Jul 2017 19:57:19 +0000 (21:57 +0200)]
Doc that 'sorted' args are keyword-only, fix 'reverse' default (#2709)

backport

7 years ago[3.6] Update idlelib/NEWS.txt. (GH-2703) (#2704)
terryjreedy [Fri, 14 Jul 2017 04:29:05 +0000 (00:29 -0400)]
[3.6] Update idlelib/NEWS.txt. (GH-2703) (#2704)

(cherry picked from commit 0d0a32f)

7 years ago[3.6] bpo-30913: IDLE: Document tk vars, attributes, and methods for ConfigDialog...
terryjreedy [Fri, 14 Jul 2017 03:53:30 +0000 (23:53 -0400)]
[3.6] bpo-30913: IDLE: Document tk vars, attributes, and methods for 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)

7 years ago[3.6] bpo-30870: IDLE: Add configdialog fontlist selection unittest (GH-2666) (#2701)
terryjreedy [Fri, 14 Jul 2017 02:24:55 +0000 (22:24 -0400)]
[3.6] bpo-30870: IDLE: Add configdialog fontlist selection unittest (GH-2666) (#2701)

Initial patch by Louie Lu.
(cherry picked from commit 9b622fb)

7 years agobpo-30731: python.manifest fix (#2328) (#2699)
Steve Dower [Thu, 13 Jul 2017 19:51:50 +0000 (21:51 +0200)]
bpo-30731: python.manifest fix (#2328) (#2699)

bpo-30731: python.manifest fix

7 years ago[3.6] bpo-30911: Add tests for bad boolean arguments for accelerated json (GH-2690...
Serhiy Storchaka [Thu, 13 Jul 2017 08:40:25 +0000 (11:40 +0300)]
[3.6] bpo-30911: Add tests for bad boolean arguments for accelerated json (GH-2690) (#2692)

encoder and decoder.
(cherry picked from commit d3aaa2f)

7 years ago[3.6] bpo-30899: Add unittests, 100% coverage, for IDLE's two ConfigParser subclasses...
terryjreedy [Wed, 12 Jul 2017 18:42:37 +0000 (14:42 -0400)]
[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)

7 years ago[3.6] bpo-30779: IDLE: fix changes.delete_section calls in configdialog (GH-2667...
terryjreedy [Tue, 11 Jul 2017 23:50:10 +0000 (19:50 -0400)]
[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)

7 years ago[3.6] bpo-30881: IDLE: add docstrings to browser.py (GH-2638) (#2663)
terryjreedy [Tue, 11 Jul 2017 06:53:32 +0000 (02:53 -0400)]
[3.6] bpo-30881: IDLE: add docstrings to browser.py (GH-2638) (#2663)

Patch by Cheryl Sabella.
(cherry picked from commit ba35227)

7 years ago[3.6] bpo-30870: IDLE -- fix logic error in eae2537. (GH-2660) (#2661)
terryjreedy [Tue, 11 Jul 2017 06:16:41 +0000 (02:16 -0400)]
[3.6] bpo-30870: IDLE -- fix logic error in eae2537. (GH-2660) (#2661)

(cherry picked from commit 5b62b35)

7 years ago[3.6] bpo-22207: Add checks for possible integer overflows in unicodeobject.c. (GH...
Serhiy Storchaka [Tue, 11 Jul 2017 04:27:56 +0000 (07:27 +0300)]
[3.6] bpo-22207: Add checks for possible integer overflows in unicodeobject.c. (GH-2623) (#2658)

Based on patch by Victor Stinner.
(cherry picked from commit 64e461b)

7 years ago[3.6] bpo-30879: os.listdir() and os.scandir() now emit bytes names when (GH-2634...
Serhiy Storchaka [Tue, 11 Jul 2017 04:16:11 +0000 (07:16 +0300)]
[3.6] bpo-30879: os.listdir() and os.scandir() now emit bytes names when (GH-2634) (#2656)

called with bytes-like argument..
(cherry picked from commit 1180e5a51871fa53ca6892e83fd2e69dc2600447)

7 years agobpo-30891: Fix importlib _find_and_load() race condition (#2646) (#2651)
Victor Stinner [Mon, 10 Jul 2017 21:16:27 +0000 (23:16 +0200)]
bpo-30891: Fix importlib _find_and_load() race condition (#2646) (#2651)

* Rewrite importlib _get_module_lock(): it is now responsible to hold
  the imp lock directly.
* _find_and_load() now holds the module lock to check if name is in
  sys.modules to prevent a race condition
(cherry picked from commit 4f9a446f3fb42f800e73cd9414dd1eccb3ca4fa7)

7 years agobpo-30892: Fix _elementtree module initialization (#2647) (#2649)
Victor Stinner [Mon, 10 Jul 2017 21:12:37 +0000 (23:12 +0200)]
bpo-30892: Fix _elementtree module initialization (#2647) (#2649)

Handle getattr(copy, 'deepcopy') error in _elementtree module
initialization.
(cherry picked from commit b136f11f3a51f9282ae992bac68f170ca5563b55)

7 years ago[3.6] bpo-30851: IDLE: Remove unused tk variables in configdialog. (GH-2626) (#2648)
terryjreedy [Mon, 10 Jul 2017 19:11:45 +0000 (15:11 -0400)]
[3.6] bpo-30851: IDLE: Remove unused tk variables in configdialog. (GH-2626) (#2648)

One is a duplicate, one is set but cannot be altered by users.
Patch by Cheryl Sabella.
(cherry picked from commit aa8d0a2)

7 years agobpo-30886: Fix multiprocessing.Queue.join_thread() (#2642) (#2643)
Victor Stinner [Mon, 10 Jul 2017 11:43:20 +0000 (13:43 +0200)]
bpo-30886: Fix multiprocessing.Queue.join_thread() (#2642) (#2643)

multiprocessing.Queue.join_thread() now waits until the thread
completes, even if the thread was started by the same process which
created the queue.

Fix the following warning which occurs randomly when running
test_handle_called_with_mp_queue of test_logging.QueueListenerTest:

Warning -- threading_cleanup() failed to cleanup -1 threads after 4 sec (count: 0, dangling: 1)
(cherry picked from commit 3b69d911c57ef591ac0c0f47a66dbcad8337f33a)

7 years ago[3.6] bpo-30870: IDLE: Change sample font when select by key-up/down (GH-2617) (...
terryjreedy [Sun, 9 Jul 2017 23:26:32 +0000 (19:26 -0400)]
[3.6] bpo-30870: IDLE: Change sample font when select by key-up/down (GH-2617) (#2640)

Patch by Louie Lu.
(cherry picked from commit bb2bae8)

7 years ago[3.6] bpo-29854: Fix segfault in call_readline() (GH-728)
Nir Soffer [Sat, 8 Jul 2017 18:51:21 +0000 (21:51 +0300)]
[3.6] bpo-29854: Fix segfault in call_readline() (GH-728)

If history-length is set in .inputrc, and the history file is double the
history size (or more), history_get(N) returns NULL, and python
segfaults. Fix that by checking for NULL return value.

It seems that the root cause is incorrect handling of bigger history in
readline, but Python should not segfault even if readline returns
unexpected value.

This issue affects only GNU readline. When using libedit emulation
system history size option does not work.

7 years agoUpdate for post-3.6.2rc2
Ned Deily [Sat, 8 Jul 2017 04:49:40 +0000 (00:49 -0400)]
Update for post-3.6.2rc2

7 years agoMerge tag 'v3.6.2rc2' into 3.6
Ned Deily [Sat, 8 Jul 2017 04:41:30 +0000 (00:41 -0400)]
Merge tag 'v3.6.2rc2' into 3.6

Tag v3.6.2rc2

7 years agoVersion bump to 3.6.2final v3.6.2
Ned Deily [Sat, 8 Jul 2017 03:33:27 +0000 (23:33 -0400)]
Version bump to 3.6.2final

7 years ago[3.6] bpo-8231: Call idlelib.IdleConf.GetUserCfgDir only once. (GH-2629) (#2631)
terryjreedy [Sat, 8 Jul 2017 02:47:37 +0000 (22:47 -0400)]
[3.6] bpo-8231: Call idlelib.IdleConf.GetUserCfgDir only once. (GH-2629) (#2631)

(cherry picked from commit 223c7e7)

7 years ago[3.6] bpo-30779: News (GH-2627) (#2630)
terryjreedy [Sat, 8 Jul 2017 02:26:53 +0000 (22:26 -0400)]
[3.6] bpo-30779: News (GH-2627) (#2630)

(cherry picked from commit 24f2e19)

7 years ago[3.6] bpo-30779: IDLE -- Factor ConfigChanges class from configdialog, put in config...
terryjreedy [Fri, 7 Jul 2017 20:37:39 +0000 (16:37 -0400)]
[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)

7 years agoVersion bump to 3.6.2rc2 v3.6.2rc2
Ned Deily [Fri, 7 Jul 2017 07:16:00 +0000 (03:16 -0400)]
Version bump to 3.6.2rc2

7 years agobpo-30797, bpo-30694: Avoid _GNU_SOURCE redefined warning in xmlparse.c (#2615)
Ned Deily [Fri, 7 Jul 2017 05:31:43 +0000 (01:31 -0400)]
bpo-30797, bpo-30694: Avoid _GNU_SOURCE redefined warning in xmlparse.c (#2615)

(cherry picked from commit 05b72ede95521b2d897cb4c7b034139b5437c592)

7 years agobpo-30797, bpo-30694: Avoid _GNU_SOURCE redefined warning in xmlparse.c (#2615)
Ned Deily [Fri, 7 Jul 2017 05:31:43 +0000 (01:31 -0400)]
bpo-30797, bpo-30694: Avoid _GNU_SOURCE redefined warning in xmlparse.c (#2615)

7 years ago[3.6] bpo-30745: Fix compiler warnings introduced in bpo-30730. (GH-2376) (#2378)
Serhiy Storchaka [Sat, 24 Jun 2017 13:28:26 +0000 (16:28 +0300)]
[3.6] bpo-30745: Fix compiler warnings introduced in bpo-30730. (GH-2376) (#2378)

(cherry picked from commit 0ee32c1)
(cherry picked from commit 0e1f9e8d3ea82262cbb9a403b70a884da5e6a6ac)

7 years ago[3.6] bpo-30730: Prevent environment variables injection in subprocess on Windows...
Serhiy Storchaka [Fri, 23 Jun 2017 17:17:38 +0000 (20:17 +0300)]
[3.6] bpo-30730: Prevent environment variables injection in subprocess on Windows. (GH-2325) (#2360)

Prevent passing other invalid environment variables and command arguments..
(cherry picked from commit d174d24a5d37d1516b885dc7c82f71ecd5930700)
(cherry picked from commit e7135751b8e48af80665e40ac8fa6d0073e5affe)

7 years agobpo-30704, bpo-30604: Fix memleak in code_dealloc() (#2455) (#2456)
Victor Stinner [Wed, 28 Jun 2017 00:28:51 +0000 (02:28 +0200)]
bpo-30704, bpo-30604: Fix memleak in code_dealloc() (#2455) (#2456)

Free also co_extra->ce_extras, not only co_extra.
(cherry picked from commit 23e7944eba1968bb8432fdc4cc96d4fdd2c1a230)
(cherry picked from commit 26daad4ee14693381d84a5235709d22aed1c22ed)

7 years ago[3.6] bpo-30726: Also fix pyexpat.vcxproj (GH-2375) (#2570)
Segev Finer [Tue, 4 Jul 2017 18:38:47 +0000 (21:38 +0300)]
[3.6] bpo-30726: Also fix pyexpat.vcxproj (GH-2375) (#2570)

(cherry picked from commit 7526cadd64566725ffc56071a7208828a46ddbd8)
(cherry picked from commit d02c8416fe1b29b3322004b73133bf6c8a2e353a)

7 years ago[3.6] bpo-30726: PCbuild _elementtree: remove duplicate defines (#2348) (#2349)
Victor Stinner [Fri, 23 Jun 2017 13:21:33 +0000 (15:21 +0200)]
[3.6] bpo-30726: PCbuild _elementtree: remove duplicate defines (#2348) (#2349)

* bpo-30726: PCbuild _elementtree: remove duplicate defines (#2348)

bpo-30726, bpo-29591: libexpat 2.2.1 of Modules/expat/ now uses
a winconfig.h configuration file which already defines:

* XML_NS
* XML_DTD
* BYTEORDER=1234
* XML_CONTEXT_BYTES=1024
* HAVE_MEMMOVE

Remove these defines from PCbuild/_elementtree.vcxproj to prevent
compiler warnings.

Co-Authored-By: Jeremy Kloth <jeremy.kloth@gmail.com>
(cherry picked from commit c8fb58bd7917151e63398587a7fc2126db7c26de)

* bpo-30726: Fix elementtree warnings on Windows due to expat upgrade (#2319)

* bpo-30726: Fix elementtree warnings on Windows

Caused by usage of `getenv` which should be safe. And a few integer
truncations which should also be ok.

* bpo-30726: Don't ignore libexpat warnings which haypo intends to fix upstream

(cherry picked from commit 87c65550730a8f85ce339ba197bce4fb7e836619)
(cherry picked from commit d32a05953130fb5cc2d3c0c9fcb20ad0859353f3)

7 years agobpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300) (#2313)
Victor Stinner [Wed, 21 Jun 2017 14:05:11 +0000 (16:05 +0200)]
bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300) (#2313)

New file: Modules/expat/siphash.h.
(cherry picked from commit 5ff7132313eb651107b179d20218dfe5d4e47f13)
(cherry picked from commit 4a66524006852fc982aebafa277f2c043d9ad149)

7 years agobpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) (#2289)
Victor Stinner [Tue, 20 Jun 2017 13:37:24 +0000 (15:37 +0200)]
bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) (#2289)

The current regex based splitting produces a wrong result. For example::

  http://abc#@def

Web browsers parse that URL as ``http://abc/#@def``, that is, the host
is ``abc``, the path is ``/``, and the fragment is ``#@def``.
(cherry picked from commit 90e01e50ef8a9e6c91f30d965563c378a4ad26de)
(cherry picked from commit 536c1f1246f4faa302f9f5613fc3444e7ae09b4a)

7 years agobpo-30687: Fixes build scripts to find msbuild.exe and stop relying on vcvarsall...
Steve Dower [Mon, 19 Jun 2017 18:12:56 +0000 (11:12 -0700)]
bpo-30687: Fixes build scripts to find msbuild.exe and stop relying on vcvarsall.bat (#2252) (#2280)

* Fixes build scripts to find msbuild.exe and stop relying on vcvarsall.bat
Also fixes bdist_wininst.vcxproj to use correct version in generated name.

(cherry picked from commit 06d6e3d0bb5b8a3d3105289034953a8014356a0b)

7 years ago[3.6] bpo-30780: Fix error in idlelib.test_idle.test_configdialog (GH-2606) (#2613)
terryjreedy [Fri, 7 Jul 2017 03:16:31 +0000 (23:16 -0400)]
[3.6] bpo-30780: Fix error in idlelib.test_idle.test_configdialog (GH-2606) (#2613)

(cherry picked from commit 25a4206)

7 years agobpo-30532: Fix whitespace folding in certain cases (#2591)
Joel Hillacre [Thu, 6 Jul 2017 21:28:22 +0000 (15:28 -0600)]
bpo-30532: Fix whitespace folding in certain cases (#2591)

Leading whitespace was incorrectly dropped during folding of certain lines in the _header_value_parser's folding algorithm.  This makes the whitespace handling code consistent.

7 years ago[3.6] Fix case in .gitignore (GH-2607) (GH-2608)
Segev Finer [Thu, 6 Jul 2017 21:08:29 +0000 (00:08 +0300)]
[3.6] Fix case in .gitignore (GH-2607) (GH-2608)

(cherry picked from commit be5ebe58776a02d53bcf5e43ab946b555c0e025f)

7 years ago[3.6] Update idlelib/NEWS.txt with merges upto 2017 Jul 5. (GH-2595) (#2596)
terryjreedy [Thu, 6 Jul 2017 19:29:35 +0000 (15:29 -0400)]
[3.6] Update idlelib/NEWS.txt with merges upto 2017 Jul 5. (GH-2595) (#2596)

(cherry picked from commit 1ccbad9c95cf5782a1329eeaecba6e3eb0c37cb8)

7 years ago[3.6] bpo-30814: Fixed a race condition when import a submodule from a package. ...
Serhiy Storchaka [Thu, 6 Jul 2017 05:38:24 +0000 (08:38 +0300)]
[3.6] bpo-30814: Fixed a race condition when import a submodule from a package. (GH-2580). (#2598)

(cherry picked from commit b4baacee1adc06edbe30ac7574d17a8cd168e2e0)

7 years ago[3.6] bpo-30828: Fix out of bounds write in `asyncio.CFuture.remove_done_callback...
Yury Selivanov [Wed, 5 Jul 2017 18:03:10 +0000 (14:03 -0400)]
[3.6] bpo-30828: Fix out of bounds write in `asyncio.CFuture.remove_done_callback() (GH-2569) (#2590)

(cherry picked from commit 833a3b0d3707200daeaccdd218e8f18a190284aa)

7 years ago[3.6] bpo-30854: Fix compile error when --without-threads (GH-2581) (#2583)
Masayuki Yamamoto [Wed, 5 Jul 2017 09:24:46 +0000 (18:24 +0900)]
[3.6] bpo-30854: Fix compile error when --without-threads (GH-2581) (#2583)

* bpo-30854: Fix compile error when --without-threads

* bpo-30854: fix news
(cherry picked from commit 0c3116309307ad2c7f8e2d2096612f4ab33cbb62)

7 years ago[3.6] NEWS for 30777 (GH-2576) (#2579)
terryjreedy [Wed, 5 Jul 2017 04:55:59 +0000 (00:55 -0400)]
[3.6] NEWS for 30777 (GH-2576) (#2579)

(cherry picked from commit aaa917f)

7 years ago[3.6] bpo-21624: IDLE -- minor htest fixes (GH-2575) (#2578)
terryjreedy [Wed, 5 Jul 2017 04:55:29 +0000 (00:55 -0400)]
[3.6] bpo-21624: IDLE -- minor htest fixes (GH-2575) (#2578)

(cherry picked from commit 2000150)

7 years ago[3.6] bpo-30777: IDLE: configdialog - add docstrings and improve comments (GH-2440...
terryjreedy [Wed, 5 Jul 2017 04:54:55 +0000 (00:54 -0400)]
[3.6] bpo-30777: IDLE: configdialog - add docstrings and improve comments (GH-2440) (#2577)

Patch by Cheryl Sabella.
(cherry picked from commit 7eb5883)

7 years ago[3.6] bpo-30726: Also fix pyexpat.vcxproj (GH-2375) (#2570)
Segev Finer [Tue, 4 Jul 2017 18:38:47 +0000 (21:38 +0300)]
[3.6] bpo-30726: Also fix pyexpat.vcxproj (GH-2375) (#2570)

(cherry picked from commit 7526cadd64566725ffc56071a7208828a46ddbd8)

7 years agobpo-30319: socket.close() now ignores ECONNRESET (#2565) (#2566)
Victor Stinner [Tue, 4 Jul 2017 14:46:10 +0000 (16:46 +0200)]
bpo-30319: socket.close() now ignores ECONNRESET (#2565) (#2566)

socket.close() was modified in Python 3.6 to raise OSError on
failure: see bpo-26685.
(cherry picked from commit 67e1478dba6efe60b8e1890192014b8b06dd6bd9)

7 years agoRemove outdated FOX from GUI FAQ (GH-2538)
Berker Peksag [Tue, 4 Jul 2017 06:27:35 +0000 (09:27 +0300)]
Remove outdated FOX from GUI FAQ (GH-2538)

FXpy doesn't have a Python 3 port and it only
supports Python 2.2 and older versions.

Reported by Alex Walters on docs@p.o.

(cherry picked from commit d3ed2877a798d07df75422afe136b4727e500c99)

7 years ago[3.6] bpo-30441: Fix bug when modifying os.environ while iterating over it (GH-2409...
Serhiy Storchaka [Tue, 4 Jul 2017 04:55:32 +0000 (07:55 +0300)]
[3.6] bpo-30441: Fix bug when modifying os.environ while iterating over it (GH-2409). (#2556)

(cherry picked from commit 8a8d28501fc8ce25926d168f1c657656c809fd4c)

7 years agobpo-30764: Fix regrtest --fail-env-changed --forever (#2536) (#2539)
Victor Stinner [Mon, 3 Jul 2017 10:50:36 +0000 (12:50 +0200)]
bpo-30764: Fix regrtest --fail-env-changed --forever (#2536) (#2539)

--forever now stops if a fail changes the environment.
(cherry picked from commit 5e87592fd12e0b7c41edc11d4885ed7298d5063b)

7 years ago[3.6] bpo-30597: Show expected input in custom 'print' error message. (GH-2531)
Nick Coghlan [Mon, 3 Jul 2017 07:49:50 +0000 (17:49 +1000)]
[3.6] bpo-30597: Show expected input in custom 'print' error message. (GH-2531)

(cherry picked from commit 3a7f03584ab75afbf5507970711c87042e423bb4)

7 years ago[3.6] bpo-29933: Improve set_write_buffer_limits description (GH-2262) (GH-2532)
Kojo Idrissa [Sun, 2 Jul 2017 02:48:07 +0000 (11:48 +0900)]
[3.6] bpo-29933: Improve set_write_buffer_limits description (GH-2262) (GH-2532)

Improve the description of the high and low parameters for set_write_buffer_limits.
Also fixed a small grammatical issue.
(cherry picked from commit 5200a7c7f9ea65a96330c5f276f4acc6ec70854e)

7 years ago[3.6] bpo-30703: Improve signal delivery (GH-2415) (#2527)
Antoine Pitrou [Sat, 1 Jul 2017 17:12:05 +0000 (19:12 +0200)]
[3.6] bpo-30703: Improve signal delivery (GH-2415) (#2527)

* [3.6] bpo-30703: Improve signal delivery (GH-2415)

* Improve signal delivery

Avoid using Py_AddPendingCall from signal handler, to avoid calling signal-unsafe functions.

* Remove unused function

* Improve comments

* Add stress test

* Adapt for --without-threads

* Add second stress test

* Add NEWS blurb

* Address comments @haypo.
(cherry picked from commit c08177a1ccad2ed0d50898c2731b518c631aed14)

* bpo-30796: Fix failures in signal delivery stress test (#2488)

* bpo-30796: Fix failures in signal delivery stress test

setitimer() can have a poor minimum resolution on some machines,
this would make the test reach its deadline (and a stray signal
could then kill a subsequent test).

* Make sure to clear the itimer after the test

7 years ago[3.6] Fix trivial typo in json module docstring (GH-2274) (#2430)
Mariatta [Sat, 1 Jul 2017 01:15:18 +0000 (18:15 -0700)]
[3.6] Fix trivial typo in json module docstring (GH-2274) (#2430)

(cherry picked from commit 76c567ee27342d76f631a35c8291b715b2a61f3e)

7 years ago[3.6] bpo-29512, bpo-30776: Backport regrtest enhancements from master to 3.6 (#2513)
Victor Stinner [Fri, 30 Jun 2017 15:31:16 +0000 (17:31 +0200)]
[3.6] bpo-29512, bpo-30776: Backport regrtest enhancements from master to 3.6 (#2513)

* bpo-29512: Add test.bisect, bisect failing tests (#2452)

Add a new "python3 -m test.bisect" tool to bisect failing tests.

It can be used to find which test method(s) leak references, leak
files, etc.
(cherry picked from commit 84d9d14a1fa395fbd21262ba195490be25a7b3bc)

* bpo-30776: regrtest: reduce memleak false positive (#2484)

Only report a leak if each run leaks at least one memory block.
(cherry picked from commit beeca6e1e5fd01531b1db7059498b13d07dca525)