]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
6 years agobpo-36140: Fix an incorrect check in msidb_getsummaryinformation() (GH-12074)
Miss Islington (bot) [Thu, 7 Mar 2019 18:49:15 +0000 (10:49 -0800)] 
bpo-36140: Fix an incorrect check in msidb_getsummaryinformation() (GH-12074)

(cherry picked from commit bf94cc7b496a379e1f604aa2e4080bb70ca4020e)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agobpo-36216: Add check for characters in netloc that normalize to separators (GH-12201)
Steve Dower [Thu, 7 Mar 2019 17:08:45 +0000 (09:08 -0800)] 
bpo-36216: Add check for characters in netloc that normalize to separators (GH-12201)

6 years agoFix the documentation for set.copy() (GH-12176)
Miss Islington (bot) [Thu, 7 Mar 2019 05:29:48 +0000 (21:29 -0800)] 
Fix the documentation for set.copy() (GH-12176)

Remove 's' mention as there's no argument.
(cherry picked from commit e942e7b5c91995ae1ad967ef2c0f116a5d8555de)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
6 years agobpo-36147: Fix a memory leak in ctypes s_get() (GH-12102)
stratakis [Wed, 6 Mar 2019 14:14:06 +0000 (15:14 +0100)] 
bpo-36147: Fix a memory leak in ctypes s_get() (GH-12102)

The s_get() function leaks the result variable on low memory.
Partially backport commit 19b52545df898ec911c44e29f75badb902924c0
to fix it.

6 years ago[2.7] bpo-36186: Fix linuxaudiodev.linux_audio_device() error handling (GH-12163)
stratakis [Wed, 6 Mar 2019 14:11:56 +0000 (15:11 +0100)] 
[2.7] bpo-36186: Fix linuxaudiodev.linux_audio_device() error handling (GH-12163)

Fix linuxaudiodev.linux_audio_device() error handling:
close the internal file descriptor if it fails to open the device.

6 years ago[2.7] bpo-36019: Use pythontest.net in urllib network tests (GH-11941) (GH-12177)
Stéphane Wirtel [Tue, 5 Mar 2019 14:18:58 +0000 (15:18 +0100)] 
[2.7] bpo-36019: Use pythontest.net in urllib network tests (GH-11941) (GH-12177)

Use test_support.TEST_HTTP_URL (pythontest.net) instead of http://www.example.com/.

