]> granicus.if.org Git - python/log
python
7 years ago[3.6] bpo-30102: Call OPENSSL_add_all_algorithms_noconf (GH-3112) (#3342)
Christian Heimes [Tue, 5 Sep 2017 15:12:03 +0000 (17:12 +0200)]
[3.6] bpo-30102: Call OPENSSL_add_all_algorithms_noconf (GH-3112) (#3342)

The ssl and hashlib modules now call OPENSSL_add_all_algorithms_noconf() on
OpenSSL < 1.1.0. The function detects CPU features and enables optimizations
on some CPU architectures such as POWER8. Patch is based on research from
Gustavo Serra Scalet.

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit c941e62)

7 years ago[3.6] bpo-31343: Include sys/sysmacros.h (GH-3318) (#3344)
Christian Heimes [Tue, 5 Sep 2017 15:09:12 +0000 (17:09 +0200)]
[3.6] bpo-31343: Include sys/sysmacros.h (GH-3318) (#3344)

Include sys/sysmacros.h for major(), minor(), and makedev(). GNU C libray
plans to remove the functions from sys/types.h.

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 75b9618)

7 years ago[3.6] Travis: use ccache (GH-3307) (#3332)
Christian Heimes [Tue, 5 Sep 2017 14:03:29 +0000 (16:03 +0200)]
[3.6] Travis: use ccache (GH-3307) (#3332)

(cherry picked from commit 8adc73c)

7 years ago[3.6] bpo-30622: Change NPN detection: (GH-2079) (#3314)
Christian Heimes [Tue, 5 Sep 2017 14:00:44 +0000 (16:00 +0200)]
[3.6] bpo-30622: Change NPN detection: (GH-2079) (#3314)

* Change NPN detection:

Version breakdown, support disabled (pre-patch/post-patch):
- pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False
- 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED will not be defined ->
False/False
- 1.1.0+: OPENSSL_NPN_NEGOTIATED will be defined and
OPENSSL_NO_NEXTPROTONEG will be defined -> True/False

Version breakdown support enabled (pre-patch/post-patch):
- pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False
- 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED will be defined and
OPENSSL_NO_NEXTPROTONEG will not be defined -> True/True
- 1.1.0+: OPENSSL_NPN_NEGOTIATED will be defined and
OPENSSL_NO_NEXTPROTONEG will not be defined -> True/True

* Refine NPN guard:

- If NPN is disabled, but ALPN is available we need our callback
- Make clinic's ssl behave the same way

This created a working ssl module for me, with NPN disabled and ALPN
enabled for OpenSSL 1.1.0f.

Concerns to address:
The initial commit for NPN support into OpenSSL [1], had the
OPENSSL_NPN_* variables defined inside the OPENSSL_NO_NEXTPROTONEG
guard. The question is if that ever made it into a release.
This would need an ugly hack, something like:

GH-if defined(OPENSSL_NO_NEXTPROTONEG) && \
!defined(OPENSSL_NPN_NEGOTIATED)
GH- define OPENSSL_NPN_UNSUPPORTED 0
GH- define OPENSSL_NPN_NEGOTIATED 1
GH- define OPENSSL_NPN_NO_OVERLAP 2
GH-endif

[1] https://github.com/openssl/openssl/commit/68b33cc5c7
(cherry picked from commit b2d096b)

7 years agoInclude additional changes to support blurbified NEWS (#3340)
Ned Deily [Tue, 5 Sep 2017 07:10:31 +0000 (00:10 -0700)]
Include additional changes to support blurbified NEWS (#3340)

7 years agoSimplify NEWS entry to prevent suspicious warnings. (#3339)
Ned Deily [Tue, 5 Sep 2017 06:23:04 +0000 (23:23 -0700)]
Simplify NEWS entry to prevent suspicious warnings. (#3339)

7 years agoFix malformed handcrafted blurb filename. (#3327)
larryhastings [Tue, 5 Sep 2017 05:27:31 +0000 (22:27 -0700)]
Fix malformed handcrafted blurb filename. (#3327)

7 years agoRename my manually mis-named NEWS.d file. #sorry (#3326)
Gregory P. Smith [Mon, 4 Sep 2017 23:38:23 +0000 (16:38 -0700)]
Rename my manually mis-named NEWS.d file. #sorry (#3326)

7 years ago[3.6] Added effect of re.ASCII and reworded slightly (GH-1782) (#3313)
Gregory P. Smith [Mon, 4 Sep 2017 21:58:31 +0000 (14:58 -0700)]
[3.6] Added effect of re.ASCII and reworded slightly (GH-1782) (#3313)

(cherry picked from commit c9d6dbc2900ace9564b8f67e63617be747355c6b)

7 years agobpo-22536 [3.6] Set filename in FileNotFoundError (#3305)
Gregory P. Smith [Mon, 4 Sep 2017 21:23:23 +0000 (14:23 -0700)]
bpo-22536 [3.6] Set filename in FileNotFoundError  (#3305)

* [3.6] bpo-22536: Set the filename in FileNotFoundError. (GH-3194)

Have the subprocess module set the filename in the FileNotFoundError
exception raised on POSIX systems when the executable or cwd are missing.
(cherry picked from commit 8621bb5d93239316f97281826461b85072ff6db7)

* bpo-22536 [3.6] (GH-3202) skip non-windows tests.

7 years ago[3.6] remote note about IRIX in aifc (#3304)
Benjamin Peterson [Mon, 4 Sep 2017 20:58:23 +0000 (13:58 -0700)]
[3.6] remote note about IRIX in aifc (#3304)

This comment hasn't been true since Python 3.0.
(cherry picked from commit b84efddb9a87d515029bac943812b66eb3486eb5)

7 years ago[3.6] bpo-25674: remove sha256.tbs-internet.com ssl test (GH-3297) (#3300)
Christian Heimes [Mon, 4 Sep 2017 20:54:47 +0000 (22:54 +0200)]
[3.6] bpo-25674: remove sha256.tbs-internet.com ssl test (GH-3297) (#3300)

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 002d64039b60c1a9289f981fe73a5cf91d082136)

7 years agoBlurbify 3.6. (#3287)
larryhastings [Mon, 4 Sep 2017 19:03:25 +0000 (12:03 -0700)]
Blurbify 3.6. (#3287)

Blurbify 3.6.

7 years ago[3.6] Add missing _sha3 module to Setup.dist (GH-2395) (#3280)
Segev Finer [Mon, 4 Sep 2017 17:08:35 +0000 (20:08 +0300)]
[3.6] Add missing _sha3 module to Setup.dist (GH-2395) (#3280)

(cherry picked from commit 1c1f8f30c03ca119528)

7 years agobpo-31095: fix potential crash during GC (GH-3195)
INADA Naoki [Mon, 4 Sep 2017 03:31:09 +0000 (12:31 +0900)]
bpo-31095: fix potential crash during GC (GH-3195)

(cherry picked from commit a6296d34a478b4f697ea9db798146195075d496c)

7 years ago[3.6] bpo-29212: Fix the ugly repr() ThreadPoolExecutor thread name. (GH-2315) (...
Gregory P. Smith [Sun, 3 Sep 2017 21:52:20 +0000 (14:52 -0700)]
[3.6] bpo-29212: Fix the ugly repr() ThreadPoolExecutor thread name. (GH-2315) (#3276)

bpo-29212: Fix the ugly ThreadPoolExecutor thread name.

Fixes the newly introduced ugly default thread name for concurrent.futures
thread.ThreadPoolExecutor threads.  They'll now resemble the old <=3.5
threading default Thread-x names by being named ThreadPoolExecutor-y_n..
(cherry picked from commit a3d91b43c2851312fb942f31afa12f5961706db6)

7 years ago[3.6] bpo-9146: Raise a ValueError if OpenSSL fails to init a hash func (#3274)
Gregory P. Smith [Sun, 3 Sep 2017 21:35:19 +0000 (14:35 -0700)]
[3.6] bpo-9146: Raise a ValueError if OpenSSL fails to init a hash func (#3274)

* [3.6] bpo-9146: Raise a ValueError if OpenSSL fails to init a hash func. (GH-1777)

This helps people in weird FIPS mode environments where common things
like MD5 are not available in the binary as a matter of policy.
(cherry picked from commit 07244a83014fad42da937c17d98474b47a570bf7)

* Include a NEWS entry.

7 years ago[3.6] Fix a typo in the Programming FAQ. (GH-3230) (#3273)
Gregory P. Smith [Sun, 3 Sep 2017 20:29:34 +0000 (13:29 -0700)]
[3.6] Fix a typo in the Programming FAQ. (GH-3230) (#3273)

subobjects, not subobjecs.
(cherry picked from commit e9d978fd1bc122395efc91a82b16b2c4b968441d)

7 years ago[3.6] Fix a c.f.as_completed() refleak previously introduced in bpo-27144 (GH-3270...
Antoine Pitrou [Sun, 3 Sep 2017 13:30:55 +0000 (15:30 +0200)]
[3.6] Fix a c.f.as_completed() refleak previously introduced in bpo-27144 (GH-3270) (#3271)

(cherry picked from commit 2ef3760)

7 years agobpo-31185: Fixed miscellaneous errors in asyncio speedup module. (#3076) (#3269)
Serhiy Storchaka [Sun, 3 Sep 2017 06:24:32 +0000 (09:24 +0300)]
bpo-31185: Fixed miscellaneous errors in asyncio speedup module. (#3076) (#3269)

(cherry picked from commit bca4939d806170c3ca5d05f23710d11a8f1669cf)

7 years agobpo-30581: Windows: os.cpu_count() returns wrong number of processors (#2934) (#3267)
Christopher Wilcox [Fri, 1 Sep 2017 19:28:47 +0000 (15:28 -0400)]
bpo-30581: Windows: os.cpu_count() returns wrong number of processors (#2934) (#3267)

* Fixes #30581 by adding a path to use newer GetMaximumProcessorCount API on Windows calls to os.cpu_count()

* Add NEWS.d entry for bpo-30581, os.cpu_count on Windows.

* Tweak NEWS entry

7 years ago[3.6] bpo-27144: concurrent.futures as_complete and map iterators do not keep referen...
Antoine Pitrou [Fri, 1 Sep 2017 17:16:46 +0000 (19:16 +0200)]
[3.6] bpo-27144: concurrent.futures as_complete and map iterators do not keep reference to returned object (GH-1560) (#3266)

bpo-27144: concurrent.futures as_complie and map iterators do not keep
reference to returned object

(cherry picked from commit 97e1b1c81458d2109b2ffed32ffa1eb643a6c3b9)

7 years agobpo-31217: Fix regrtest -R for small integer (#3260) (#3261)
Victor Stinner [Fri, 1 Sep 2017 13:04:47 +0000 (15:04 +0200)]
bpo-31217: Fix regrtest -R for small integer (#3260) (#3261)

Use a pool of integer objects toprevent false alarm when checking for
memory block leaks. Fill the pool with values in -1000..1000 which
are the most common (reference, memory block, file descriptor)
differences.

Co-Authored-By: Antoine Pitrou <pitrou@free.fr>
(cherry picked from commit 6c2feabc5dac2f3049b15134669e9ad5af573193)

7 years agobpo-31249: Fix ref cycle in ThreadPoolExecutor (#3253)
Victor Stinner [Fri, 1 Sep 2017 12:46:44 +0000 (14:46 +0200)]
bpo-31249: Fix ref cycle in ThreadPoolExecutor (#3253)

[3.6] bpo-31249: Fix ref cycle in ThreadPoolExecutor

7 years ago[3.6] Fix the indentation in Extending Python code example (GH-3244) (GH-3250)
Mariatta [Thu, 31 Aug 2017 06:11:02 +0000 (23:11 -0700)]
[3.6] Fix the indentation in Extending Python code example (GH-3244) (GH-3250)

Code was indented with three spaces.
Fixed using four spaces.
(cherry picked from commit d9a2b99ac45b5529d2a6227b0d529397be831dab)

7 years ago[3.6] bpo-31291: Fixed an assertion failure in zipimport.zipimporter.get_data() ...
Oren Milman [Wed, 30 Aug 2017 11:08:39 +0000 (14:08 +0300)]
[3.6] bpo-31291: Fixed an assertion failure in zipimport.zipimporter.get_data() (GH-3226) (#3243)

if pathname.replace('/', '\\') returns non-string.
(cherry picked from commit 631fdee6e61b4ba8ce800f827fecdd536bfb04f3)

7 years ago[3.6] bpo-10746: Fix ctypes PEP 3118 type codes for c_long, c_bool, c_int (GH-31...
Pauli Virtanen [Wed, 30 Aug 2017 09:40:05 +0000 (11:40 +0200)]
[3.6] bpo-10746: Fix ctypes PEP 3118 type codes for c_long, c_bool, c_int (GH-31) (#3241)

Ctypes currently produces wrong pep3118 type codes for several types.
E.g. memoryview(ctypes.c_long()).format gives "<l" on 64-bit platforms,
but it should be "<q" instead for sizeof(c_long) == 8

The problem is that the '<>' endian specification in the struct syntax
also turns on the "standard size" mode, which makes type characters have
a platform-independent meaning, which does not match with the codes used
internally in ctypes.  The struct module format syntax also does not
allow specifying native-size non-native-endian items.

This commit adds a converter function that maps the internal ctypes
codes to appropriate struct module standard-size codes in the pep3118
format strings. The tests are modified to check for this.
(cherry picked from commit 07f1658aa09f6798793c473c72b2951b7fefe220)

7 years ago[3.6] bpo-31051: Rearrange IDLE condigdialog GenPage into Window, Editor, and Help...
Terry Jan Reedy [Wed, 30 Aug 2017 06:47:24 +0000 (02:47 -0400)]
[3.6] bpo-31051:  Rearrange IDLE condigdialog GenPage into Window, Editor, and Help sections. (GH-3239) (#3240)

(cherry picked from commit 390ead)

7 years ago[3.6] bpo-31243: Fixed PyArg_ParseTuple failure checks. (GH-3171) (#3233)
Oren Milman [Tue, 29 Aug 2017 12:43:32 +0000 (15:43 +0300)]
[3.6] bpo-31243: Fixed PyArg_ParseTuple failure checks. (GH-3171) (#3233)

(cherry picked from commit ba7d7365215d791025d1efd25393c91404f2cfc8)

7 years ago[3.6] bpo-26656: Improve re.compile documentation (GH-3211) (GH-3225)
Mariatta [Mon, 28 Aug 2017 05:50:08 +0000 (22:50 -0700)]
[3.6] bpo-26656: Improve re.compile documentation (GH-3211) (GH-3225)

- Link to the regular expressions object documentation
- Clarify that it can be used with more than the two methods currently stated.
(cherry picked from commit ed94a8b2851914bcda3a77b28b25517b8baa91e6)

7 years ago[3.6] bpo-30617: IDLE: docstrings and unittest for outwin.py (GH-2046) (#3223)
Terry Jan Reedy [Sun, 27 Aug 2017 22:29:24 +0000 (18:29 -0400)]
[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)

7 years agobpo-31191: Improve grammar in threading.Barrier docs (GH-3080) (GH-3224)
Mariatta [Sun, 27 Aug 2017 22:19:08 +0000 (15:19 -0700)]
bpo-31191: Improve grammar in threading.Barrier docs (GH-3080) (GH-3224)

(cherry picked from commit 143be366295038b36fc32c44b8e1b48a375eab56)

7 years ago[3.6] bpo-31287: IDLE - do not alter tkinter.messagebox in configdialog tests. (GH...
Terry Jan Reedy [Sun, 27 Aug 2017 21:14:19 +0000 (17:14 -0400)]
[3.6] bpo-31287: IDLE - do not alter tkinter.messagebox in configdialog tests. (GH-3220) (#3221)

(cherry picked from commit 3457f42)

7 years ago[3.6] bpo-30781: IDLE - use ttk widgets in configdialog (GH-2654) (#3214)
Terry Jan Reedy [Sat, 26 Aug 2017 20:12:14 +0000 (16:12 -0400)]
[3.6] bpo-30781: IDLE -  use ttk widgets in configdialog (GH-2654) (#3214)

Patch by Cheryl Sabella.
(cherry picked from commit 7028e59)

7 years ago[3.6] bpo-31271: Fix an assertion failure in io.TextIOWrapper.write. (GH-3201) (...
Oren Milman [Sat, 26 Aug 2017 17:29:40 +0000 (20:29 +0300)]
[3.6] bpo-31271: Fix an assertion failure in io.TextIOWrapper.write. (GH-3201) (#3209)

(cherry picked from commit a5b4ea15b61e3f3985f4f0748a18f8b888a63532)

7 years ago[3.6] bpo-28261: Prevent raising SystemError where PyArg_ParseTuple is used to parse...
Oren Milman [Sat, 26 Aug 2017 12:27:50 +0000 (15:27 +0300)]
[3.6] bpo-28261: Prevent raising SystemError where PyArg_ParseTuple is used to parse non-args. (#3210)

7 years agobpo-28667: Fix a compile warning on FreeBSD when compare with FD_SETSIZE. (#501)...
Victor Stinner [Tue, 22 Aug 2017 22:58:43 +0000 (00:58 +0200)]
bpo-28667: Fix a compile warning on FreeBSD when compare with FD_SETSIZE. (#501) (#3190)

FreeBSD is the only platforms with unsigned FD_SETSIZE.

(cherry picked from commit 783d0c1a1c723733adcdf4249240246fc35a5bcb)

7 years ago[3.6] bpo-30983: [gdb] Fix py-bt, etc. for non-debug shared builds (GH-3153) (#3192)
Łukasz Langa [Tue, 22 Aug 2017 20:20:40 +0000 (13:20 -0700)]
[3.6] bpo-30983: [gdb] Fix py-bt, etc. for non-debug shared builds (GH-3153) (#3192)

PEP 523 introduced _PyEval_EvalFrameDefault which inlines PyEval_EvalFrameEx on
non-debug shared builds.  This breaks the ability to use py-bt, py-up, and
a few other Python-specific gdb integrations.

This patch fixes the problem by only looking for _PyEval_EvalFrameDefault
frames.

test_gdb passes on both a debug and a non-debug build.

Original patch by Bruno "Polaco" Penteado.
(cherry picked from commit 5fe59f8e3a0a56a155c18f9d581205ec533764b6)

7 years agobpo-31161: only check for parens error for SyntaxError (#3083)
Martijn Pieters [Tue, 22 Aug 2017 20:11:09 +0000 (21:11 +0100)]
bpo-31161: only check for parens error for SyntaxError (#3083)

Subclasses such as IndentError and TabError should not have this message
applied.

7 years agobpo-31259: test_urllib2_localnet uses addCleanup(server.stop) (#3186)
Victor Stinner [Tue, 22 Aug 2017 16:03:38 +0000 (18:03 +0200)]
bpo-31259: test_urllib2_localnet uses addCleanup(server.stop) (#3186)

Use self.addCleanup(self.server.stop) to stop the HTTP server. Some
tests didn't stop the server like test_https().

Fix also the usage of support.threading_cleanup().

7 years agobpo-31234: fork_wait tests now join threads (#3139) (#3187)
Victor Stinner [Tue, 22 Aug 2017 16:03:03 +0000 (18:03 +0200)]
bpo-31234: fork_wait tests now join threads (#3139) (#3187)

fork_wait.py tests now joins threads, to not leak running threads in
the background.

(cherry picked from commit c99d41f9c0304fcf06550515c3db55f93a629e9e)

7 years ago[3.6] bpo-30871: Add test.pythoninfo (#3174)
Victor Stinner [Mon, 21 Aug 2017 22:17:15 +0000 (00:17 +0200)]
[3.6] bpo-30871: Add test.pythoninfo (#3174)

* bpo-30871: Add test.pythoninfo (#3075)

* Add Lib/test/pythoninfo.py: script collecting various informations
  about Python to help debugging test failures.
* regrtest: remove sys.hash_info and sys.flags from header.
* Travis CI, Appveyor: run pythoninfo before tests
(cherry picked from commit b907abc88589f7bea52c5afe172ececc6edcda70)

* bpo-30871: pythoninfo: add expat and _decimal (#3121)

* bpo-30871: pythoninfo: add expat and _decimal

* Remove _decimal.__version__

The string is hardcoded, not really interesting.

(cherry picked from commit f6ebd838f00b4c211c72d85ee49749e910cd3afe)

* bpo-30871: Add "make pythoninfo" (#3120)

(cherry picked from commit a3a01a2fceab2188b282ab9911f79c99a4c32273)

* bpo-30871: pythoninfo: more sys, os, time data (#3130)

* bpo-30871: pythoninfo: more sys, os, time data

PythonInfo now converts types other than intger to string by default.

* fix typo

(cherry picked from commit ad7eaed54382b346784e51a6f0122ce81e8842b5)

* bpo-31231: Fix pythoninfo in Travis config (#3134)

bpo-31231, bpo-30871: Replace "./python -m test.pythoninfo" with
"make pythoninfo", since macOS uses ./python.exe.
(cherry picked from commit 92b1f90143286385c0ff5be98d3721b90580a912)

7 years ago[3.6] bpo-30121: Fix debug assert in subprocess on Windows (#1224) (#3173)
Victor Stinner [Mon, 21 Aug 2017 22:15:23 +0000 (00:15 +0200)]
[3.6] bpo-30121: Fix debug assert in subprocess on Windows (#1224) (#3173)

* bpo-30121: Fix debug assert in subprocess on Windows (#1224)

* bpo-30121: Fix debug assert in subprocess on Windows

This is caused by closing HANDLEs using os.close which is for CRT file
descriptors and not for HANDLEs.

* bpo-30121: Suppress debug assertion in test_subprocess when ran directly

(cherry picked from commit 4d3851727fb82195e4995c6064b0b2d6cbc031c4)

* Add test_subprocess.test_nonexisting_with_pipes() (#3133)

bpo-30121: Test the Popen failure when Popen was created with pipes.
Create also NONEXISTING_CMD variable in test_subprocess.py.
(cherry picked from commit 9a83f651f31b47b3f6c8b210f7807b26e8c373a5)

7 years agobpo-31247: xmlrpc.server: break reference cycle (#3166) (#3168)
Victor Stinner [Mon, 21 Aug 2017 16:35:04 +0000 (18:35 +0200)]
bpo-31247: xmlrpc.server: break reference cycle (#3166) (#3168)

xmlrpc.server now explicitly breaks reference cycles when using
sys.exc_info() in code handling exceptions.
(cherry picked from commit 84524454d0ba77d299741c47bd0f5841ac3f66ce)

7 years ago[3.6] bpo-31206: IDLE: Factor HighPage class from ConfigDialog (GH-3160) (#3162)
Cheryl Sabella [Sun, 20 Aug 2017 23:21:51 +0000 (19:21 -0400)]
[3.6] bpo-31206: IDLE: Factor HighPage class from ConfigDialog (GH-3160) (#3162)

Part 3 of 3.  Remove old highlight functions and load_config as this functionality is now contained within classes. Patch by Cheryl Sabella.
(cherry picked from commit 4bfebc63012f0f4e00f6a98c3d96e1c0ebe93408)

7 years ago[3.6] bpo-31206: IDLE: Factor HighPage class from ConfigDialog (GH-3156) (#3159)
Cheryl Sabella [Sun, 20 Aug 2017 12:03:05 +0000 (08:03 -0400)]
[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 8f7a798edbdbca9a400105e3225463e59b334666)

7 years ago[3.6] bpo-31206: IDLE: Factor HighPage class from ConfigDialog (GH-3141) (#3154)
Cheryl Sabella [Sat, 19 Aug 2017 13:22:54 +0000 (09:22 -0400)]
[3.6] bpo-31206: IDLE: Factor HighPage class from ConfigDialog (GH-3141) (#3154)

This is the first half of a patch similar to the one for for bpo-31205.  It is being split into 2 PRs to avoid what happened with PR-3096 -- an incomprehensible diff that could not be cleanly backported to 3.6.  This half copies several methods of ConfigDialog and turns them into a new class.  Patch by Cheryl Sabella.
(cherry picked from commit a32e40561a24de373d1c5a437a8aa329758ba8e4)

7 years ago[3.6] bpo-31232: Backport custom print rshift message (GH-3155)
Nick Coghlan [Sat, 19 Aug 2017 06:59:38 +0000 (16:59 +1000)]
[3.6] bpo-31232: Backport custom print rshift message (GH-3155)

bpo-30721 added a "Did you mean ...?" suggestion to rshift
TypeError messages that triggers when the LHS is a Python
C function called "print".

Since this custom error message is expected to be triggered
primarily by attempts to use Python 2 print redirection syntax
in Python 3, and is incredibly unlikely to be encountered
otherwise, it is also being backported to the next 3.6
maintenance release.

Initial patch by Sanyam Khurana.

7 years agobpo-31234: test_threading: fix ref cycle (#3150) (#3152)
Victor Stinner [Sat, 19 Aug 2017 00:32:54 +0000 (02:32 +0200)]
bpo-31234: test_threading: fix ref cycle (#3150) (#3152)

test_bare_raise_in_brand_new_thread() now explicitly breaks a
reference cycle to not leak a dangling thread.
(cherry picked from commit 3d284c081fc3042036adfe1bf2ce92c34d743b0b)

7 years agobpo-31235: Fix ResourceWarning in test_logging (#3147) (#3149)
Victor Stinner [Fri, 18 Aug 2017 23:11:44 +0000 (01:11 +0200)]
bpo-31235: Fix ResourceWarning in test_logging (#3147) (#3149)

(cherry picked from commit a7719e27b3cad0f2b86cb932a76cbe55c541b02e)

7 years agobpo-30947: Update libexpat from 2.2.1 to 2.2.3 (#3106) (#3143)
Victor Stinner [Fri, 18 Aug 2017 23:06:27 +0000 (01:06 +0200)]
bpo-30947: Update libexpat from 2.2.1 to 2.2.3 (#3106) (#3143)

* bpo-30947: Update libexpat from 2.2.1 to 2.2.3

* Add NEWS entry

* Add new loadlibrary.c

* expat_external.h: restore include "pyexpatns.h"

* PCbuild: add expat/loadlibrary.c

* Define XML_POOR_ENTROPY to compile expat

(cherry picked from commit 93d0cb58b4da2a88c56f472c6c19491cc7a390df)

7 years agoFix broken `Show Source` links on documentation pages (GH-3113) (GH-3125)
Mariatta [Fri, 18 Aug 2017 13:21:33 +0000 (06:21 -0700)]
Fix broken `Show Source` links on documentation pages (GH-3113) (GH-3125)

The `Show Source` was broken because of a change made in sphinx 1.5.1
In Sphinx 1.4.9, the sourcename was "index.txt".
In Sphinx 1.5.1+, it is now "index.rst.txt".
(cherry picked from commit b9ff498793611d1c6a9b99df464812931a1e2d69)

7 years ago[3.6] bpo-31001: IDLE: Add tests for configdialog highlight tab (GH-3123) (#3124)
Terry Jan Reedy [Fri, 18 Aug 2017 01:02:20 +0000 (21:02 -0400)]
[3.6] bpo-31001: IDLE: Add tests for configdialog highlight tab (GH-3123) (#3124)

(cherry picked from commit 82aff62)

7 years ago[3.6] bpo-31221: patchcheck ignores external libraries (#3109) (#3116)
Victor Stinner [Thu, 17 Aug 2017 14:53:27 +0000 (16:53 +0200)]
[3.6] bpo-31221: patchcheck ignores external libraries (#3109) (#3116)

* bpo-31221: patchcheck ignores external libraries (#3109)

Tools/scripts/patchcheck.py now ignores changes in directories which
are copies of external libraries:

* Modules/_ctypes/libffi_msvc/
* Modules/_ctypes/libffi_osx/
* Modules/_decimal/libmpdec/
* Modules/expat/
* Modules/zlib/

Drop also support for Mercurial, since CPython migrated to Git.

Exclude also libmpdec

patchcheck: exclude also libffi_osx and libffi_msvc
(cherry picked from commit 4a347ce426fe7381885703d9074d7a6b3aeb2f2b)

* Exclude also Modules/_ctypes/libffi on Python 3.6

7 years agoUpdate the language selection in the docs language switch. (GH-3114) (#3115)
Julien Palard [Thu, 17 Aug 2017 14:37:00 +0000 (16:37 +0200)]
Update the language selection in the docs language switch. (GH-3114) (#3115)

Change the option for `Français` into `French` to be consistent with the other language selections that are already in English.
(cherry picked from commit b616b972999cdd5fe54ef8a43c131a27ca538dee)

7 years agobpo-29619: Do not use HAVE_LARGEFILE_SUPPORT for type conversions (GH-1666) (#3102)
Victor Stinner [Thu, 17 Aug 2017 12:33:06 +0000 (14:33 +0200)]
bpo-29619: Do not use HAVE_LARGEFILE_SUPPORT for type conversions (GH-1666) (#3102)

Use only the LongLong form for the conversions

(cherry picked from commit 50e86033de85294d87b7e942701d456342abde8e)

7 years agobpo-31069, test_multiprocessing: Fix dangling process (#3103) (#3104)
Victor Stinner [Wed, 16 Aug 2017 11:14:38 +0000 (13:14 +0200)]
bpo-31069, test_multiprocessing: Fix dangling process (#3103) (#3104)

Fix a warning about dangling processes in test_rapid_restart() of
_test_multiprocessing: join the process.
(cherry picked from commit 17657bb9458ff8f8804b7637d61686a68f4b9471)

7 years agoRevert "[3.6] bpo-30983: eval frame rename in pep 0523 broke gdb's python extension...
Victor Stinner [Wed, 16 Aug 2017 09:02:08 +0000 (11:02 +0200)]
Revert "[3.6] bpo-30983: eval frame rename in pep 0523 broke gdb's python extension (GH-2803) (#3090)" (#3101)

This reverts commit 09b77165e3fffa7b7ff160ad06042cdcfa004bf5.

7 years ago[3.6] bpo-30928: Update idlelib/NEWS.txt to 2017-08-15. (GH-3098) (#3099)
Terry Jan Reedy [Tue, 15 Aug 2017 23:41:03 +0000 (19:41 -0400)]
[3.6] bpo-30928: Update idlelib/NEWS.txt to 2017-08-15. (GH-3098) (#3099)

(cherry picked from commit 7f06684)

7 years ago[3.6] bpo-31205: IDLE: Factor KeysPage class from ConfigDialog (GH-3096) (#3097)
Terry Jan Reedy [Tue, 15 Aug 2017 23:13:11 +0000 (19:13 -0400)]
[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 e36d9f5568093b3885da62a0bf0fdfbe3771672b)

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

7 years ago[3.6] bpo-30714: ALPN changes for OpenSSL 1.1.0f (#3093)
Christian Heimes [Tue, 15 Aug 2017 08:45:40 +0000 (10:45 +0200)]
[3.6] bpo-30714: ALPN changes for OpenSSL 1.1.0f (#3093)

OpenSSL 1.1.0 to 1.1.0e aborted the handshake when server and client
could not agree on a protocol using ALPN. OpenSSL 1.1.0f changed that.
The most recent version now behaves like OpenSSL 1.0.2 again. The ALPN
callback can pretend to not been set.

See https://github.com/openssl/openssl/pull/3158 for more details

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit a5c1bab352671e043645163ca50c5211aa657acd)

7 years ago[3.6] bpo-31002: IDLE: Add tests for configdialog keys tab (GH-2996) (#3092)
Terry Jan Reedy [Tue, 15 Aug 2017 01:45:02 +0000 (21:45 -0400)]
[3.6] bpo-31002: IDLE: Add tests for configdialog keys tab (GH-2996) (#3092)

Patch by Cheryl Sabella.
(cherry picked from commit 2f89646)

7 years ago[3.6] bpo-30983: eval frame rename in pep 0523 broke gdb's python extension (GH-2803...
Łukasz Langa [Mon, 14 Aug 2017 23:06:28 +0000 (16:06 -0700)]
[3.6] bpo-30983: eval frame rename in pep 0523 broke gdb's python extension (GH-2803) (#3090)

pep 0523 renames PyEval_EvalFrameEx to _PyEval_EvalFrameDefault while the gdb python extension only looks for PyEval_EvalFrameEx to understand if it is dealing with a frame.

Final effect is that attaching gdb to a python3.6 process doesnt resolve python objects. Eg. py-list and py-bt dont work properly.

This patch fixes that. Tested locally on python3.6
(cherry picked from commit 2e0f4db114)

7 years agobpo-31067: test_subprocess calls reap_children() (#2931) (#3074)
Victor Stinner [Fri, 11 Aug 2017 15:14:37 +0000 (17:14 +0200)]
bpo-31067: test_subprocess calls reap_children() (#2931) (#3074)

test_subprocess now also calls reap_children() in tearDown(), not
only on setUp().
(cherry picked from commit cc42c121eb5346f673247f95dac575aadb77d66c)

7 years agobpo-31173: Rewrite WSTOPSIG test of test_subprocess (#3055) (#3070)
Victor Stinner [Fri, 11 Aug 2017 00:36:30 +0000 (02:36 +0200)]
bpo-31173: Rewrite WSTOPSIG test of test_subprocess (#3055) (#3070)

The current test_child_terminated_in_stopped_state() function test
creates a child process which calls ptrace(PTRACE_TRACEME, 0, 0) and
then crash (SIGSEGV). The problem is that calling os.waitpid() in the
parent process is not enough to close the process: the child process
remains alive and so the unit test leaks a child process in a
strange state. Closing the child process requires non-trivial code,
maybe platform specific.

Remove the functional test and replaces it with an unit test which
mocks os.waitpid() using a new _testcapi.W_STOPCODE() function to
test the WIFSTOPPED() path.
(cherry picked from commit 7b7c6dcfff6a35333988a3c74c895ed19dff2e09)

7 years agobpo-31008: Fix asyncio test_wait_for_handle on Windows (#3065) (#3068)
Victor Stinner [Thu, 10 Aug 2017 23:52:13 +0000 (01:52 +0200)]
bpo-31008: Fix asyncio test_wait_for_handle on Windows (#3065) (#3068)

(cherry picked from commit 5659a72f487579be76335c09c8ba8b2f1800adde)

7 years agobpo-31159: fix language switch regex on unknown yet built languages. … (#3051)
Julien Palard [Thu, 10 Aug 2017 14:54:26 +0000 (16:54 +0200)]
bpo-31159: fix language switch regex on unknown yet built languages. … (#3051)

* bpo-31159: fix language switch regex on unknown yet built languages. (#3039)

This fix a regex issue (a missing non-matching group around an 'or'
list) and the specific possible case where a translation is built but
not yet in known by the picker, but not explicitly listing possible
languages in the regex.
(cherry picked from commit 122081deef86174beee965be1207fa46ea23533d)

* bpo-31149: Doc: Add Japanese to the language switcher. (#3028)

(cherry picked from commit c82b7f332aff606af6c9c163da75f1e86514125e)

7 years ago[3.6] bpo-31160: Backport reap_children() fixes from master to 3.6 (#3060)
Victor Stinner [Thu, 10 Aug 2017 14:02:00 +0000 (16:02 +0200)]
[3.6] bpo-31160: Backport reap_children() fixes from master to 3.6 (#3060)

* bpo-31160: Fix test_builtin for zombie process (#3043)

PtyTests.run_child() now calls os.waitpid() to read the exit status
of the child process to avoid creating zombie process and leaking
processes in the background.
(cherry picked from commit 4baca1b0f7325032598cd38e7ceffc79b616d255)

* bpo-31160: regrtest now reaps child processes (#3044)

Add a post_test_cleanup() function which currently only calls
support.reap_children().
(cherry picked from commit e3510d74aacc477c30f42f2b941d69689bbc478e)

* bpo-31160: test_builtin: don't check waitpid() status (#3050)

(cherry picked from commit 3ca9f50f96cfa5c1b7aa56639042531b57f07fbb)

* bpo-31160: test_tempfile: Fix reap_children() warning (#3056)

TestRandomNameSequence.test_process_awareness() now calls
os.waitpid() to avoid leaking a zombie process.
(cherry picked from commit 6c8c2943d996b59a48d331f61f22cbe72933910e)

7 years ago[3.6] bpo-19903: IDLE: Calltips changed to use inspect.signature (GH-2822) (#3053)
Terry Jan Reedy [Thu, 10 Aug 2017 04:46:29 +0000 (00:46 -0400)]
[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 3b0f620c1a2a21272a9e2aeca6ca1d1ac10f8162)

7 years ago[3.6] bpo-31150: Wait for child process in test_forkinthread to avoid thread reaped...
Ammar Askar [Wed, 9 Aug 2017 14:59:22 +0000 (10:59 -0400)]
[3.6] bpo-31150: Wait for child process in test_forkinthread to avoid thread reaped warnings (#3041)

7 years ago[3.6] bpo-31070: Fix a race condition in importlib _get_module_lock(). (GH-3033)...
Serhiy Storchaka [Wed, 9 Aug 2017 11:56:13 +0000 (14:56 +0300)]
[3.6] bpo-31070: Fix a race condition in importlib _get_module_lock(). (GH-3033). (#3038)

(cherry picked from commit 9b0d1d647e3d2ec9d299e5c9f49b02fbbb810a5a)

7 years agottk: fix LabeledScale and OptionMenu destroy() method (#3025) (#3030)
Victor Stinner [Wed, 9 Aug 2017 08:48:11 +0000 (10:48 +0200)]
ttk: fix LabeledScale and OptionMenu destroy() method (#3025) (#3030)

bpo-31135: Call the parent destroy() method even if the used
attribute doesn't exist.

The LabeledScale.destroy() method now also explicitly clears label
and scale attributes to help the garbage collector to destroy all
widgets.
(cherry picked from commit cd7e9c1b67d3d07ee03e0a79af2791c19031cecb)

7 years agobpo-31045: Language switch (#2652) (#3023)
Julien Palard [Tue, 8 Aug 2017 12:13:53 +0000 (14:13 +0200)]
bpo-31045: Language switch (#2652) (#3023)

* Doc: Indicate the language

* Renaming version_switcher to switchers (to add language_switcher).

* Adding language switch.

* Doc switchers: Enhance readability of regex parsing versions.

* Doc switchers: Desambiguate the need of a replace(/\/+$/g, '') by proper naming.

* Doc switchers: py3k can't reach js, it's redirected server-side by nginx.

* Doc switchers: Examples matching actual regexes.

* Doc switchers: Better fallback on unexisting translated version.

(cherry picked from commit dff9b5f9d62aa0b23f8a255867d09d11890efd1b)

7 years ago[3.6] bpo-31130: IDLE -- stop leaks in test_configdialog. (GH-3016) (#3018)
Terry Jan Reedy [Mon, 7 Aug 2017 19:20:03 +0000 (15:20 -0400)]
[3.6] bpo-31130: IDLE -- stop leaks in test_configdialog. (GH-3016) (#3018)

Initial patch by Victor Stinner.
(cherry picked from commit 733d0f6)

7 years ago[3.6] bpo-29910: IDLE - revert `break`s that disabled calltip close. (GH-2997) (...
Terry Jan Reedy [Mon, 7 Aug 2017 18:23:07 +0000 (14:23 -0400)]
[3.6] bpo-29910: IDLE - revert `break`s that disabled calltip close. (GH-2997) (#3017)

(cherry picked from commit 8922587)

7 years ago[3.6] bpo-30808: Use _Py_atomic API for concurrency-sensitive signal state (GH-2417...
Antoine Pitrou [Sun, 6 Aug 2017 17:32:39 +0000 (19:32 +0200)]
[3.6] bpo-30808: Use _Py_atomic API for concurrency-sensitive signal state (GH-2417) (#3007)

* Improve signal delivery

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

* Remove unused function

* Improve comments

* Use _Py_atomic API for concurrency-sensitive signal state

* Add blurb
(cherry picked from commit 2c8a5e4c968217f9672340e520942c4ed788d8de)

7 years agobpo-31029: test_tokenize Add missing import unittest (#2998)
Rajath Agasthya [Sat, 5 Aug 2017 18:28:17 +0000 (11:28 -0700)]
bpo-31029: test_tokenize Add missing import unittest (#2998)

7 years ago[3.6] bpo-31107: Fix copyreg mangled slot names calculation. (GH-2989) (#3003)
Shane Harvey [Sat, 5 Aug 2017 15:01:10 +0000 (08:01 -0700)]
[3.6] bpo-31107: Fix copyreg mangled slot names calculation. (GH-2989) (#3003)

(cherry picked from commit c4c9866064f03646c686d7e08b00aeb203c35c19)

7 years agoFix a shadow-compatible-local warning (#2181)
Yuan Chao Chou [Fri, 4 Aug 2017 17:53:42 +0000 (10:53 -0700)]
Fix a shadow-compatible-local warning (#2181)

Change the shadowing naming, 'value' (Python-ast.c:4686), to 'val'
to prevent the variables from being misused.

7 years ago[3.6] Improve grammar in asyncio documentation (GH-2993) (GH-2994)
Mariatta [Thu, 3 Aug 2017 14:33:33 +0000 (00:33 +1000)]
[3.6] Improve grammar in asyncio documentation (GH-2993) (GH-2994)

"not only is it .." is the correct form, as opposed to:
"not only it is ..."
(cherry picked from commit 87c3c5de731af18a271f4559cd69ccb8d050208f)

7 years ago[3.6] bpo-31071: Avoid masking original TypeError in call with * unpacking (GH-2957...
Serhiy Storchaka [Thu, 3 Aug 2017 09:14:35 +0000 (12:14 +0300)]
[3.6] bpo-31071: Avoid masking original TypeError in call with * unpacking (GH-2957) (#2991)

when other arguments are passed.
(cherry picked from commit 25e4f77)

7 years ago[3.6] bpo-30978: str.format_map() now passes key lookup exceptions through. (GH-2790...
Serhiy Storchaka [Thu, 3 Aug 2017 09:14:07 +0000 (12:14 +0300)]
[3.6] bpo-30978: str.format_map() now passes key lookup exceptions through. (GH-2790) (#2992)

Previously any exception was replaced with a KeyError exception.
(cherry picked from commit 5075416)

7 years agobpo-31061: fix crash in asyncio speedup module (GH-2984)
INADA Naoki [Wed, 2 Aug 2017 07:50:39 +0000 (16:50 +0900)]
bpo-31061: fix crash in asyncio speedup module (GH-2984)

(cherry picked from commit de34cbe9cdaaf7b85fed86f99c2fd071e1a7b1d2)

7 years ago[3.6] bpo-31083: IDLE: Describe the Page classes in configdialog (GH-2965) (#2973)
Terry Jan Reedy [Tue, 1 Aug 2017 05:00:33 +0000 (01:00 -0400)]
[3.6] bpo-31083: IDLE: Describe the Page classes in configdialog (GH-2965) (#2973)

Add template as comment. Update existing classes to match outline.
Initial patch by Cheryl Sabella.
(cherry picked from commit 6f446be)

7 years agoRemove .mention-bot (GH-2923) (GH-2970)
Mariatta [Tue, 1 Aug 2017 04:34:36 +0000 (21:34 -0700)]
Remove .mention-bot (GH-2923) (GH-2970)

(cherry picked from commit e1e60bd95c376f9b18cbaf9481364281c6cc1bc7)

7 years agobpo-25910: Update LICENSE (GH-2873) (GH-2967)
Mariatta [Tue, 1 Aug 2017 02:59:50 +0000 (19:59 -0700)]
bpo-25910: Update LICENSE (GH-2873) (GH-2967)

Use the copy provided in https://bugs.python.org/issue25910GH-msg295200
(cherry picked from commit 8474d87165593bac2bc231287f42c4cff3fd6aaf)

7 years ago[3.6] bpo-25684: ttk.OptionMenu radiobuttons weren't unique (GH-2276) (#2959)
csabella [Mon, 31 Jul 2017 19:10:13 +0000 (15:10 -0400)]
[3.6] bpo-25684: ttk.OptionMenu radiobuttons weren't unique (GH-2276) (#2959)

between instances of OptionMenu.
(cherry picked from commit a568e5273382a5dca0c27274f7d8e34c41a87d4d)

* Update Misc/ACKS

7 years ago[3.6] bpo-31050: IDLE: Factor GenPage class from ConfigDialog (GH-2952) (#2955)
Terry Jan Reedy [Sun, 30 Jul 2017 23:02:51 +0000 (19:02 -0400)]
[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)

7 years ago[3.6] bpo-31004: IDLE: Factor out FontPage class from configdialog (step 1) (GH-2905...
Terry Jan Reedy [Sun, 30 Jul 2017 19:00:50 +0000 (15:00 -0400)]
[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)

7 years ago[3.6] bpo-30928: Update IDLE News.txt. (GH-2948) (#2949)
Terry Jan Reedy [Sun, 30 Jul 2017 17:35:46 +0000 (13:35 -0400)]
[3.6] bpo-30928: Update IDLE News.txt. (GH-2948) (#2949)

(cherry picked from commit c3aa47f655abe564a2c2fb6d091ab19bdc0113b5)

7 years ago[3.6] bpo-30803: clarify truth value testing documentation (GH-2508) (#2946)
Terry Jan Reedy [Sat, 29 Jul 2017 22:56:06 +0000 (18:56 -0400)]
[3.6] bpo-30803: clarify truth value testing documentation (GH-2508) (#2946)

Initial patch by Peter Thomassen.
(cherry picked from commit caa1280)

7 years ago[3.6] bpo-31027: Fix test_listcomps failure when run directly (GH-2939) (#2945)
Terry Jan Reedy [Sat, 29 Jul 2017 18:38:24 +0000 (14:38 -0400)]
[3.6] bpo-31027: Fix test_listcomps failure when run directly (GH-2939) (#2945)

Bug appears to be incomplete copy-paste-edit.
(cherry picked from commit ceb93f4)

7 years ago[3.6] bpo-30781: IDLE - Use ttk Notebook in ConfigDialog (GH-2938) (#2944)
Terry Jan Reedy [Sat, 29 Jul 2017 05:28:05 +0000 (01:28 -0400)]
[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)

7 years agoFix trivial typo in multiprocessing documentation (GH-2930) (GH-2940)
Mariatta [Sat, 29 Jul 2017 02:55:23 +0000 (19:55 -0700)]
Fix trivial typo in multiprocessing documentation (GH-2930) (GH-2940)

(cherry picked from commit 6fcb69dad579cc9a7dc15eabead43b6c37464f8c)

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)