]> granicus.if.org Git - python/log
python
7 years ago[2.7] bpo-31423: Fix building the PDF documentation (GH-3693) (GH-3700)
Zachary Ware [Fri, 22 Sep 2017 18:41:10 +0000 (13:41 -0500)]
[2.7] bpo-31423: Fix building the PDF documentation (GH-3693) (GH-3700)

Use prefixed macro names for the `authoraddress` function, add T2A to the font encoding in LaTeX sources to support Cyrillic characters in the PDF documentation, and replace the deprecated `font_size` config option with `pointsize`.
(cherry picked from commit da9b4cfb488119f2493a762fcb1d85c58494f51d)

7 years agobpo-31533: fix broken link to OpenSSL docs (GH-3674) (GH-3676)
Christian Heimes [Wed, 20 Sep 2017 20:23:09 +0000 (22:23 +0200)]
bpo-31533: fix broken link to OpenSSL docs (GH-3674) (GH-3676)

(cherry picked from commit 19e4d93)

7 years agoa post 2.7.14 world
Benjamin Peterson [Sat, 16 Sep 2017 18:31:32 +0000 (11:31 -0700)]
a post 2.7.14 world

7 years agomerge 2.7.14 release branch
Benjamin Peterson [Sat, 16 Sep 2017 18:30:58 +0000 (11:30 -0700)]
merge 2.7.14 release branch

7 years ago2.7.14 final version bumps v2.7.14
Benjamin Peterson [Sat, 16 Sep 2017 17:38:35 +0000 (10:38 -0700)]
2.7.14 final version bumps