6 years ago[2.7] bpo-36149 Fix potential use of uninitialized memory in cPickle (#12105)
T. Wouters [Mon, 4 Mar 2019 18:52:07 +0000 (10:52 -0800)] 
[2.7] bpo-36149 Fix potential use of uninitialized memory in cPickle (#12105)

Fix off-by-one bug in cPickle that caused it to use uninitialised memory on truncated pickles read from FILE*s.

6 years ago[2.7] bpo-36179: Fix ref leaks in _hashopenssl (GH-12158) (GH-12166)
Christian Heimes [Mon, 4 Mar 2019 17:10:45 +0000 (18:10 +0100)] 
[2.7] bpo-36179: Fix ref leaks in _hashopenssl (GH-12158) (GH-12166)

Fix two unlikely reference leaks in _hashopenssl. The leaks only occur in
out-of-memory cases. Thanks to Charalampos Stratakis.

Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue36179.
(cherry picked from commit b7bc283ab6a23ee98784400ebffe7fe410232a2e)

Co-authored-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue36179

6 years ago[2.7] bpo-13096: Fix memory leak in ctypes POINTER handling of large values (GH-12100)
stratakis [Mon, 4 Mar 2019 15:40:25 +0000 (16:40 +0100)] 
[2.7] bpo-13096: Fix memory leak in ctypes POINTER handling of large values (GH-12100)

6 years agoPost-2.7.16 version bump.
Benjamin Peterson [Sat, 2 Mar 2019 19:11:58 +0000 (11:11 -0800)] 
Post-2.7.16 version bump.

6 years agoDelete old NEWS file.
Benjamin Peterson [Sat, 2 Mar 2019 19:10:59 +0000 (11:10 -0800)] 
Delete old NEWS file.

6 years agoMerge branch 'release-2.7.16' into 2.7
Benjamin Peterson [Sat, 2 Mar 2019 19:09:56 +0000 (11:09 -0800)] 
Merge branch 'release-2.7.16' into 2.7

6 years agoSet version to 2.7.16 final. v2.7.16
Benjamin Peterson [Sat, 2 Mar 2019 18:17:42 +0000 (10:17 -0800)] 
Set version to 2.7.16 final.

6 years agoMake 2.7.16 release note.
Benjamin Peterson [Sat, 2 Mar 2019 18:17:10 +0000 (10:17 -0800)] 
Make 2.7.16 release note.

6 years agobpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. Original patch...
Ned Deily [Fri, 1 Mar 2019 23:12:45 +0000 (18:12 -0500)] 
bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. Original patch by Kevin Walzer. (GH-12034)

6 years agobpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. Original patch...
Ned Deily [Fri, 1 Mar 2019 23:12:45 +0000 (18:12 -0500)] 
bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. Original patch by Kevin Walzer. (GH-12034)

6 years agobpo-36126: Fix ref count leakage in structseq_repr. (GH-12035)
Gao, Xiang [Thu, 28 Feb 2019 13:18:48 +0000 (08:18 -0500)] 
bpo-36126: Fix ref count leakage in structseq_repr. (GH-12035)

6 years agoDocument the surprising sideeffect PyErr_Print(). (GH-12081)
Miss Islington (bot) [Wed, 27 Feb 2019 23:45:57 +0000 (15:45 -0800)] 
Document the surprising sideeffect PyErr_Print(). (GH-12081)

Did you know an API documented as printing the pending traceback would sometimes exit the process?

You do now.
(cherry picked from commit 4173772031747a9b249be4100b4aa9eda805ea23)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
6 years agoUpdate FAQ to point to Infrastructure Team website. (GH-12079)
Ned Deily [Wed, 27 Feb 2019 22:43:13 +0000 (17:43 -0500)] 
Update FAQ to point to Infrastructure Team website. (GH-12079)

6 years ago[2.7] bpo-36106: resolve sinpi name clash with libm (IEEE-754 violation). (GH-12027...
Dima Pasechnik [Tue, 26 Feb 2019 10:41:15 +0000 (10:41 +0000)] 
[2.7] bpo-36106: resolve sinpi name clash with libm (IEEE-754 violation). (GH-12027) (GH-12050)

The standard math library (libm) may follow IEEE-754 recommendation to
include an implementation of sinPi(), i.e. sinPi(x):=sin(pi*x).
And this triggers a name clash, found by FreeBSD developer
Steve Kargl, who worked on putting sinpi into libm used on FreeBSD
(it has to be named "sinpi", not "sinPi", cf. e.g.
https://en.cppreference.com/w/c/experimental/fpext4).

6 years agoRun autoreconf.
Benjamin Peterson [Tue, 26 Feb 2019 05:56:27 +0000 (21:56 -0800)] 
Run autoreconf.

6 years agocloses bpo-13497: Fix `broken nice` configure test. (GH-12041)
Miss Islington (bot) [Tue, 26 Feb 2019 05:54:33 +0000 (21:54 -0800)] 
closes bpo-13497: Fix `broken nice` configure test. (GH-12041)

Per POSIX, `nice(3)` requires `unistd.h` and `exit(3)` requires `stdlib.h`.

Fixing the test will prevent false positives with pedantic compilers like clang.
(cherry picked from commit 90c6facebd5666fec85f125ee2795b48b30319a4)

Co-authored-by: ngie-eign <1574099+ngie-eign@users.noreply.github.com>
6 years ago[2.7] bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH...
Ned Deily [Sun, 24 Feb 2019 08:33:19 +0000 (03:33 -0500)] 
[2.7] bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12015)

6 years agobpo-26386: Re-enable missing widget testcases in test_ttk_guionly. (GH-12014)
Ned Deily [Sun, 24 Feb 2019 08:04:19 +0000 (03:04 -0500)] 
bpo-26386: Re-enable missing widget testcases in test_ttk_guionly. (GH-12014)

6 years agobpo-36089: Fix formatting/spelling on SimpleHTTPServer docs. (GH-11995)
Alan Grgic [Sat, 23 Feb 2019 05:16:09 +0000 (23:16 -0600)] 
bpo-36089: Fix formatting/spelling on SimpleHTTPServer docs. (GH-11995)

6 years agobpo-35584: Clarify role of caret in a class class (GH-11946) (GH-11948)
Miss Islington (bot) [Tue, 19 Feb 2019 20:26:11 +0000 (12:26 -0800)] 
bpo-35584: Clarify role of caret in a class class (GH-11946) (GH-11948)

https://bugs.python.org/issue35584
(cherry picked from commit 3bacf6126522a9b3bcb6be0c4f3ee6a895dfe772)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
6 years ago[2.7] bpo-35126: Fix a mistake in FAQ about converting number to string (GH-11911)
Stéphane Wirtel [Tue, 19 Feb 2019 09:26:02 +0000 (10:26 +0100)] 
[2.7] bpo-35126: Fix a mistake in FAQ about converting number to string (GH-11911)

https://bugs.python.org/issue35126

6 years ago[2.7] bpo-1104: msilib.SummaryInfo.GetProperty() truncates the string by one characte...
Tzu-ping Chung [Tue, 19 Feb 2019 03:06:10 +0000 (11:06 +0800)] 
[2.7] bpo-1104: msilib.SummaryInfo.GetProperty() truncates the string by one character (GH-4517) (GH-11749)

Add one char to MsiSummaryInfoGetProperty() output
Based on the patch in [bpo-1104](https://bugs.python.org/issue1104) by Anthony Tuininga (atuining) and Mark McMahon (markm)
(cherry picked from commit 2de576e16d42ce43698d384d0dd46ba6cf165424)

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
https://bugs.python.org/issue1104

6 years agoSet version to 2.7.16rc1+.
Benjamin Peterson [Sun, 17 Feb 2019 20:08:34 +0000 (12:08 -0800)] 
Set version to 2.7.16rc1+.

6 years agoAdd product codes until the end of time. (GH-11901)
Steve Dower [Sun, 17 Feb 2019 00:42:48 +0000 (16:42 -0800)] 
Add product codes until the end of time. (GH-11901)

6 years agoSet version to 2.7.16rc1. v2.7.16rc1
Benjamin Peterson [Sat, 16 Feb 2019 19:02:20 +0000 (11:02 -0800)] 
Set version to 2.7.16rc1.

6 years agoCollect 2.7.16rc1 release notes.
Benjamin Peterson [Sat, 16 Feb 2019 19:01:44 +0000 (11:01 -0800)] 
Collect 2.7.16rc1 release notes.

6 years agoUpdate IDLE.app plist copyright date. (GH-11890)
Ned Deily [Sat, 16 Feb 2019 07:03:48 +0000 (02:03 -0500)] 
Update IDLE.app plist copyright date. (GH-11890)

6 years ago[2.7] bpo-33570: Enable OpenSSL 1.1.1 testing within the multissltests (GH-11879)
stratakis [Fri, 15 Feb 2019 18:01:27 +0000 (19:01 +0100)] 
[2.7] bpo-33570: Enable OpenSSL 1.1.1 testing within the multissltests (GH-11879)

multissltests: fix _build_src(), add 'cwd' variable.

6 years ago[2.7] bpo-32947: Fixes for TLS 1.3 and OpenSSL 1.1.1 (GH-8761) (GH-11876)
stratakis [Fri, 15 Feb 2019 17:27:44 +0000 (18:27 +0100)] 
[2.7] bpo-32947: Fixes for TLS 1.3 and OpenSSL 1.1.1 (GH-8761) (GH-11876)

Backport of TLS 1.3 related fixes from 3.7.

Misc fixes and workarounds for compatibility with OpenSSL 1.1.1 from git
master and TLS 1.3 support. With OpenSSL 1.1.1, Python negotiates TLS 1.3 by
default. Some test cases only apply to TLS 1.2.

OpenSSL 1.1.1 has added a new option OP_ENABLE_MIDDLEBOX_COMPAT for TLS
1.3. The feature is enabled by default for maximum compatibility with
broken middle boxes. Users should be able to disable the hack and CPython's test suite needs
it to verify default options

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

6 years agoFixup from test_ssl test_default_ecdh_curve (GH-11877)
stratakis [Fri, 15 Feb 2019 16:18:58 +0000 (17:18 +0100)] 
Fixup from test_ssl test_default_ecdh_curve (GH-11877)

Partial backport from cb5b68abdeb1b1d56c581d5b4d647018703d61e3

Co-authored-by: Christian Heimes <christian@python.org>
6 years ago[2.7] bpo-28043: improved default settings for SSLContext (GH-10608)
stratakis [Fri, 15 Feb 2019 14:24:11 +0000 (15:24 +0100)] 
[2.7] bpo-28043: improved default settings for SSLContext (GH-10608)

The options OP_NO_COMPRESSION, OP_CIPHER_SERVER_PREFERENCE,
OP_SINGLE_DH_USE, OP_SINGLE_ECDH_USE, OP_NO_SSLv2 (except
for PROTOCOL_SSLv2), and OP_NO_SSLv3 (except for PROTOCOL_SSLv3)
are set by default. The initial cipher suite list contains only
HIGH ciphers, no NULL ciphers and MD5 ciphers (except for PROTOCOL_SSLv2).

(cherry picked from commit 358cfd426ccc0fcd6a7940d306602138e76420ae)

6 years ago[2.7] bpo-33570: TLS 1.3 ciphers for OpenSSL 1.1.1 (GH-6976) (GH-8760) (GH-10607)
stratakis [Fri, 15 Feb 2019 13:17:12 +0000 (14:17 +0100)] 
[2.7] bpo-33570: TLS 1.3 ciphers for OpenSSL 1.1.1 (GH-6976) (GH-8760) (GH-10607)

Change TLS 1.3 cipher suite settings for compatibility with OpenSSL
1.1.1-pre6 and newer. OpenSSL 1.1.1 will have TLS 1.3 cipers enabled by
default.

Also update multissltests to test with latest OpenSSL.

Signed-off-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 3e630c541b35c96bfe5619165255e559f577ee71)
Co-authored-by: Christian Heimes <christian@python.org>
6 years agobpo-35746: Credit Colin Read and Nicolas Edet (GH-11866)
Victor Stinner [Fri, 15 Feb 2019 11:34:17 +0000 (12:34 +0100)] 
bpo-35746: Credit Colin Read and Nicolas Edet (GH-11866)

Add credit for the cert parser vulnerability. Mention also Cisco
TALOS-2018-0758 identifier.

6 years agoDoc sidebar: 3.6 has moved to security-fix mode. (GH-11810)
Miss Islington (bot) [Sun, 10 Feb 2019 21:43:52 +0000 (13:43 -0800)] 
Doc sidebar: 3.6 has moved to security-fix mode. (GH-11810)

(cherry picked from commit 9db56fb8faaa3cd66e7fe82740a4ae4d786bb27f)

Co-authored-by: Julien Palard <julien@palard.fr>
6 years ago[2.7] Fix url to core-mentorship mailing list (GH-11775). (GH-11778)
Mariatta [Wed, 6 Feb 2019 22:02:45 +0000 (14:02 -0800)] 
[2.7] Fix url to core-mentorship mailing list (GH-11775). (GH-11778)

(cherry picked from commit e9bc4172d18db9c182d8e04dd7b033097a994c06)

Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
7 years agobpo-25592: Improve documentation of distutils data_files (GH-9767) (GH-11734)
Miss Islington (bot) [Sat, 2 Feb 2019 10:16:09 +0000 (02:16 -0800)] 
bpo-25592: Improve documentation of distutils data_files (GH-9767) (GH-11734)

(cherry picked from commit 598e15d4feaee3849a91d92c9ca51f17baafe19c)

Co-authored-by: jdemeyer <J.Demeyer@UGent.be>
7 years agobpo-35746: Fix segfault in ssl's cert parser (GH-11569)
Miss Islington (bot) [Tue, 15 Jan 2019 23:11:52 +0000 (15:11 -0800)] 
bpo-35746: Fix segfault in ssl's cert parser (GH-11569)

Fix a NULL pointer deref in ssl module. The cert parser did not handle CRL
distribution points with empty DP or URI correctly. A malicious or buggy
certificate can result into segfault.

Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue35746
(cherry picked from commit a37f52436f9aa4b9292878b72f3ff1480e2606c3)

Co-authored-by: Christian Heimes <christian@python.org>
7 years ago[2.7] bpo-8765: Deprecate writing unicode to binary streams in Py3k mode. (GH-11127)
Serhiy Storchaka [Tue, 15 Jan 2019 12:34:48 +0000 (14:34 +0200)] 
[2.7] bpo-8765: Deprecate writing unicode to binary streams in Py3k mode. (GH-11127)

7 years agobpo-34512: Document platform-specific strftime() behavior for non-ASCII format string...
Miss Islington (bot) [Sat, 12 Jan 2019 17:28:06 +0000 (09:28 -0800)] 
bpo-34512: Document platform-specific strftime() behavior for non-ASCII format strings (GH-8948)

(cherry picked from commit 1cffd0eed313011c0c2bb071c8affeb4a7ed05c7)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
7 years ago[2.7] bpo-35552: Fix reading past the end in PyString_FromFormat(). (GH-11276) (GH...
Serhiy Storchaka [Sat, 12 Jan 2019 09:20:50 +0000 (11:20 +0200)] 
[2.7] bpo-35552: Fix reading past the end in PyString_FromFormat(). (GH-11276) (GH-11534)

Format character "%s" in PyString_FromFormat() no longer read memory
past the limit if precision is specified.
(cherry picked from commit d586ccb04f79863c819b212ec5b9d873964078e4)

7 years agobpo-33817: Fix _PyString_Resize() and _PyUnicode_Resize() for empty strings. (GH...
Serhiy Storchaka [Sat, 12 Jan 2019 07:22:52 +0000 (09:22 +0200)] 
bpo-33817: Fix _PyString_Resize() and _PyUnicode_Resize() for empty strings. (GH-11515)

7 years agobpo-24746: Fix doctest failures when running the testsuite with -R (#11501) (#11512)
Senthil Kumaran [Thu, 10 Jan 2019 20:55:08 +0000 (12:55 -0800)] 
bpo-24746: Fix doctest failures when running the testsuite with -R (#11501) (#11512)

7 years agoUpdate bugs.rst (GH-11487)
Miss Islington (bot) [Wed, 9 Jan 2019 23:00:48 +0000 (15:00 -0800)] 
Update bugs.rst (GH-11487)

(cherry picked from commit 91c6158dbc5d70fcd91993b4e62c7bae926c2ea2)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
7 years ago[2.7] bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (#11482)
Sanyam Khurana [Wed, 9 Jan 2019 19:03:03 +0000 (00:33 +0530)] 
[2.7] bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (#11482)

* bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff

* [2.7] bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (GH-10639).
(cherry picked from commit cbb16459934eaf29c7c7d362939cd05550b2f21f)

Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
7 years agoRemove README.rst inadvertandly "backported" from 3.x in 5a89c71580529549e71567abf557...
Benjamin Peterson [Wed, 2 Jan 2019 17:14:30 +0000 (09:14 -0800)] 
Remove README.rst inadvertandly "backported" from 3.x in 5a89c71580529549e71567abf557c812eb470b2b. (GH-11409)

7 years ago[2.7] Bump copyright years to 2019. (GH-11408)
Benjamin Peterson [Wed, 2 Jan 2019 16:43:32 +0000 (08:43 -0800)] 
[2.7] Bump copyright years to 2019. (GH-11408)

(cherry picked from commit 9a69ae8a78785105ded02b083b2e5cd2dd939307)

7 years agomacOS installer build: mitigate hdiutil resource busy bug
Ned Deily [Tue, 11 Dec 2018 03:05:14 +0000 (22:05 -0500)] 
macOS installer build: mitigate hdiutil resource busy bug

7 years agoRevert "bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101)"
Ned Deily [Thu, 27 Dec 2018 20:18:51 +0000 (15:18 -0500)] 
Revert "bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101)"

This reverts commit aa580508431d231677cfaa13ac9b6aa37538b9ef.

Due to regressions found with using Tk 8.6.9.1, build the python.org
macOS installers with Tcl/Tk 8.6.8 as used in previous releases.

7 years agobpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283)
Matt McCormick [Sat, 22 Dec 2018 01:41:36 +0000 (20:41 -0500)] 
bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283)

This addresses C extension build errors related to an undefined _hypot
symbol when building with the Microsoft Visual C++ Compiler for Python
2.7 [1] or MinGWPy [2]. It also addresses errors when building a C++
extension with MinGWPy and C++11 from cmath, 'error "::hypot' has not
been declared'

[1] https://www.microsoft.com/en-us/download/details.aspx?id=44266
[2] https://mingwpy.github.io/

7 years ago[2.7] bpo-31715 Add mimetype for extension .mjs (GH-3908) (GH-10978)
Myles Borins [Thu, 20 Dec 2018 20:29:34 +0000 (15:29 -0500)] 
[2.7] bpo-31715 Add mimetype for extension .mjs (GH-3908) (GH-10978)

(cherry picked from 0854b92cd2)

7 years agobpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. (GH-11175...
Zackery Spytz [Thu, 20 Dec 2018 17:38:52 +0000 (10:38 -0700)] 
bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. (GH-11175) (GH-11249)

(cherry picked from commit 842acaab1376c5c84fd5966bb6070e289880e1ca)

7 years agobpo-35529: Fix a reference counting bug in PyCFuncPtr_FromDll(). (GH-11229)
Miss Islington (bot) [Thu, 20 Dec 2018 08:51:52 +0000 (00:51 -0800)] 
bpo-35529: Fix a reference counting bug in PyCFuncPtr_FromDll(). (GH-11229)

"dll" would leak if an error occurred in _validate_paramflags() or
GenericPyCData_new().
(cherry picked from commit d77d97c9a1f593fe161afab97e2a3e2292ab88b9)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
7 years ago[2.7] bpo-35441: Remove dead and buggy code related to PyList_SetItem(). (GH-11033...
Serhiy Storchaka [Wed, 19 Dec 2018 15:11:02 +0000 (17:11 +0200)] 
[2.7] bpo-35441: Remove dead and buggy code related to PyList_SetItem(). (GH-11033) (GH-11234)

In _localemodule.c and selectmodule.c, remove dead code that would
cause double decrefs if run.

In addition, replace PyList_SetItem() with PyList_SET_ITEM() in cases
where a new list is populated and there is no possibility of an error.

In addition, check if the list changed size in the loop in array_array_fromlist().
(cherry picked from commit 99d56b53560b3867844472ae381fb3f858760621)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
7 years agobpo-10320: Use PY_FORMAT_LONG_LONG in ctypes' PyCArg_repr(). (GH-11230)
Zackery Spytz [Wed, 19 Dec 2018 06:01:38 +0000 (23:01 -0700)] 
bpo-10320: Use PY_FORMAT_LONG_LONG in ctypes' PyCArg_repr(). (GH-11230)

7 years agobpo-10320: Replace nonstandard sprintf() length modifier in ctypes' PyCArg_repr(...
Miss Islington (bot) [Tue, 18 Dec 2018 23:51:04 +0000 (15:51 -0800)] 
bpo-10320: Replace nonstandard sprintf() length modifier in ctypes' PyCArg_repr(). (GH-10853)

Use "ll" instead of the nonstandard "q".
(cherry picked from commit 062cbb67726f26794b1b461853e40696b4a0b220)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
7 years agobpo-10496: distutils check_environ() handles getpwuid() error (GH-10931) (GH-11213)
Victor Stinner [Tue, 18 Dec 2018 16:34:51 +0000 (17:34 +0100)] 
bpo-10496: distutils check_environ() handles getpwuid() error (GH-10931) (GH-11213)

check_environ() of distutils.utils now catchs KeyError on calling
pwd.getpwuid(): don't create the HOME environment variable in this
case.

(cherry picked from commit 17d0c0595e101c4ce76b58e55de37e6b5083e6cd)

7 years agobpo-34279: regrtest consider that skipped tests are ran (GH-11132) (GH-11158)
Victor Stinner [Fri, 14 Dec 2018 12:44:08 +0000 (13:44 +0100)] 
bpo-34279: regrtest consider that skipped tests are ran (GH-11132) (GH-11158)

bpo-34279, bpo-35412: support.run_unittest() no longer raises
TestDidNotRun if a test result contains skipped tests. The
exception is now only raised if no test have been run and no test
have been skipped.

(cherry picked from commit 3a8f4fef4a4dd0e4a800545468eef9542e126181)

7 years agobpo-16039: CVE-2013-1752: Limit imaplib.IMAP4_SSL.readline() (GH-11120)
Victor Stinner [Wed, 12 Dec 2018 11:05:59 +0000 (12:05 +0100)] 
bpo-16039: CVE-2013-1752: Limit imaplib.IMAP4_SSL.readline() (GH-11120)

* bpo-16039: CVE-2013-1752: Change use of readline() in
  imaplib.IMAP4_SSL to limit line length. Remove IMAP4_SSL.readline()
  and IMAP4_SSL.read() to inherit safe IMAP4 implementation.
* bpo-20118: reenable test_linetoolong() of test_imaplib
  on ThreadedNetworkedTests and ThreadedNetworkedTestsSSL.
  The test now sets the _MAXLINE limit to 10 characters.

7 years agobpo-11617: Try to strengthen test_httpservers (GH-11121)
Victor Stinner [Tue, 11 Dec 2018 16:08:02 +0000 (17:08 +0100)] 
bpo-11617: Try to strengthen test_httpservers (GH-11121)

(cherry picked from commit cb342182ee47c3e2c743de50d81aad60f4eebefd)

7 years ago[2.7] bpo-15663: the 10.6+ macOS installers for 3.6/2.7 now provide a private Tcl...
Ned Deily [Tue, 11 Dec 2018 09:33:56 +0000 (04:33 -0500)] 
[2.7] bpo-15663: the 10.6+ macOS installers for 3.6/2.7 now provide a private Tcl/Tk 8.6 (GH-11110)

7 years agobpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101)
Miss Islington (bot) [Tue, 11 Dec 2018 06:39:34 +0000 (22:39 -0800)] 
bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101)

(cherry picked from commit 7cf3d8e25174c8871883e42f3240fd7f01efd3a8)

Co-authored-by: Ned Deily <nad@python.org>
7 years ago[3.6] bpo-35401: Update macOS installer to OpenSSL 1.0.2q (GH-11095)
Miss Islington (bot) [Tue, 11 Dec 2018 05:54:04 +0000 (21:54 -0800)] 
[3.6] bpo-35401: Update macOS installer to OpenSSL 1.0.2q (GH-11095)

https://bugs.python.org/issue35401
(cherry picked from commit 419b5ffc2ca46d7adf0be6216ca3a6e40028e50f)

Co-authored-by: Ned Deily <nad@python.org>
7 years agobpo-35401: Updates Windows build to OpenSSL 1.0.2q (GH-11089)
Steve Dower [Tue, 11 Dec 2018 04:26:33 +0000 (20:26 -0800)] 
bpo-35401: Updates Windows build to OpenSSL 1.0.2q (GH-11089)

7 years ago[2.7] bpo-31374: Include pyconfig.h earlier in expat (GH-11078)
Victor Stinner [Mon, 10 Dec 2018 15:01:03 +0000 (16:01 +0100)] 
[2.7] bpo-31374: Include pyconfig.h earlier in expat (GH-11078)

Include <pyconfig.h> ealier in Modules/expat/xmlparse.c to define
properly _POSIX_C_SOURCE and _XOPEN_SOURCE.

7 years agoceval.c: mark debug 'filename' variable as unused (GH-11074)
Victor Stinner [Mon, 10 Dec 2018 12:53:38 +0000 (13:53 +0100)] 
ceval.c: mark debug 'filename' variable as unused (GH-11074)

Use GCC __attribute__((unused)) to mark the debug variable 'filename'
as unused in Python/ceval.c.

7 years agobpo-31374: Include pyconfig.h earlier in expat (GH-11064)
Miss Islington (bot) [Mon, 10 Dec 2018 11:38:55 +0000 (03:38 -0800)] 
bpo-31374: Include pyconfig.h earlier in expat (GH-11064)

Include <pyconfig.h> ealier in Modules/expat/xmltok.c to define
properly _POSIX_C_SOURCE. Python defines _POSIX_C_SOURCE as 200809L,
whereas <features.h> (included indirectly by <string.h>) defines
_POSIX_C_SOURCE as 199506L.
(cherry picked from commit cf247359d5b7082044eea1fa94b5211a172b1ff6)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
7 years agobpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061) (GH-11068)
Victor Stinner [Mon, 10 Dec 2018 10:56:54 +0000 (11:56 +0100)] 
bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061) (GH-11068)

Fix xml.dom.minidom cloneNode() on a document with an entity: pass
the correct arguments to the user data handler of an entity (fix an
old copy/paste mistake).

Bug spotted and fix proposed by Charalampos Stratakis, initial
reproducer written by Petr Viktorin.

Co-Authored-By: Charalampos Stratakis <cstratak@redhat.com>
Co-Authored-By: Petr Viktorin <encukou@gmail.com>
(cherry picked from commit 8e0418688906206fe59bd26344320c0fc026849e)

7 years ago[2.7] bpo-33023: Fix NotImplemented to NotImplementedError. (GH-10934). (GH-11001...
Serhiy Storchaka [Fri, 7 Dec 2018 06:02:33 +0000 (08:02 +0200)] 
[2.7] bpo-33023: Fix NotImplemented to NotImplementedError. (GH-10934). (GH-11001) (GH-11008)

(cherry picked from commit 42b1d6127bd8595522a78a75166ebb9fba74a6a2)
(cherry picked from commit 7a2cf1e7d3bf300e98c702589d405734f4a8fcf8)

7 years agoAdd missing period in distutils.dep_util.newer_group doc (GH-11003)
Miss Islington (bot) [Thu, 6 Dec 2018 21:34:15 +0000 (13:34 -0800)] 
Add missing period in distutils.dep_util.newer_group doc (GH-11003)

(cherry picked from commit c9566b8c454120e3d0ddb5ab970f262a6cd80077)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
7 years agobpo-35359: Add _CRT_SECURE_NO_WARNINGS to pythoncore project (GH-10819)
Victor Stinner [Thu, 6 Dec 2018 10:56:00 +0000 (11:56 +0100)] 
bpo-35359: Add _CRT_SECURE_NO_WARNINGS to pythoncore project (GH-10819)

Define _CRT_SECURE_NO_WARNINGS in the Visual Studio pythoncore
project to make quiet security warnings when building zlib C files
(Modules\zlib\ subdirectory).

7 years ago[2.7] bpo-33709: test_ntpath and test_posixpath fail in Windows with ACP!=1252. ...
native-api [Thu, 6 Dec 2018 09:43:37 +0000 (12:43 +0300)] 
[2.7] bpo-33709: test_ntpath and test_posixpath fail in Windows with ACP!=1252. (GH-7278) (GH-7279)

7 years ago[2.7] Correct a couple of unbalanced parenthesis. (GH-10779). (GH-10963)
Andre Delfino [Thu, 6 Dec 2018 09:19:23 +0000 (06:19 -0300)] 
[2.7] Correct a couple of unbalanced parenthesis. (GH-10779). (GH-10963)

(cherry picked from commit 55f41e45b4318cbe19209f5144641344d0049fb8)

7 years agoRevert "[2.7] bpo-34172: multiprocessing.Pool leaks resources after being deleted...
Victor Stinner [Thu, 6 Dec 2018 00:49:41 +0000 (01:49 +0100)] 
Revert "[2.7] bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-9686)" (GH-10970)

This reverts commit 4a7dd30f5810e8861a3834159a222ab32d5c97d0.

7 years agoFix typo in xml.dom.minidom documentation (GH-10956)
Miss Islington (bot) [Wed, 5 Dec 2018 22:31:11 +0000 (14:31 -0800)] 
Fix typo in xml.dom.minidom documentation (GH-10956)

Escape the \t and \n.
Follow up from https://github.com/python/cpython/pull/10814.
(cherry picked from commit 2d8f976cde4794d174b44ff7d5fd970aa89c65e8)

Co-authored-by: E Kawashima <e-kwsm@users.noreply.github.com>
7 years ago[2.7] bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. ...
Serhiy Storchaka [Wed, 5 Dec 2018 22:21:40 +0000 (00:21 +0200)] 
[2.7] bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. (GH-8113). (GH-10946) (GH-10955)

(cherry picked from commit 5b25f1d03100e2283c1b129d461ba68ac0169a14)
(cherry picked from commit 1de91a0032fed500ddd3d8c4fb7a38c0b8719f67)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>.
7 years ago[2.7] bpo-34738: Add directory entries in ZIP files created by distutils. (GH-9419...
Serhiy Storchaka [Wed, 5 Dec 2018 22:02:10 +0000 (00:02 +0200)] 
[2.7] bpo-34738: Add directory entries in ZIP files created by distutils. (GH-9419). (GH-10950)

(cherry picked from commit 67a93b3a0b3814e97ef9d077b21325fc8ce351b2)

7 years ago[2.7] bpo-35250: Correct argument name "num" -> "btn" in turtle docs. (GH-10565)...
Serhiy Storchaka [Wed, 5 Dec 2018 21:10:36 +0000 (23:10 +0200)] 
[2.7] bpo-35250: Correct argument name "num" -> "btn" in turtle docs. (GH-10565). (GH-10943)

(cherry picked from commit 4edeaeac4c194ba5d09187640b5cfca5e03be617)

Co-authored-by: Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) <thatiparthysreenivas@gmail.com>
7 years ago[2.7] Move __missing__ after __delitem__ in Data model. (GH-10923). (GH-10944)
Andre Delfino [Wed, 5 Dec 2018 21:09:25 +0000 (18:09 -0300)] 
[2.7] Move __missing__ after __delitem__ in Data model. (GH-10923). (GH-10944)

(cherry picked from commit 1ce853f37783575e2b3aaa159ddcebc8660830ef)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
7 years agobpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919) (GH-10930)
Victor Stinner [Wed, 5 Dec 2018 20:56:24 +0000 (21:56 +0100)] 
bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919) (GH-10930)

* posixpath.expanduser() now returns the input path unchanged if
  the HOME environment variable is not set and pwd.getpwuid() raises
  KeyError (the current user identifier doesn't exist in the password
  database).
* Add test_no_home_directory() to test_site.

(cherry picked from commit f2f4555d8287ad217a1dba7bbd93103ad4daf3a8)

7 years agobpo-34185: Fix test module collision in test_bdb when ran as script. (GH-8537)
Miss Islington (bot) [Wed, 5 Dec 2018 20:04:57 +0000 (12:04 -0800)] 
bpo-34185: Fix test module collision in test_bdb when ran as script. (GH-8537)

When running test_bdb.py as a script, `import test_module` would be
importing the existing Lib/test/test_modules.py instead of the
tempcwd/test_module.py module which was dynamically created by
test_bdb.py itself.
(cherry picked from commit 54fd45505b3a365e6d53441e6dd7e0d1ec13b46f)

Co-authored-by: Alex H <1884912+lajarre@users.noreply.github.com>
7 years agobpo-35411: Skip test_urllib2net FTP tests on Travis CI (GH-10907)
Miss Islington (bot) [Wed, 5 Dec 2018 01:22:02 +0000 (17:22 -0800)] 
bpo-35411: Skip test_urllib2net FTP tests on Travis CI (GH-10907)

On Travis CI, FTP tests of test_urllib2net randomly fail with "425
Security: Bad IP connecting".

test.pythoninfo now also logs TRAVIS environment variable.
(cherry picked from commit c11b3b19a5b022c6c229043d37f9a9fd06f22500)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
7 years ago[2.7] bpo-16865: Support arrays >=2GB in ctypes. (GH-3006). (GH-7441)
Serhiy Storchaka [Tue, 4 Dec 2018 10:38:07 +0000 (12:38 +0200)] 
[2.7] bpo-16865: Support arrays >=2GB in ctypes. (GH-3006). (GH-7441)

(cherry picked from commit 735abadd5bd91db4a9e6f4311969b0afacca0a1a)

Co-Authored-By: Segev Finer <segev208@gmail.com>
7 years ago[2.7] bpo-25862: Fix several bugs in the _io module. (GH-8026) (GH-8033)
Serhiy Storchaka [Tue, 4 Dec 2018 10:02:48 +0000 (12:02 +0200)] 
[2.7] bpo-25862: Fix several bugs in the _io module. (GH-8026) (GH-8033)

They can be exposed when some C API calls fail due to lack of
memory.

* Failed Py_BuildValue() could cause an assertion error in the
  following TextIOWrapper.tell().
* initvalue could leak in StringIO.__getstate__() after failed
  PyDict_Copy().
(cherry picked from commit fdb5a50ef34f7951c3b01eb77b1359725a9ad670)

7 years agobpo-26544: Make platform.libc_ver() less slow (GH-10868)
Victor Stinner [Mon, 3 Dec 2018 15:49:24 +0000 (16:49 +0100)] 
bpo-26544: Make platform.libc_ver() less slow (GH-10868)

Coarse benchmark on Fedora 29: 1.6 sec => 0.1 sec.

Co-Authored-By: Antoine Pitrou <solipsis@pitrou.net>
(cherry-picked from commit ba7c226095703f63c78b00e56f1db8d99ac3a54a)

7 years agobpo-35368: Make PyMem_Malloc() thread-safe in debug mode (GH-10828)
Victor Stinner [Mon, 3 Dec 2018 11:29:29 +0000 (12:29 +0100)] 
bpo-35368: Make PyMem_Malloc() thread-safe in debug mode (GH-10828)

When Python is compiled in debug mode, PyMem_Malloc() uses debug
hooks, but it also uses pymalloc allocator instead of malloc().
Problem: pymalloc is not thread-safe, whereas PyMem_Malloc() is
thread-safe in release mode (it's a thin wrapper to malloc() in this
case).

Modify the debug hook to use malloc() for PyMem_Malloc().

7 years ago[2.7] Fix signature of xml.dom.minidom.Document.toprettyxml(). (GH-10814). (GH-10827)
E Kawashima [Sat, 1 Dec 2018 12:16:00 +0000 (21:16 +0900)] 
[2.7] Fix signature of xml.dom.minidom.Document.toprettyxml(). (GH-10814). (GH-10827)

(cherry picked from commit b7c2182604d5796b5af4c837991aa0b8c8a2d41f)

7 years agoReplace 1/0 with 1//0 in tests to avoid Python 3 warns (GH-10833)
Victor Stinner [Fri, 30 Nov 2018 19:45:04 +0000 (20:45 +0100)] 
Replace 1/0 with 1//0 in tests to avoid Python 3 warns (GH-10833)

Fix DeprecationWarning when tests are run using python -3.

7 years agobpo-33015: Use malloc() in PyThread_start_new_thread() (GH-10829)
Victor Stinner [Fri, 30 Nov 2018 17:08:02 +0000 (18:08 +0100)] 
bpo-33015: Use malloc() in PyThread_start_new_thread() (GH-10829)

The pthread implementation of PyThread_start_new_thread() now uses
malloc/free rather than PyMem_Malloc/PyMem_Free, since the latters
are not thread-safe.

7 years agobpo-33015: Fix UB in pthread PyThread_start_new_thread (GH-6008) (GH-10823)
Victor Stinner [Fri, 30 Nov 2018 16:04:35 +0000 (17:04 +0100)] 
bpo-33015: Fix UB in pthread PyThread_start_new_thread (GH-6008) (GH-10823)

Fix an undefined behaviour in the pthread implementation of
PyThread_start_new_thread(): add a function wrapper to always return
NULL.

Add pythread_callback struct and pythread_wrapper() to thread_pthread.h.

(cherry picked from commit 9eea6eaf23067880f4af3a130e3f67c9812e2f30)

7 years agobpo-35347: Fix test_socket.NonBlockingTCPTests (GH-10791) (GH-10817)
Victor Stinner [Fri, 30 Nov 2018 12:02:41 +0000 (13:02 +0100)] 
bpo-35347: Fix test_socket.NonBlockingTCPTests (GH-10791) (GH-10817)

testAccept() and testRecv() of test_socket.NonBlockingTCPTests have a
race condition: time.sleep() is used as a weak synchronization
primitive and the tests fail randomly on slow buildbots.

Use a reliable threading.Event to fix these tests.

Other changes:

* Replace send() with sendall()
* Add a timeout to select() in testAccept() and testRecv()
* Use addCleanup() to close sockets
* Use assertRaises()

(cherry picked from commit ebd5d6d6e6e4e751ba9c7534004aadfc27ba9265)

7 years agoFix DeprecationWarning in test_bytes (GH-10805)
Victor Stinner [Fri, 30 Nov 2018 10:04:42 +0000 (11:04 +0100)] 
Fix DeprecationWarning in test_bytes (GH-10805)

Running test_bytes with python -3 -Wd emits two DeprecationWarning on
"1/0". Use "1//0" to prevent the warning.

7 years agobpo-35356: Fix a possible reference leak in nis.maps(). (GH-10808)
Miss Islington (bot) [Fri, 30 Nov 2018 08:04:43 +0000 (00:04 -0800)] 
bpo-35356: Fix a possible reference leak in nis.maps(). (GH-10808)

(cherry picked from commit a2e3585e79c93b2372dbad46a744e28fcc6dad6d)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
7 years agobpo-34021: Windows skips test_regrtest.test_env_changed() (GH-10804)
Victor Stinner [Thu, 29 Nov 2018 22:38:35 +0000 (23:38 +0100)] 
bpo-34021: Windows skips test_regrtest.test_env_changed() (GH-10804)

On Windows, test_env_changed() of test_regrtest is now skipped
because it fails  randomly for an unknown reason on "x86 Windows XP
VS9.0 2.7" buildbot worker.

7 years agobpo-34279, regrtest: Issue a warning if no tests have been executed (GH-10801)
Victor Stinner [Thu, 29 Nov 2018 20:14:42 +0000 (21:14 +0100)] 
bpo-34279, regrtest: Issue a warning if no tests have been executed (GH-10801)

Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com>