7 years agobpo-29916: Include PyGetSetDef in C API extension documentation. (#831) (#3609)
Michael Seifert [Sat, 16 Sep 2017 11:30:07 +0000 (13:30 +0200)]
bpo-29916: Include PyGetSetDef in C API extension documentation. (#831) (#3609)

(cherry picked from commit da67e0d644bd3185efdaa4d15cc2ac0828ca83f9)

7 years agobpo-31474: Fix -Wint-in-bool-context warnings (#3581)
Christian Heimes [Fri, 15 Sep 2017 18:27:23 +0000 (20:27 +0200)]
bpo-31474: Fix -Wint-in-bool-context warnings (#3581)

Signed-off-by: Christian Heimes <christian@python.org>
7 years ago[2.7] bpo-31471: Fix assertion failure in subprocess.Popen() on Windows, in case...
Oren Milman [Fri, 15 Sep 2017 07:20:11 +0000 (10:20 +0300)]
[2.7] bpo-31471: Fix assertion failure in subprocess.Popen() on Windows, in case env has a bad keys() method. (GH-3580) (#3595)

7 years agoconsistently use Py_TYPE, Py_REFCNT, and correct initializer macros (#3563)
Benjamin Peterson [Thu, 14 Sep 2017 04:20:29 +0000 (21:20 -0700)]
consistently use Py_TYPE, Py_REFCNT, and correct initializer macros (#3563)

This no-op change makes 2.7 more consistent with 3.x to ease comparison and backports.

7 years ago[2.7] bpo-30442: Skips refcount test in test_xml_etree under coverage (GH-1767) ...
Miss Islington (bot) [Wed, 13 Sep 2017 22:17:55 +0000 (15:17 -0700)]
[2.7] bpo-30442: Skips refcount test in test_xml_etree under coverage (GH-1767) (#3549)

(cherry picked from commit 1de4705d00168afa8c5b6741af02e21fc609af58)

7 years agobpo-31234: fork_wait tests now join threads (#3139) (#3535)
Victor Stinner [Wed, 13 Sep 2017 10:26:54 +0000 (03:26 -0700)]
bpo-31234: fork_wait tests now join threads (#3139) (#3535)

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

(cherry picked from commit c99d41f9c0304fcf06550515c3db55f93a629e9e)

7 years agobpo-17085: test_socket: cancel scheduled alarm on test failure (#3505)
Victor Stinner [Mon, 11 Sep 2017 22:31:16 +0000 (15:31 -0700)]
bpo-17085: test_socket: cancel scheduled alarm on test failure (#3505)

(cherry picked from commit 71fe8c00f6e2eda39d90c225c5f7635268cc4653)

7 years ago[2.7] bpo-31411: Prevent raising a SystemError in case warnings.onceregistry is not...
Serhiy Storchaka [Mon, 11 Sep 2017 07:01:31 +0000 (10:01 +0300)]
[2.7] bpo-31411: Prevent raising a SystemError in case warnings.onceregistry is not a dictionary. (GH-3485). (#3493)

(cherry picked from commit 252033d50effa08046ac34fcc406bc99796ab88b)

7 years ago[2.7] bpo-29526: Add reference to help('FORMATTING') in format() builtin (GH-166...
Serhiy Storchaka [Mon, 11 Sep 2017 06:26:39 +0000 (09:26 +0300)]
[2.7] bpo-29526: Add reference to help('FORMATTING') in format() builtin (GH-166). (#3492)

(cherry picked from commit 2e6bb4484ee1b0da67d1dfcf0816c58602daa5a0)

7 years agobpo-25684: ttk.OptionMenu radiobuttons weren't unique (GH-2276) (GH-2960)
Cheryl Sabella [Sun, 10 Sep 2017 06:02:14 +0000 (02:02 -0400)]
bpo-25684: ttk.OptionMenu radiobuttons weren't unique (GH-2276) (GH-2960)

ttk.OptionMenu radiobuttons weren't unique
between instances of OptionMenu.
(cherry picked from commit a568e5273382a5dca0c27274f7d8e34c41a87d4d)

7 years ago[2.7] Clarify nature of parse_args 'args' argument. (GH-3292) (GH-3328)
R. David Murray [Sun, 10 Sep 2017 05:55:07 +0000 (01:55 -0400)]
[2.7] Clarify nature of parse_args 'args' argument. (GH-3292) (GH-3328)

Patch by Paul.j3.  Includes an unrelated but useful addition to the
optparse porting section.
(cherry picked from commit 0c7983e4adf9604d0ac93757a45d14be06c27696)

7 years ago[2.7] bpo-30450: Fall back on the old env.bat (GH-3443)
Zachary Ware [Fri, 8 Sep 2017 18:21:06 +0000 (11:21 -0700)]
[2.7] bpo-30450: Fall back on the old env.bat (GH-3443)

7 years ago[2.7] bpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3 (GH-1363) (#3446)
Christian Heimes [Fri, 8 Sep 2017 05:31:17 +0000 (22:31 -0700)]
[2.7] bpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3 (GH-1363) (#3446)

* bpo-29136: Add TLS 1.3 support

TLS 1.3 introduces a new, distinct set of cipher suites. The TLS 1.3
cipher suites don't overlap with cipher suites from TLS 1.2 and earlier.
Since Python sets its own set of permitted ciphers, TLS 1.3 handshake
will fail as soon as OpenSSL 1.1.1 is released. Let's enable the common
AES-GCM and ChaCha20 suites.

Additionally the flag OP_NO_TLSv1_3 is added. It defaults to 0 (no op) with
OpenSSL prior to 1.1.1. This allows applications to opt-out from TLS 1.3
now.

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

7 years agobpo-31379: Added $(RUNSHARED) to run_profile_task (#3422)
Xiang Zhang [Fri, 8 Sep 2017 01:56:06 +0000 (09:56 +0800)]
bpo-31379: Added $(RUNSHARED) to run_profile_task (#3422)

7 years ago[2.7] bpo-28958: Improve SSLContext error reporting. (GH-3414) (#3433)
Christian Heimes [Thu, 7 Sep 2017 23:45:07 +0000 (16:45 -0700)]
[2.7] bpo-28958: Improve SSLContext error reporting. (GH-3414) (#3433)

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

7 years ago[2.7] bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. ...
Miss Islington (bot) [Thu, 7 Sep 2017 21:17:42 +0000 (14:17 -0700)]
[2.7] bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. (GH-3272) (GH-3428)

Also provide a solution if the user wants to keep multiple blank lines.
(cherry picked from commit 397c467c49385023de36411194d381ac993bae1a)

7 years ago[2.7] bpo-29766: Fix configure/.ac to match LTO/enable-optimizations behavior. (...
Hanno Schlichting [Thu, 7 Sep 2017 18:43:45 +0000 (20:43 +0200)]
[2.7] bpo-29766: Fix configure/.ac to match LTO/enable-optimizations behavior. (#2705)

See also 1f29cefc87c4c2ee629367ebe97a287d8e0b3e29.  The configure.ac change was omitted from the earlier change...

7 years ago[2.7] Update multissl test helper (GH-3349) (#3416)
Christian Heimes [Thu, 7 Sep 2017 17:12:22 +0000 (10:12 -0700)]
[2.7] Update multissl test helper (GH-3349) (#3416)

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

7 years ago[2.7] bpo-21649: Add RFC 7525 and Mozilla server side TLS (GH-3387) (GH-3400)
Miss Islington (bot) [Thu, 7 Sep 2017 00:31:48 +0000 (17:31 -0700)]
[2.7] bpo-21649: Add RFC 7525 and Mozilla server side TLS (GH-3387) (GH-3400)

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

7 years ago[2.7] bpo-30824: Add mimetype for .json (GH-3048) (#3394)
Miss Islington (bot) [Wed, 6 Sep 2017 22:31:36 +0000 (15:31 -0700)]
[2.7] bpo-30824: Add mimetype for .json (GH-3048) (#3394)

(cherry picked from commit 8204b903683f9e0f037ccfaa87622716019914d7)

7 years agobpo-31355: Travis CI: remove the macOS job (#3367)
Victor Stinner [Wed, 6 Sep 2017 00:57:14 +0000 (02:57 +0200)]
bpo-31355: Travis CI: remove the macOS job (#3367)

7 years ago[2.7] Issue GH-28705: greatly simplify the FAQ entry on transpiling. (#3371)
Benjamin Peterson [Wed, 6 Sep 2017 01:18:16 +0000 (18:18 -0700)]
[2.7] Issue GH-28705: greatly simplify the FAQ entry on transpiling. (#3371)

This also eliminats a dead link to Weave in the process..
(cherry picked from commit 78ffd6cffacb04bea61bb0ef850d05859ab2dbe4)

7 years agoMerge branch 'release-2.7.14' into 2.7
Benjamin Peterson [Wed, 6 Sep 2017 01:06:20 +0000 (18:06 -0700)]
Merge branch 'release-2.7.14' into 2.7

7 years agobpo-31170: Update libexpat from 2.2.3 to 2.2.4 (#3315)
Victor Stinner [Mon, 4 Sep 2017 23:58:08 +0000 (01:58 +0200)]
bpo-31170: Update libexpat from 2.2.3 to 2.2.4 (#3315)

Fix copying of partial characters for UTF-8 input (libexpat bug 115):
https://github.com/libexpat/libexpat/issues/115

(cherry picked from commit 759e30ec47048cb9835c62aaeac48748c8151390)

The standard header stdbool.h is not available
with old Visual Studio compilers

Cherry-picked from libexpat b4b89c2ab0cc5325a41360c25ef9d2ccbe617e5c.

expat: Add artificial scopes in xmltok.c utf8_toUtf8() to fix c89 compilation.

Cherry-picked from libexpat commit e0b290eb3d8f4c4b45137a7d7f4f8db812145bd2

7 years ago[2.7] Cache externals, depending on changes to PCbuild (GH-3308) (#3365)
Zachary Ware [Wed, 6 Sep 2017 01:01:49 +0000 (18:01 -0700)]
[2.7] Cache externals, depending on changes to PCbuild (GH-3308) (#3365)

(cherry picked from commit f801322e92384ef3eac2a9b7ac2c49d37102d0f3)

7 years agobpo-31339: Rewrite time.asctime() and time.ctime() (#3293)
Victor Stinner [Tue, 5 Sep 2017 23:35:39 +0000 (01:35 +0200)]
bpo-31339: Rewrite time.asctime() and time.ctime() (#3293)

* bpo-31339: Rewrite time.asctime() and time.ctime()

Backport and adapt the _asctime() function from the master branch to
not depend on the implementation of asctime() and ctime() from the
external C library. This change fixes a bug when Python is run using
the musl C library.

* bound checks for time.asctime()

* bound checks for time.strftime()

7 years agobpo-30450: Don't use where, XP doesn't have it (GH-3348)
Zachary Ware [Tue, 5 Sep 2017 20:02:03 +0000 (13:02 -0700)]
bpo-30450: Don't use where, XP doesn't have it (GH-3348)

Really this time!

7 years agobpo-27448: Work around a gc.disable race condition in subprocess. (#1932)
Gregory P. Smith [Tue, 5 Sep 2017 18:20:02 +0000 (11:20 -0700)]
bpo-27448: Work around a gc.disable race condition in subprocess. (#1932)

* bpo-27448: Work around a gc.disable race condition in subprocess.

This works around a gc.isenabled/gc.disable race condition in the 2.7
subprocess module by using a lock for the critical section.  It'll
prevent multiple simultaneous subprocess launches from winding up with
gc remaining disabled but it can't fix the ultimate problem: gc enable
and disable is a global setting and a hack.

Users are *strongly encouraged* to use subprocess32 from PyPI instead
of the 2.7 standard library subprocess module.  Mixing threads with
subprocess is a recipie for disaster otherwise even with "fixes" to
ameliorate common issues like this.

* Add a blurb!

7 years ago[2.7] Travis: use ccache (GH-3307) (#3333)
Christian Heimes [Tue, 5 Sep 2017 17:14:03 +0000 (19:14 +0200)]
[2.7] Travis: use ccache (GH-3307) (#3333)

(cherry picked from commit 8adc73c)

7 years ago[2.7] bpo-30502: Fix handling of long oids in ssl. (GH-2909). (#3322)
Christian Heimes [Tue, 5 Sep 2017 17:13:07 +0000 (19:13 +0200)]
[2.7] bpo-30502: Fix handling of long oids in ssl. (GH-2909). (#3322)

(cherry picked from commit e503ca52889bf66ac502702569e726caa7970299)

7 years agoDon't use `where`, it doesn't exist on XP (GH-3330)
Zachary Ware [Tue, 5 Sep 2017 16:34:54 +0000 (09:34 -0700)]
Don't use `where`, it doesn't exist on XP (GH-3330)

7 years ago[2.7] bpo-30102: Call OPENSSL_add_all_algorithms_noconf (GH-3112) (#3343)
Christian Heimes [Tue, 5 Sep 2017 15:12:12 +0000 (17:12 +0200)]
[2.7] bpo-30102: Call OPENSSL_add_all_algorithms_noconf (GH-3112) (#3343)

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[2.7] bpo-31343: Include sys/sysmacros.h (GH-3318) (#3345)
Christian Heimes [Tue, 5 Sep 2017 15:08:45 +0000 (17:08 +0200)]
[2.7] bpo-31343: Include sys/sysmacros.h (GH-3318) (#3345)

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 75b961869a1184895c9d5bf41a57f3c985622662)

7 years ago[2.7] bpo-30622: Change NPN detection: (GH-2079) (#3316)
Christian Heimes [Mon, 4 Sep 2017 23:11:40 +0000 (01:11 +0200)]
[2.7] bpo-30622: Change NPN detection: (GH-2079) (#3316)

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

7 years ago[2.7] bpo-30450: Pull Windows dependencies from GitHub rather than SVN (GH-1783)...
Zachary Ware [Mon, 4 Sep 2017 23:05:33 +0000 (16:05 -0700)]
[2.7] bpo-30450: Pull Windows dependencies from GitHub rather than SVN (GH-1783) (GH-3306)

The Windows build now depends on Python 3.6 to fetch externals, but it
will be downloaded via NuGet (which is downloaded via PowerShell) if it
is not available via `py -3.6`.  This means the only thing that must be
installed on a modern Windows box to do a full build of CPython with all
extensions is Visual Studio.

Cherry-picked from 51599e2bdd10ab77212a7cbb41a13ea70ee13da8, parts of 40a23e88994aca92c83c8e84ab8b8cdc11d7ec54, parts of 68d663cf85d1ac5eaf83482eed39c0a6f8093601d5cd21d75a27a377f2f9c8370fd8e8c7efaeefb1, and possibly others that I've missed.

Also:

* Rename db -> bsddb for disambiguity

* Update sqlite3 to 3.14.2.0 since it's the version we use on 3.x, and it's simpler to just use it than to also upload the old version to cpython-source-deps

* Add PCbuild/*.ilk to .gitignore

7 years ago[2.7] bpo-25674: remove sha256.tbs-internet.com ssl test (GH-3297) (#3301)
Christian Heimes [Mon, 4 Sep 2017 21:08:36 +0000 (23:08 +0200)]
[2.7] bpo-25674: remove sha256.tbs-internet.com ssl test (GH-3297) (#3301)

* bpo-25674: remove sha256.tbs-internet.com ssl test (#3297)

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

* [2.7] bpo-25674: remove sha256.tbs-internet.com ssl test (GH-3297)

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

7 years agoBlurbify 2.7. (#3286)
larryhastings [Mon, 4 Sep 2017 18:28:25 +0000 (11:28 -0700)]
Blurbify 2.7. (#3286)

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

(cherry picked from commit a6296d34a478b4f697ea9db798146195075d496c)

7 years ago[2.7] bpo-10746: Fix ctypes PEP 3118 type codes for c_long, c_bool, c_int (GH-31...
Pauli Virtanen [Sat, 2 Sep 2017 16:24:32 +0000 (18:24 +0200)]
[2.7] bpo-10746: Fix ctypes PEP 3118 type codes for c_long, c_bool, c_int (GH-31) (#3242)

[2.7] bpo-10746: Fix ctypes PEP 3118 type codes for c_long, c_bool, c_int (GH-31)

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[2.7] bpo-31243: Fixed PyArg_ParseTuple failure checks. (GH-3171) (#3235)
Oren Milman [Tue, 29 Aug 2017 16:16:12 +0000 (19:16 +0300)]
[2.7] bpo-31243: Fixed PyArg_ParseTuple failure checks. (GH-3171) (#3235)

7 years agoEnables RC markings in nuget packages. (#3216)
Steve Dower [Sun, 27 Aug 2017 01:00:48 +0000 (18:00 -0700)]
Enables RC markings in nuget packages. (#3216)

7 years agoMerge branch 'release-2.7.14' into 2.7
Benjamin Peterson [Sat, 26 Aug 2017 20:42:29 +0000 (13:42 -0700)]
Merge branch 'release-2.7.14' into 2.7

7 years ago[2.7] bpo-28261: Prevent raising SystemError where PyArg_ParseTuple is used to parse...
Oren Milman [Sat, 26 Aug 2017 18:56:31 +0000 (21:56 +0300)]
[2.7] bpo-28261: Prevent raising SystemError where PyArg_ParseTuple is used to parse non-args. (#3213)

7 years agoversion bumps for 2.7.14rc1 v2.7.14rc1
Benjamin Peterson [Sat, 26 Aug 2017 18:18:30 +0000 (11:18 -0700)]
version bumps for 2.7.14rc1

7 years agoupdate pydoc topics
Benjamin Peterson [Sat, 26 Aug 2017 18:17:02 +0000 (11:17 -0700)]
update pydoc topics

7 years agocoalesce blurbs for 2.7.14rc1
Benjamin Peterson [Sat, 26 Aug 2017 18:13:23 +0000 (11:13 -0700)]
coalesce blurbs for 2.7.14rc1

7 years agobpo-31258: test_urllib2_localnet uses addCleanup(server.stop) (#3184)
Victor Stinner [Tue, 22 Aug 2017 14:51:20 +0000 (16:51 +0200)]
bpo-31258: test_urllib2_localnet uses addCleanup(server.stop) (#3184)

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

7 years agobpo-31258: test_signal: call waitpid() to prevent zombie process (#3183)
Victor Stinner [Tue, 22 Aug 2017 14:51:09 +0000 (16:51 +0200)]
bpo-31258: test_signal: call waitpid() to prevent zombie process (#3183)

7 years agobpo-30871: Add test.pythoninfo (#3174) (#3175)
Victor Stinner [Tue, 22 Aug 2017 01:40:26 +0000 (03:40 +0200)]
bpo-30871: Add test.pythoninfo (#3174) (#3175)

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

(cherry picked from commit 29d007bb670b486788f73c2d742b0ad0b679ff13)

7 years agoregrtest: fix test to choose if header should be displayed (#3172)
Victor Stinner [Mon, 21 Aug 2017 21:57:06 +0000 (23:57 +0200)]
regrtest: fix test to choose if header should be displayed (#3172)

Check "tests" before its value is replaced.

7 years agobpo-30263: regrtest: add system load average (#3165)
Victor Stinner [Mon, 21 Aug 2017 16:01:11 +0000 (18:01 +0200)]
bpo-30263: regrtest: add system load average (#3165)

Add the CPU count in the header.

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

* 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

Python 2.7 backport: add expat/loadlibrary.c to PC/VS9.0/ project
files (_elementtree and pyexpat).

(cherry picked from commit 93d0cb58b4da2a88c56f472c6c19491cc7a390df)

7 years agogitignore: add more rules from master for Windows (#3148)
Victor Stinner [Fri, 18 Aug 2017 22:50:15 +0000 (00:50 +0200)]
gitignore: add more rules from master for Windows (#3148)

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

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[2.7] bpo-31221: patchcheck ignores external libraries (#3109) (#3118)
Victor Stinner [Thu, 17 Aug 2017 15:13:01 +0000 (17:13 +0200)]
[2.7] bpo-31221: patchcheck ignores external libraries (#3109) (#3118)

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

* Remove _decimal/libmpdec, not in Python 2.7

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

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-31069, test_multiprocessing: Fix dangling process (#3103) (#3105)
Victor Stinner [Wed, 16 Aug 2017 11:14:40 +0000 (13:14 +0200)]
bpo-31069, test_multiprocessing: Fix dangling process (#3103) (#3105)

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

7 years ago[2.7] bpo-30714: ALPN changes for OpenSSL 1.1.0f (#3094)
Christian Heimes [Tue, 15 Aug 2017 08:55:03 +0000 (10:55 +0200)]
[2.7] bpo-30714: ALPN changes for OpenSSL 1.1.0f (#3094)

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 agobpo-31159: fix language switch regex on unknown yet built languages. … (#3051) (...
Julien Palard [Sun, 13 Aug 2017 21:44:51 +0000 (23:44 +0200)]
bpo-31159: fix language switch regex on unknown yet built languages. … (#3051) (#3081)

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

(cherry picked from commit e8e7fba0b24582959feca9c31f2a72fc0251f83d)

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

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) (#3071)
Victor Stinner [Fri, 11 Aug 2017 12:38:37 +0000 (14:38 +0200)]
bpo-31173: Rewrite WSTOPSIG test of test_subprocess (#3055) (#3071)

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 ago[2.7] bpo-31160: Backport reap_children fixes from master to 2.7 (#3063)
Victor Stinner [Thu, 10 Aug 2017 14:45:38 +0000 (16:45 +0200)]
[2.7] bpo-31160: Backport reap_children fixes from master to 2.7 (#3063)

* 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_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 agoPCbuild: downgrade pcbuild.sln to support VS 2010 (#3031)
Victor Stinner [Thu, 10 Aug 2017 14:11:29 +0000 (16:11 +0200)]
PCbuild: downgrade pcbuild.sln to support VS 2010 (#3031)

bpo-31133: Downgrade PCbuild/pcbuild.sln from format version 12.00 to
11.00 to support Visual Studio 2010 and newer, not only VS 2013 and
newer.

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

7 years agottk: fix LabeledScale and OptionMenu destroy() method (#3026)
Victor Stinner [Tue, 8 Aug 2017 17:15:52 +0000 (19:15 +0200)]
ttk: fix LabeledScale and OptionMenu destroy() method (#3026)

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.

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

* 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[2.7] bpo-31107: Fix copyreg mangled slot names calculation. (GH-2989). (#3004)
Shane Harvey [Sat, 5 Aug 2017 15:03:01 +0000 (08:03 -0700)]
[2.7] bpo-31107: Fix copyreg mangled slot names calculation. (GH-2989). (#3004)

(cherry picked from commit c4c9866064f03646c686d7e08b00aeb203c35c19)

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

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

7 years agobpo-27470: Improve doc for commandline -3 option
Subhendu Ghosh [Fri, 4 Aug 2017 02:00:10 +0000 (07:30 +0530)]
bpo-27470: Improve doc for commandline -3 option

Mention that it warns about features that are significantly changed in Python 3
and can’t be detected using static code analysis.

Link to Porting Python 2 Code to Python 3 doc

7 years agobpo-29902: Emit a Py3k deprecation warning when pickling or copying (#2823)
Serhiy Storchaka [Wed, 2 Aug 2017 08:33:33 +0000 (11:33 +0300)]
bpo-29902: Emit a Py3k deprecation warning when pickling or copying (#2823)

some builtin and extension objects that don't support pickling
explicitly and are pickled incorrectly by default (like memoryview or
staticmethod).

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

(cherry picked from commit e1e60bd95c376f9b18cbaf9481364281c6cc1bc7)

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

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

7 years agobpo-29519: weakref spewing exceptions during interp finalization (#2958)
INADA Naoki [Mon, 31 Jul 2017 17:52:46 +0000 (02:52 +0900)]
bpo-29519: weakref spewing exceptions during interp finalization (#2958)

(cherry pick from 9cd7e17640a49635d1c1f8c2989578a8fc2c1de6)

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

(cherry picked from commit 6fcb69dad579cc9a7dc15eabead43b6c37464f8c)

7 years ago[2.7] bpo-31044: Skip test_posix.test_makedev() on FreeBSD (#2915) (#2918)
Victor Stinner [Thu, 27 Jul 2017 16:44:43 +0000 (18:44 +0200)]
[2.7] bpo-31044: Skip test_posix.test_makedev() on FreeBSD (#2915) (#2918)

* bpo-31044: Skip test_posix.test_makedev() on FreeBSD (#2915)

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)

* Fix syntax for Python 2.7

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

* 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 agobpo-30980: Fix double close in asyncore.file_wrapper (#2789) (#2900)
Nir Soffer [Wed, 26 Jul 2017 23:24:52 +0000 (02:24 +0300)]
bpo-30980: Fix double close in asyncore.file_wrapper (#2789) (#2900)

* 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 agobpo-30778: Skip test_bsddb3 on Windows XP (#2877)
Victor Stinner [Wed, 26 Jul 2017 15:55:52 +0000 (17:55 +0200)]
bpo-30778: Skip test_bsddb3 on Windows XP (#2877)

* bpo-30778: Skip test_bsddb3 on Windows XP

* Fix if, don't skip Windows Vista

7 years agobpo-31019: Fix multiprocessing.Process.is_alive() (#2875) (#2882)
Victor Stinner [Wed, 26 Jul 2017 15:54:42 +0000 (17:54 +0200)]
bpo-31019: Fix multiprocessing.Process.is_alive() (#2875) (#2882)

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 ago[3.6] bpo-30595: Fix multiprocessing.Queue.get(timeout) (#2027) (#2881) (#2883)
Victor Stinner [Wed, 26 Jul 2017 15:52:36 +0000 (17:52 +0200)]
[3.6] bpo-30595: Fix multiprocessing.Queue.get(timeout) (#2027) (#2881) (#2883)

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

(cherry picked from commit e42339d3a08a8fde3349722def85d7a8e49899be)

7 years ago[2.7] bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal command...
Dong-hee Na [Wed, 26 Jul 2017 15:50:36 +0000 (00:50 +0900)]
[2.7] bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal command (#1214) (#2894)

7 years agobpo-30304: Improve TestCase.assertMultiLineEqual docs (GH-2847)
Aditya Hase [Tue, 25 Jul 2017 20:59:52 +0000 (02:29 +0530)]
bpo-30304: Improve TestCase.assertMultiLineEqual docs (GH-2847)

Mention that TestCase.assertMultiLineEqual method is used by default when comparing Unicode string when comparing Unicode strings with assertEqual.

7 years agotest_bsddb3 tolerates smaller timeout on Windows (#2840)
Victor Stinner [Mon, 24 Jul 2017 11:01:59 +0000 (13:01 +0200)]
test_bsddb3 tolerates smaller timeout on Windows (#2840)

bpo-30850: On Windows, test04_lock_timeout2() now tolerates 50 ms
whereas 100 ms is expected. The lock sometimes times out after only
58 ms. Windows clocks have a bad resolution and bad accuracy.

7 years agoBackport Mac installer fixes for git-based workflow (#2837)
Ned Deily [Mon, 24 Jul 2017 08:29:32 +0000 (04:29 -0400)]
Backport Mac installer fixes for git-based workflow (#2837)

7 years agobpo-29572: Update macOS installer build to OpenSSL 1.0.2k (#457) (#2836)
Ned Deily [Mon, 24 Jul 2017 08:02:29 +0000 (04:02 -0400)]
bpo-29572: Update macOS installer build to OpenSSL 1.0.2k (#457) (#2836)

(cherry picked from commit cfcd76777e35c83d548d8736f5d7dc92fe56d806)

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

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 agobpo-30822: regrtest: fix -u extralargefile (#2788)
Victor Stinner [Fri, 21 Jul 2017 00:12:14 +0000 (02:12 +0200)]
bpo-30822: regrtest: fix -u extralargefile (#2788)

Fix also regrtest command line parser to allow passing -u
extralargefile to run test_zipfile64.

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

(cherry picked from commit fff2a21057b98732562098e3bdd65980551f0135)

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

7 years ago[2.7] bpo-30883: Use pythontest.net instead of debian.org in test_urllib2net (GH...
Ammar Askar [Wed, 19 Jul 2017 04:07:49 +0000 (21:07 -0700)]
[2.7] bpo-30883: Use pythontest.net instead of debian.org in test_urllib2net (GH-2755)

7 years ago[2.7] bpo-30911: Add tests for bad boolean arguments for accelerated json (GH-2690...
Serhiy Storchaka [Sun, 16 Jul 2017 04:51:03 +0000 (07:51 +0300)]
[2.7] bpo-30911: Add tests for bad boolean arguments for accelerated json (GH-2690) (#2729)

encoder and decoder.
(cherry picked from commit d3aaa2f1496aae0809c9ec9623fa528d3a2c16c2)

7 years agobpo-30939: Avoid Sphinx deprecation warning in docs build. (#2721) (#2725)
Ned Deily [Sun, 16 Jul 2017 03:06:57 +0000 (23:06 -0400)]
bpo-30939: Avoid Sphinx deprecation warning in docs build. (#2721) (#2725)

(cherry picked from commit 50f58163a69abe2f35e91044d1df165ee7bdbb42)

7 years ago[2.7] bpo-30911: Add tests for bad boolean arguments for accelerated json (GH-2690...
Serhiy Storchaka [Thu, 13 Jul 2017 09:03:18 +0000 (12:03 +0300)]
[2.7] bpo-30911: Add tests for bad boolean arguments for accelerated json (GH-2690) (#2694)

encoder and decoder..
(cherry picked from commit d3aaa2f1496aae0809c9ec9623fa528d3a2c16c2)

7 years agoAdd a missing asterisk in traceback doc to complete formatting (#2675)
Xiang Zhang [Wed, 12 Jul 2017 03:41:33 +0000 (11:41 +0800)]
Add a missing asterisk in traceback doc to complete formatting (#2675)

7 years ago[2.7] bpo-30797: Avoid _GNU_SOURCE redefined warning in xmlparse.c (GH-2670) (#2672)
Segev Finer [Tue, 11 Jul 2017 22:16:28 +0000 (01:16 +0300)]
[2.7] bpo-30797: Avoid _GNU_SOURCE redefined warning in xmlparse.c (GH-2670) (#2672)

* [2.7] Avoid _GNU_SOURCE redefined warning in xmlparse.c (GH-2670)
(cherry picked from commit f52325598e7a9683787d76a42009fc16790a0089)

* [2.7] Avoid _GNU_SOURCE redefined warning in xmlparse.c (GH-2670).
(cherry picked from commit f52325598e7a9683787d76a42009fc16790a0089)