]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
7 years agobpo-34203: FAQ now recommends python 3.x over 2.x (GH-9796)
Miss Islington (bot) [Fri, 12 Oct 2018 12:06:16 +0000 (05:06 -0700)] 
bpo-34203: FAQ now recommends python 3.x over 2.x (GH-9796)

(cherry picked from commit 4505f65ae7807f2420ed14d4f060e7cd5c4039d3)

Co-authored-by: Gus Goulart <augusto@goulart.me>
7 years agobpo-32962: Fix test_gdb failure in debug build with -mcet -fcf-protection -O0 (GH...
Victor Stinner [Wed, 10 Oct 2018 10:54:04 +0000 (12:54 +0200)] 
bpo-32962: Fix test_gdb failure in debug build with -mcet -fcf-protection -O0 (GH-9656) (GH-9788)

When Python is built with the intel control-flow protection flags,
-mcet -fcf-protection, gdb is not able to read the stack without
actually jumping inside the function. This means an extra
'next' command is required to make the $pc (program counter)
enter the function and make the stack of the function exposed to gdb.

test_gdb: get_gdb_repr() now uses the "backtrace 1" command after
breakpoint, as in the master branch.

Co-Authored-By: Marcel Plch <gmarcel.plch@gmail.com>
(cherry picked from commit 9b7c74ca32d1bec7128d550a9ab1b2ddc7046287)
(cherry picked from commit 79d21331e605fdc941f947621846b8563485aab6)

7 years ago[2.7] bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-9686)
tzickel [Wed, 3 Oct 2018 11:50:04 +0000 (14:50 +0300)] 
[2.7] bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-9686)

Fix a reference issue inside multiprocessing.Pool that caused the pool to remain alive if it was deleted without being closed or terminated explicitly.

7 years ago[2.7] bpo-13407: Mention that bz2/tarfile doesn't support multi-stream bzip2 files...
Andrés Delfino [Sat, 29 Sep 2018 16:57:35 +0000 (13:57 -0300)] 
[2.7] bpo-13407: Mention that bz2/tarfile doesn't support multi-stream bzip2 files (GH-8428)

* bpo-13407: Mention that tarfile doesn't support multistream bzip2 files

* Add mention to bz2 module also

7 years agoDrop confusing commented out code in pystrtod.c (GH-6072) (GH-9588)
Victor Stinner [Wed, 26 Sep 2018 15:18:23 +0000 (08:18 -0700)] 
Drop confusing commented out code in pystrtod.c (GH-6072) (GH-9588)

Fix the following warning:

Python/pystrtod.c: In function 'format_float_short':
Python/pystrtod.c:1007:13: warning: 'strncpy' output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation]
             strncpy(p, "ERR", 3);

(cherry picked from commit 9fb84157595a385f15799e5d0729c1e1b0ba9d38)

7 years ago[2.7] bpo-34162: Update 2.7 idlelib/NEWS.txt to 2018-9-24 (GH-9550)
Terry Jan Reedy [Mon, 24 Sep 2018 23:43:54 +0000 (19:43 -0400)] 
[2.7] bpo-34162: Update 2.7 idlelib/NEWS.txt to 2018-9-24 (GH-9550)

7 years ago[2.7] bpo-34610: Fixed iterator of multiprocessing.managers.DictProxy. (GH-9113)...
Serhiy Storchaka [Sat, 22 Sep 2018 18:34:16 +0000 (21:34 +0300)] 
[2.7] bpo-34610: Fixed iterator of multiprocessing.managers.DictProxy. (GH-9113). (GH-9500)

(cherry picked from commit e0e5065daef36dafe10a46eaa8b7800274d73062)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
7 years ago[2.7] bpo-34472: Add data descriptor signature to zipfile (GH-8871) (ПР-9407)
Serhiy Storchaka [Sat, 22 Sep 2018 17:48:23 +0000 (20:48 +0300)] 
[2.7] bpo-34472: Add data descriptor signature to zipfile (GH-8871) (ПР-9407)

This makes streamed zips compatible with MacOS Archive Utility and
other applications.
(cherry picked from commit 4ba3b50bfe6d50cd82d208023ea23e203ab50589)

Co-authored-by: Silas Sewell <silas@sewell.org>
7 years agoFix pickletools doc for NEWFALSE. (GH-9432)
Miss Islington (bot) [Sat, 22 Sep 2018 15:38:57 +0000 (08:38 -0700)] 
Fix pickletools doc for NEWFALSE. (GH-9432)

Also make docs for NEWFALSE and NEWTRUE more consistent
with docs for other opcodes.
(cherry picked from commit 488cfb78c8b81075942b5e4cc9630e7a6dd9dc28)

Co-authored-by: Krzysztof Wroblewski <krzysiek.wr@gmail.com>
7 years ago[2.7] bpo-34623: Mention CVE-2018-14647 in news entry (GH-9482) (GH-9490)
Miss Islington (bot) [Sat, 22 Sep 2018 04:57:00 +0000 (21:57 -0700)] 
[2.7] bpo-34623: Mention CVE-2018-14647 in news entry (GH-9482) (GH-9490)

https://bugs.python.org/issue34623
(cherry picked from commit 026337a7101369297c8083047d2f3c6fc9dd1e2b)

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

7 years agobpo-19756: Prevent test failures due to EADDRNOTAVAIL (GH-9446)
Miss Islington (bot) [Thu, 20 Sep 2018 16:06:04 +0000 (09:06 -0700)] 
bpo-19756: Prevent test failures due to EADDRNOTAVAIL (GH-9446)

(cherry picked from commit 8213eaddf3ce8e87564d2949454903a1484748b5)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
7 years ago[2.7] bpo-34542: Update test certs and keys (GH-8997) (GH-9397)
Christian Heimes [Thu, 20 Sep 2018 10:33:53 +0000 (12:33 +0200)] 
[2.7] bpo-34542: Update test certs and keys (GH-8997) (GH-9397)

Update all test certs and keys to use future proof crypto settings:

* 3072 bit RSA keys
* SHA-256 signature

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

https://bugs.python.org/issue34542

7 years ago[2.7] bpo-34603, ctypes/libffi_msvc: Fix returning structs from functions (GH-9258...
Vladimir Matveev [Wed, 19 Sep 2018 20:48:21 +0000 (13:48 -0700)] 
[2.7] bpo-34603, ctypes/libffi_msvc: Fix returning structs from functions (GH-9258) (GH-9425)

Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
7 years ago[2.7] bpo-34341: Fix appending to ZIP archives with the ZIP64 extension. (GH-8683...
Serhiy Storchaka [Tue, 18 Sep 2018 20:28:34 +0000 (23:28 +0300)] 
[2.7] bpo-34341: Fix appending to ZIP archives with the ZIP64 extension. (GH-8683). (GH-9400)

(cherry picked from commit 9bdb7be482aef8f60daa1d36606568a132dcb616)

7 years ago[2.7] bpo-34623: Use XML_SetHashSalt in _elementtree (GH-9146) (GH-9394)
Christian Heimes [Tue, 18 Sep 2018 13:13:09 +0000 (15:13 +0200)] 
[2.7] bpo-34623: Use XML_SetHashSalt in _elementtree (GH-9146) (GH-9394)

The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

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

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

7 years ago[2.7] bpo-34710: fix SSL module build (GH-9347) (GH-9353)
Christian Heimes [Mon, 17 Sep 2018 13:42:30 +0000 (06:42 -0700)] 
[2.7] bpo-34710: fix SSL module build (GH-9347) (GH-9353)

Include ``openssl/dh.h`` header file to fix implicit function declaration of ``DH_free()``.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>.
(cherry picked from commit b3a271fc0ce3e13e427be8914decfc205a220ca8)

Co-authored-by: Alexandru Ardelean <ardeleanalex@gmail.com>
https://bugs.python.org/issue34710

7 years ago[2.7] bpo-33216: Clarify the documentation for CALL_FUNCTION_* (GH-8338) (GH-8783)
Serhiy Storchaka [Mon, 17 Sep 2018 12:15:48 +0000 (15:15 +0300)] 
[2.7] bpo-33216: Clarify the documentation for CALL_FUNCTION_* (GH-8338) (GH-8783)

(cherry picked from commit 76aa2c0a9a8dd3ac90b91e7342c8ce8125bf21f9)

Co-authored-by: larryhastings <larry@hastings.org>
7 years ago[2.7] bpo-19417: Add test_bdb.py (GH-5217) (GH-6156)
xdegaye [Sun, 16 Sep 2018 06:09:14 +0000 (08:09 +0200)] 
[2.7] bpo-19417: Add test_bdb.py (GH-5217) (GH-6156)

(cherry picked from commit 3fe33043ee83d19e15551094fc1e0984617ded3c)

https://bugs.python.org/issue19417

7 years ago[2.7] closes bpo-8450: a better error message when http status line isn't received...
Shoham Peller [Fri, 14 Sep 2018 23:28:08 +0000 (02:28 +0300)] 
[2.7] closes bpo-8450: a better error message when http status line isn't received (GH-2825)

When the server has closed the connection before sending a status-line,
the client's error message should have a more descriptive error message

https://bugs.python.org/issue8450

https://bugs.python.org/issue8450

7 years ago[2.7] Don't run AC_STRUCT_TIMEZONE twice. (GH-9309)
Benjamin Peterson [Fri, 14 Sep 2018 16:53:09 +0000 (09:53 -0700)] 
[2.7] Don't run AC_STRUCT_TIMEZONE twice. (GH-9309)

(cherry picked from commit a4414ef20b971e6803309acebfa85b1621ac625e)

7 years ago[2.7] bpo-20047: Remove Objects/bytesobject.c from 2.7 (GH-9268)
Zackery Spytz [Thu, 13 Sep 2018 23:16:41 +0000 (17:16 -0600)] 
[2.7] bpo-20047: Remove Objects/bytesobject.c from 2.7 (GH-9268)

It was accidentally added in 107f3cc791d223dc06b7c80f0de672e88ae6a8d1.

7 years ago[2.7] closes bpo-34661: Fix test_shutil if unzip doesn't support -t. (GH-9267)
Benjamin Peterson [Thu, 13 Sep 2018 18:24:07 +0000 (11:24 -0700)] 
[2.7] closes bpo-34661: Fix test_shutil if unzip doesn't support -t. (GH-9267)

(cherry picked from commit a710ebd21b09efe902dde84d4862ce5c6427f7af)

7 years ago[2.7] closes bpo-34652: Always disable lchmod on Linux. (GH-9242)
Benjamin Peterson [Wed, 12 Sep 2018 23:31:17 +0000 (16:31 -0700)] 
[2.7] closes bpo-34652: Always disable lchmod on Linux. (GH-9242)

(cherry picked from commit 40caa05fa4d1810a1a6bfc34e0ec930c351089b7)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
7 years agobpo-34649: Add missing NULL checks to _encoded_const() (GH-9225)
Miss Islington (bot) [Wed, 12 Sep 2018 22:00:56 +0000 (15:00 -0700)] 
bpo-34649: Add missing NULL checks to _encoded_const() (GH-9225)

Reported by Svace static analyzer.
(cherry picked from commit 6f82bffd2df63a4072b3f0483cdbe93ddedb87e9)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
7 years ago[2.7] bpo-28994: Remove mistakenly backported atexitmodule.c (GH-9214)
Zackery Spytz [Wed, 12 Sep 2018 11:28:18 +0000 (05:28 -0600)] 
[2.7] bpo-28994: Remove mistakenly backported atexitmodule.c (GH-9214)

It was backported in 0cc43df05e36655220468953e838169966b94ebd.

7 years ago[2.7] Delete old expat comment. (GH-9205)
Benjamin Peterson [Wed, 12 Sep 2018 01:28:35 +0000 (18:28 -0700)] 
[2.7] Delete old expat comment. (GH-9205)

(cherry picked from commit b9bf9d025e659b5a1963027eb73690e57cb35dd0)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
7 years ago[2.7] bpo-34405: Updated to OpenSSL 1.0.2p for Windows builds. (GH-8776) (GH-9202)
Steve Dower [Wed, 12 Sep 2018 01:02:40 +0000 (18:02 -0700)] 
[2.7] bpo-34405: Updated to OpenSSL 1.0.2p for Windows builds. (GH-8776) (GH-9202)

https://bugs.python.org/issue34405

7 years ago[2.7] bpo-34405: Update to OpenSSL 1.0.2p for macOS installer builds (GH-9191) (GH...
Miss Islington (bot) [Tue, 11 Sep 2018 23:53:20 +0000 (16:53 -0700)] 
[2.7] bpo-34405: Update to OpenSSL 1.0.2p for macOS installer builds (GH-9191) (GH-9196)

(cherry picked from commit 31912b43c903aafad09350899ed6a9dec7c43421)

Co-authored-by: Ned Deily <nad@python.org>
<!-- issue-number: [bpo-34405](https://www.bugs.python.org/issue34405) -->
https://bugs.python.org/issue34405
<!-- /issue-number -->

7 years ago[2.7] bpo-32502: Discard 64-bit (and other invalid) hardware addresses (GH-9125)
Chih-Hsuan Yen [Tue, 11 Sep 2018 20:54:57 +0000 (04:54 +0800)] 
[2.7] bpo-32502: Discard 64-bit (and other invalid) hardware addresses (GH-9125)

(cherry picked from commit 6b273f7f4056f8276f61a97c789d6bb4425e653c)

Co-authored-by: Bo Bayles <bbayles@gmail.com>
7 years ago[2.7] closes bpo-31608: Fix a crash in methods of a subclass of _collections.deque...
Benjamin Peterson [Tue, 11 Sep 2018 20:41:57 +0000 (13:41 -0700)] 
[2.7] closes bpo-31608: Fix a crash in methods of a subclass of _collections.deque with a bad __new__(). (GH-9179)

7 years agobpo-34625: Update vendorized expat version to 2.2.6. (GH-9150)
Miss Islington (bot) [Tue, 11 Sep 2018 04:26:42 +0000 (21:26 -0700)] 
bpo-34625: Update vendorized expat version to 2.2.6. (GH-9150)

(cherry picked from commit 5033aa77aacaa5505636f150e8d54baac5bdca9c)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
7 years agobpo-25083: Python can sometimes create incorrect .pyc files (GH-8449)
tzickel [Mon, 10 Sep 2018 18:46:14 +0000 (21:46 +0300)] 
bpo-25083: Python can sometimes create incorrect .pyc files (GH-8449)

Python 2 never checked for I/O error when reading .py files and
thus could mistake an I/O error for EOF and create incorrect .pyc
files.
This adds an check for this and aborts on an error.

7 years ago[2.7] Fix misleading mentions of tp_size in comments (GH-9138)
Benjamin Peterson [Mon, 10 Sep 2018 17:50:15 +0000 (10:50 -0700)] 
[2.7] Fix misleading mentions of tp_size in comments (GH-9138)

Many type object initializations labeled a field "tp_size" in the
comment, but the name of that field is tp_basicsize..
(cherry picked from commit 0e0bc4e221f592f305d335faf5f8046484eb9238)

Co-authored-by: Peter Eisentraut <peter@eisentraut.org>
7 years agobpo-23855: Add missing NULL checks for malloc() in _msi.c (GH-9038)
Miss Islington (bot) [Mon, 10 Sep 2018 16:41:12 +0000 (09:41 -0700)] 
bpo-23855: Add missing NULL checks for malloc() in _msi.c (GH-9038)

(cherry picked from commit 4e519377b1b84c9414a360961276993d24198825)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
7 years agobpo-25750: fix refcounts in type_getattro() (GH-6118) (GH-9091)
Victor Stinner [Fri, 7 Sep 2018 08:15:31 +0000 (10:15 +0200)] 
bpo-25750: fix refcounts in type_getattro() (GH-6118) (GH-9091)

When calling tp_descr_get(self, obj, type), make sure that
we own a strong reference to "self".

(cherry picked from commit 8f735485acf2e35a75d2fa019feb8f905598c4e5)

7 years agobpo-26544: Get rid of dependence from distutils in platform. (GH-8356) (GH-8952)
Miss Islington (bot) [Wed, 5 Sep 2018 14:46:26 +0000 (07:46 -0700)] 
bpo-26544: Get rid of dependence from distutils in platform. (GH-8356) (GH-8952)

(cherry picked from commit 7d81e8f5995df6980a1a02923e224a481375f130)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
7 years agobpo-34530: Fix distutils find_executable() (GH-9049) (GH-9058)
Victor Stinner [Tue, 4 Sep 2018 09:40:29 +0000 (11:40 +0200)] 
bpo-34530: Fix distutils find_executable() (GH-9049) (GH-9058)

distutils.spawn.find_executable() now falls back on os.defpath if the
PATH environment variable is not set.

(cherry picked from commit 39487196c87e28128ea907a0d9b8a88ba53f68d5)

7 years agobpo-34500: Fix ResourceWarning in difflib.py (GH-8926)
Mickaël Schoentgen [Mon, 3 Sep 2018 01:48:08 +0000 (03:48 +0200)] 
bpo-34500: Fix ResourceWarning in difflib.py (GH-8926)

The change to Tools/scripts/diff.py effectively backports part of
a2637729f23dc993e820fd92f0d1759ad714c9b2.
The test code changed in Doc/library/difflib.rst is not present in current 3.x.

7 years ago[2.7] Fix struct sequence glossary entry grammar (GH-9030)
Zachary Ware [Sun, 2 Sep 2018 02:18:22 +0000 (21:18 -0500)] 
[2.7] Fix struct sequence glossary entry grammar (GH-9030)

... by removing a superfluous "either".

Reported by Никита Люшненко on docs@

(cherry picked from commit 98b976a2f82ba5f50cf6846338f644ca6c64f47d)

7 years agobpo-34007: Skip traceback tests if the Program Counter is not available. (GH-9018)
Miss Islington (bot) [Fri, 31 Aug 2018 22:43:24 +0000 (18:43 -0400)] 
bpo-34007: Skip traceback tests if the Program Counter is not available. (GH-9018)

Sometimes some versions of the shared libraries that are part of the
traceback are compiled in optimised mode and the Program Counter (PC)
is not present, not allowing gdb to walk the frames back. When this
happens, the Python bindings of gdb raise an exception, making the
test impossible to succeed.
(cherry picked from commit f2ef51f8bec525b21e52988880c8a029642795ed)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
7 years agocloses bpo-34540: Convert shutil._call_external_zip to use subprocess rather than...
Benjamin Peterson [Thu, 30 Aug 2018 04:59:21 +0000 (21:59 -0700)] 
closes bpo-34540: Convert shutil._call_external_zip to use subprocess rather than distutils.spawn. (GH-8985)

7 years ago[2.7] bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks (GH...
Tal Einat [Sun, 26 Aug 2018 08:44:53 +0000 (11:44 +0300)] 
[2.7] bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks (GH-8864)

(cherry picked from commit 91cb298f811961277fd4cc4a32211899d48bedcb)

Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
7 years agobpo-34491: Add missing Py_DECREF() in _bsddb's DB_join() (GH-8909)
Zackery Spytz [Sat, 25 Aug 2018 04:22:21 +0000 (22:22 -0600)] 
bpo-34491: Add missing Py_DECREF() in _bsddb's DB_join() (GH-8909)

7 years ago[2.7] Issue GH-18560: Fix potential NULL pointer dereference in sum(). (GH-8892)
Benjamin Peterson [Fri, 24 Aug 2018 05:28:39 +0000 (22:28 -0700)] 
[2.7] Issue GH-18560: Fix potential NULL pointer dereference in sum(). (GH-8892)

(cherry picked from commit 704e2d374f88bca83339b95d559b0abce12dc6bd)

Co-authored-by: Christian Heimes <christian@cheimes.de>
7 years agocloses bpo-34474: Python/bltinmodule.c: Add missing NULL check in builtin_sum_impl...
Miss Islington (bot) [Fri, 24 Aug 2018 05:13:19 +0000 (01:13 -0400)] 
closes bpo-34474: Python/bltinmodule.c: Add missing NULL check in builtin_sum_impl() (GH-8872)

Reported by Svace static analyzer.
(cherry picked from commit 2b824b2538c4a5f9f520c5de8a1eae5a0c181a94)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
7 years agocloses bpo-34477: Objects/typeobject.c: Add missing NULL check to type_init() (GH...
Miss Islington (bot) [Fri, 24 Aug 2018 04:51:46 +0000 (00:51 -0400)] 
closes bpo-34477: Objects/typeobject.c: Add missing NULL check to type_init() (GH-8876)

Reported by Svace static analyzer.
(cherry picked from commit f6247aac08c1a79d0479145a405718bb76dba434)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
7 years agoMake it more clear that setUpClass runs before each class, not "class run" (GH-8844)
Miss Islington (bot) [Thu, 23 Aug 2018 14:59:06 +0000 (10:59 -0400)] 
Make it more clear that setUpClass runs before each class, not "class run" (GH-8844)

(cherry picked from commit c33bb5d4016fb2fc8f3b6d4b0c14b73b33cdb3cf)

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
7 years ago[2.7] bpo-34457: Python/ast.c: Add missing NULL check to alias_for_import_name()...
Alexey Izbyshev [Wed, 22 Aug 2018 11:46:51 +0000 (14:46 +0300)] 
[2.7] bpo-34457: Python/ast.c: Add missing NULL check to alias_for_import_name(). (GH-8852) (GH-8858)

Reported by Svace static analyzer.
(cherry picked from commit 28853a249b1d0c890b7e9ca345290bb8c1756446)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
7 years ago[2.7] bpo-34400: Fix more undefined behavior in parsetok.c (GH-8833). (GH-8849)
Zackery Spytz [Wed, 22 Aug 2018 05:54:17 +0000 (23:54 -0600)] 
[2.7] bpo-34400: Fix more undefined behavior in parsetok.c (GH-8833). (GH-8849)

(cherry picked from commit 3e26e42c905852394fa136f1cc564dac98b56166)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
7 years ago[2.7] bpo-30411: Use --git-dir instead of -C to make git work under version below...
Xiang Zhang [Mon, 20 Aug 2018 15:15:07 +0000 (23:15 +0800)] 
[2.7] bpo-30411: Use --git-dir instead of -C to make git work under version below 1.8.5. (GH-8744) (GH-8838)

(cherry picked from commit 4c8555773a801f957297132a92c0acb382d640e4)

7 years agobpo-34395: Fix memory leaks caused by incautious usage of PyMem_Realloc(). (GH-8785)
Sergey Fedoseev [Fri, 17 Aug 2018 05:36:15 +0000 (10:36 +0500)] 
bpo-34395: Fix memory leaks caused by incautious usage of PyMem_Realloc(). (GH-8785)

7 years ago[2.7] bpo-34391: Fix ftplib test for TLS 1.3 (GH-8787) (GH-8791)
Christian Heimes [Thu, 16 Aug 2018 19:38:44 +0000 (21:38 +0200)] 
[2.7] bpo-34391: Fix ftplib test for TLS 1.3 (GH-8787) (GH-8791)

Read from data socket to avoid "[SSL] shutdown while in init" exception
during shutdown of the dummy server.

Signed-off-by: Christian Heimes <christian@python.org>
<!-- issue-number: [bpo-34391](https://www.bugs.python.org/issue34391) -->
https://bugs.python.org/issue34391
<!-- /issue-number -->.
(cherry picked from commit 1590c393360df059160145e7475754427bfc6680)

Co-authored-by: Christian Heimes <christian@python.org>
7 years agocloses bpo-34400: Fix undefined behavior in parsetok(). (GH-4439)
Miss Islington (bot) [Wed, 15 Aug 2018 06:59:11 +0000 (02:59 -0400)] 
closes bpo-34400: Fix undefined behavior in parsetok(). (GH-4439)

Avoid undefined pointer arithmetic with NULL.
(cherry picked from commit 7c4ab2afb17b99eb3f61f9c73cbd548b5e0ad2c0)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
7 years ago[2.7] bpo-34399: 2048 bits RSA keys and DH params (GH-8762) (GH-8765)
Christian Heimes [Tue, 14 Aug 2018 14:53:04 +0000 (16:53 +0200)] 
[2.7] bpo-34399: 2048 bits RSA keys and DH params (GH-8762) (GH-8765)

Downstream vendors have started to deprecate weak keys. Update all RSA keys
and DH params to use at least 2048 bits.

Finite field DH param file use RFC 7919 values, generated with

    certtool --get-dh-params --sec-param=high

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

Co-authored-by: Christian Heimes <christian@python.org>
7 years ago[2.7] bpo-34272: Move argument parsing tests from test_capi to test_getargs2. (GH...
Serhiy Storchaka [Mon, 6 Aug 2018 15:06:14 +0000 (18:06 +0300)] 
[2.7] bpo-34272: Move argument parsing tests from test_capi to test_getargs2. (GH-8567). (GH-8691)

(cherry picked from commit 8f7bb100d0fa7fb2714f3953b5b627878277c7c6)

7 years ago[2.7] bpo-34236: Remove mistakenly backported Test6012 in test_capi.py. (GH-8681)
Zackery Spytz [Mon, 6 Aug 2018 13:47:48 +0000 (07:47 -0600)] 
[2.7] bpo-34236: Remove mistakenly backported Test6012 in test_capi.py. (GH-8681)

This was backported by mistake in ef19fd2.

7 years ago[2.7] bpo-34273: Change 'Fixed point' to 'Fixed-point notation'. (GH-8673)
Terry Jan Reedy [Mon, 6 Aug 2018 13:03:44 +0000 (09:03 -0400)] 
[2.7] bpo-34273: Change 'Fixed point' to 'Fixed-point notation'. (GH-8673)

The change in the mini language floating point and decimal table
is consistent with 'Exponential notation' and clarifies that we
are referring to the output notation, not an object type.

(cherry picked from commit 28c7f8c8ce34a0cb848822a252a9d0a761fb42d5)

7 years agoFix docstring of Profiler class (GH-8651)
Miss Islington (bot) [Fri, 3 Aug 2018 09:43:18 +0000 (02:43 -0700)] 
Fix docstring of Profiler class (GH-8651)

(cherry picked from commit 2ebd3813af9172fe1f9b2f6004edf6f1e1e5d9f1)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
7 years ago [2.7] bpo-34275: Make IDLE calltips always visible on Mac. (GH-8639) (GH-8644)
Terry Jan Reedy [Fri, 3 Aug 2018 03:40:20 +0000 (23:40 -0400)] 
 [2.7] bpo-34275: Make IDLE calltips always visible on Mac. (GH-8639) (GH-8644)

Some MacOS-tk combinations need .update_idletasks().
The call is both unneeded and innocuous on Linux and Windows.
Patch by Kevin Walzer.

(cherry picked from commit 9beaef6225cdae972b1cccd5310828cc29bf9d33)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
7 years agoFix compilation warnings on Windows (GH-8627)
Victor Stinner [Thu, 2 Aug 2018 16:02:59 +0000 (18:02 +0200)] 
Fix compilation warnings on Windows (GH-8627)

* Fix compilation warning in _ctypes module on Window

(cherry picked from commit 20f11fe43c47b68c8b9dd6539d2d40b66c9957f9)

* Fix compilation warnings on Windows 64-bit

(cherry picked from commit 725e4212229bf68f87d4f66c1815d444ddfc7aa5)

* Fix compiler warning in unicodeobject.c

Explicitly case to Py_UNICODE to fix the warning:

Objects\unicodeobject.c(4225): warning C4244: '=' :
conversion from 'long' to 'Py_UNICODE', possible loss of data

The downcast cannot overflow since we check that value <= 0x10ffff.

7 years agobpo-29565: Fix compilation for C89 (GH-8626)
Victor Stinner [Thu, 2 Aug 2018 15:40:11 +0000 (17:40 +0200)] 
bpo-29565: Fix compilation for C89 (GH-8626)

Use a local scope for the 'i' variable.

7 years agobpo-29565: Corrected ctypes passing of large structs by value on Windows AMD64 (GH...
Victor Stinner [Thu, 2 Aug 2018 14:47:26 +0000 (16:47 +0200)] 
bpo-29565: Corrected ctypes passing of large structs by value on Windows AMD64 (GH-168) (GH-8625)

Fixed bpo-29565: Corrected ctypes passing of large structs by value.

Added code and test to check that when a structure passed by value
is large enough to need to be passed by reference, a copy of the
original structure is passed. The callee updates the passed-in value,
and the test verifies that the caller's copy is unchanged. A similar
change was also added to the test added for bpo-20160 (that test was
passing, but the changes should guard against regressions).

(cherry picked from commit a86339b83fbd0932e0529a3c91935e997a234582)

7 years ago[2.7] bpo-34120: fix IDLE freezing after closing dialogs (GH-8603) 8619/head
Tal Einat [Thu, 2 Aug 2018 07:21:49 +0000 (10:21 +0300)] 
[2.7] bpo-34120: fix IDLE freezing after closing dialogs (GH-8603)

Added missing .grab_release() calls to all places where we call .grab_set().

(cherry picked from commit 10ea9409ceb5da83cb380b610750551e26561044)

7 years ago[2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479)
Serhiy Storchaka [Tue, 31 Jul 2018 06:09:36 +0000 (09:09 +0300)] 
[2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479)

7 years agobpo-27671: Update FAQ about why len is function (GH-8432)
Miss Islington (bot) [Tue, 31 Jul 2018 05:58:12 +0000 (22:58 -0700)] 
bpo-27671: Update FAQ about why len is function (GH-8432)

(cherry picked from commit c48e26dcadbff8620bb5881d3bd148fc8894d0ef)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
7 years ago[2.7] Use 'for example' instead of 'in other words' in compound statement doc (GH...
Andrés Delfino [Mon, 30 Jul 2018 19:16:35 +0000 (16:16 -0300)] 
[2.7] Use 'for example' instead of 'in other words' in compound statement doc (GH-8401)

(cherry picked from commit 6921ef7bef4eab3819b3d0fda5fa3e3b2a8c0613)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
7 years agobpo-34229: Check start and stop of slice object to be long when they are not int...
Xtreak [Thu, 26 Jul 2018 16:20:34 +0000 (21:50 +0530)] 
bpo-34229: Check start and stop of slice object to be long when they are not int in PySlice_GetIndices (GH-8480)

7 years agobpo-28677: Improve phrasing of when instance attribute is referenced (GH-6208)
Miss Islington (bot) [Wed, 25 Jul 2018 17:40:09 +0000 (10:40 -0700)] 
bpo-28677: Improve phrasing of when instance attribute is referenced (GH-6208)

(cherry picked from commit c0f0a7669c73c0d444851dd4c5299de2479214cc)

Co-authored-by: Aaron Ang <aaronang@users.noreply.github.com>
7 years agoFix site module documentation. (GH-8441)
Miss Islington (bot) [Tue, 24 Jul 2018 16:27:12 +0000 (09:27 -0700)] 
Fix site module documentation. (GH-8441)

The script will exit with the number 0 (zero), instead of the letter O.
(cherry picked from commit 95d34c2a37f4c5046f6439abef881925d34fe4ac)

Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
7 years ago[2.7] bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816) (GH... 8431/head
Tal Einat [Mon, 23 Jul 2018 21:38:34 +0000 (00:38 +0300)] 
[2.7] bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816) (GH-8427)

(cherry picked from commit bde782bb594edffeabe978abeee2b7082ab9bc2a)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
7 years agobpo-34189: Remove a file backported by accident. (GH-8419)
Serhiy Storchaka [Mon, 23 Jul 2018 19:32:09 +0000 (22:32 +0300)] 
bpo-34189: Remove a file backported by accident. (GH-8419)

7 years agobpo-33336, imaplib: Legalize MOVE command (GH-6569)
Miss Islington (bot) [Mon, 23 Jul 2018 14:07:03 +0000 (07:07 -0700)] 
bpo-33336, imaplib: Legalize MOVE command (GH-6569)

imaplib now allows MOVE command in IMAP4.uid() (RFC 6851:
IMAP MOVE Extension) and potentially as a name of supported
method of IMAP4 object.
(cherry picked from commit caa331d492acc67d8f4edd16542cebfabbbe1e79)

Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
7 years ago[2.7] bpo-34189: Add simple tests for new Tk widget options. (GH-8396). (GH-8400)
Serhiy Storchaka [Sun, 22 Jul 2018 19:15:16 +0000 (22:15 +0300)] 
[2.7] bpo-34189: Add simple tests for new Tk widget options. (GH-8396). (GH-8400)

(cherry picked from commit e271ca78e37a502b3dc1036f824aa3999efcd56b)
(cherry picked from commit c75c1e0e8aeb720ac3fcfab119b70cabba4e8235)

7 years agobpo-25943: Check for integer overflow in bsddb's DB_join(). (GH-8392)
Zackery Spytz [Sun, 22 Jul 2018 16:53:56 +0000 (10:53 -0600)] 
bpo-25943: Check for integer overflow in bsddb's DB_join(). (GH-8392)

7 years agobpo-25943: Fix potential heap corruption in bsddb's _db_associateCallback() (GH-8337)
Zackery Spytz [Sat, 21 Jul 2018 08:27:44 +0000 (02:27 -0600)] 
bpo-25943: Fix potential heap corruption in bsddb's _db_associateCallback() (GH-8337)

There was a missing check for integer overflow, several function calls
were not checked for failure, and allocated memory was not freed if an
error occurred.

7 years ago[2.7] Enable GUI testing on Travis Linux builds via Xvfb (GH-7887)
Zachary Ware [Fri, 20 Jul 2018 02:51:42 +0000 (21:51 -0500)] 
[2.7] Enable GUI testing on Travis Linux builds via Xvfb (GH-7887)

(cherry picked from commit b12112b5ba608cdd7a0962a6b18cad4fe58b46e6)

7 years agoClarify ValueError's broad applicability (GH-8313) (GH-8316)
Miss Islington (bot) [Tue, 17 Jul 2018 20:23:52 +0000 (13:23 -0700)] 
Clarify ValueError's broad applicability (GH-8313) (GH-8316)

(cherry picked from commit feabae961707b00008c15a31352e458f4e8b3a6c)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
7 years ago[2.7] bpo-34068: iobase_close could call PyObject_SetAttrString with an exception...
Serhiy Storchaka [Tue, 17 Jul 2018 15:15:46 +0000 (18:15 +0300)] 
[2.7] bpo-34068: iobase_close could call PyObject_SetAttrString with an exception set (GH-8282). (GH-8312) (GH-8314)

(cherry picked from commit 28f07364f066792ceee93231dbb80ae8ad98b2bb)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>.
(cherry picked from commit cc13016658a9ed86d0b702ab6c251ad5952a952f)

7 years agobpo-34080: Fix a memory leak in the compiler. (GH-8222)
Miss Islington (bot) [Wed, 11 Jul 2018 21:53:17 +0000 (14:53 -0700)] 
bpo-34080: Fix a memory leak in the compiler. (GH-8222)

(cherry picked from commit 993030aac576710a46b3dd0b4864f819d4a94145)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
7 years ago[2.7] bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192). (GH-8255)
Serhiy Storchaka [Wed, 11 Jul 2018 16:49:17 +0000 (19:49 +0300)] 
[2.7] bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192). (GH-8255)

(cherry picked from commit 504373c59b48f1ea12132d515459022730db6047)

Also backport tests for skipitem() and handling errors.

7 years ago[2.7] bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091) (#8225)
Tal Einat [Tue, 10 Jul 2018 10:28:09 +0000 (13:28 +0300)] 
[2.7] bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091) (#8225)

Actually just one fix on the 2.7 branch.

Contributed by Bradley Laney.

(cherry picked from commit 6b490b5db40fc29588e8e6cc23bb89c4fed74ad5)

7 years ago[2.7] prefix internal sqlite symbols with _pysqlite_ (GH-8215). (GH-8217)
Benjamin Peterson [Tue, 10 Jul 2018 05:36:49 +0000 (22:36 -0700)] 
[2.7] prefix internal sqlite symbols with _pysqlite_ (GH-8215). (GH-8217)

(cherry picked from commit 7762e4d3872818272800dfbd8e1d8e3a689eb8f2)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
7 years ago[2.7] delete some unused pysqlite forward declarations (GH-8211). (GH-8214)
Benjamin Peterson [Tue, 10 Jul 2018 04:12:57 +0000 (21:12 -0700)] 
[2.7] delete some unused pysqlite forward declarations (GH-8211). (GH-8214)

(cherry picked from commit d6d4432724b12efc0d280b8eb80bca0deb8d4323)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
7 years ago[2.7] Fixed several assertTrue() that were intended to be assertEqual(). (GH-8191...
Serhiy Storchaka [Mon, 9 Jul 2018 17:00:53 +0000 (20:00 +0300)] 
[2.7] Fixed several assertTrue() that were intended to be assertEqual(). (GH-8191) (GH-8202)

Fixed also testing the "always" warning filter.
(cherry picked from commit b796e7dcdc24ff7ec53044af041254c83a8ace21)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
7 years agobpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684). (GH-8193) (GH...
Serhiy Storchaka [Mon, 9 Jul 2018 11:39:06 +0000 (14:39 +0300)] 
bpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684). (GH-8193) (GH-8196)

(cherry picked from commit 2a9b8babf0d09946ebebfdb2931cc0d3db5a1d3d).
(cherry picked from commit 7c43b801503c802ed6ea4b811f5bc73791249d94)

7 years agobpo-33888: Use CPython instead of Python in the FAQ (GH-7767)
Miss Islington (bot) [Sat, 7 Jul 2018 23:32:57 +0000 (16:32 -0700)] 
bpo-33888: Use CPython instead of Python in the FAQ (GH-7767)

Make the change where discussing the CPython implementation of lists and dicts.
(cherry picked from commit 8d41278045ee4e8bf1cadb58a7db58d70ad55237)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
7 years ago[2.7] closes bpo-34050: Fix link in SSL docs (GH-8173). (GH-8179)
Benjamin Peterson [Sat, 7 Jul 2018 22:48:07 +0000 (15:48 -0700)] 
[2.7] closes bpo-34050: Fix link in SSL docs (GH-8173). (GH-8179)

(cherry picked from commit 9c5ba097485c8c643b670acd4026f4382bc92f4b)

Co-authored-by: Marcin Niemira <marcin@niemira.net>
7 years ago[2.7] bpo-33804: Document that the argument for io.TextIOBase.read() is optional...
Andrés Delfino [Sat, 7 Jul 2018 21:10:18 +0000 (18:10 -0300)] 
[2.7] bpo-33804: Document that the argument for io.TextIOBase.read() is optional (GH-7510). (GH-8171)

(cherry picked from commit b6bb77c2b8e83ba6cb845c7b512ac564276e854f)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
7 years ago[2.7] bpo-34019: Fix wrong arguments for Opera Browser (GH-8047) (#8126)
Pablo Galindo [Fri, 6 Jul 2018 23:54:09 +0000 (00:54 +0100)] 
[2.7] bpo-34019: Fix wrong arguments for Opera Browser (GH-8047) (#8126)

The Opera Browser was using a outdated command line invocation that resulted in an incorrect URL being opened in the browser when requested using the webbrowser module.

* Correct the arguments passed to the Opera Browser when opening a new URL..
(cherry picked from commit 3cf1f154edb88c108877729ea09f4ac174697fea)

Co-authored-by: Bumsik Kim <k.bumsik@gmail.com>
7 years ago[2.7] bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior...
Ammar Askar [Fri, 6 Jul 2018 10:23:13 +0000 (06:23 -0400)] 
[2.7] bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior (GH-7891) (#8133)

Most of the change involves fixing up the test suite, which previously made
the assumption that there wouldn't be a new line if the input didn't end in
one.

Contributed by Ammar Askar.

(cherry picked from commit c4ef4896eac86a6759901c8546e26de4695a1389)

7 years ago[2.7] bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336...
Serhiy Storchaka [Thu, 5 Jul 2018 09:20:19 +0000 (12:20 +0300)] 
[2.7] bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336). (GH-8107)

(cherry picked from commit fc05e68d8fac70349b7ea17ec14e7e0cfa956121)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
7 years agoDon't export pending_threadfunc from _testcapi. (GH-8075)
Miss Islington (bot) [Wed, 4 Jul 2018 05:48:45 +0000 (22:48 -0700)] 
Don't export pending_threadfunc from _testcapi. (GH-8075)

(cherry picked from commit b4588c2fffbda91e4c2f0cf2b0fc3d14def95608)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
7 years agobpo-34018: Doc'd that type names of SQLite converters are case-insensitive. (GH-8042...
Miss Islington (bot) [Tue, 3 Jul 2018 12:37:36 +0000 (05:37 -0700)] 
bpo-34018: Doc'd that type names of SQLite converters are case-insensitive. (GH-8042) (GH-8066)

(cherry picked from commit 831c29721dcb1b768c6315a4b8a4059c4c97ee8b)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
7 years agobpo-33735: Fix test_multiprocessing random failure (GH-8059) (GH-8061)
Victor Stinner [Tue, 3 Jul 2018 11:43:24 +0000 (13:43 +0200)] 
bpo-33735: Fix test_multiprocessing random failure (GH-8059) (GH-8061)

When hunting memory leaks using -R 3:3, test_imap_unordered() of
test_multiprocessing leaks randomly a few memory blocks. It is a
false alarm: when testing using -R 3:20 for example, no leak is
detected.

Modify test_imap_unordered() to be closer to test_imap():

* Only test 10 numbers instead of 1000: it's a pool of 4 processes, so
  10 is enough to test at least one number per process
* Use chunksize=100 instead of chunksize=53 to mimick test_imap()

(cherry picked from commit 23401fb960bb94e6ea62d2999527968d53d3fc65)

7 years ago[2.7] bpo-33974: Fix passing special characters to ttk widgets. (GH-7986) (GH-8021)
Serhiy Storchaka [Sat, 30 Jun 2018 10:34:56 +0000 (13:34 +0300)] 
[2.7] bpo-33974: Fix passing special characters to ttk widgets. (GH-7986) (GH-8021)

Fix passing lists and tuples of strings containing special characters
'"', '\\', '{', '}' and '\n' as options to tkinter.ttk widgets.
(cherry picked from commit 5bb5bbfca847524bab5f2368bdb48eedf5dba74f)

7 years ago[2.7] bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). (GH-3918). (GH...
Zackery Spytz [Fri, 29 Jun 2018 20:07:13 +0000 (14:07 -0600)] 
[2.7] bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). (GH-3918). (GH-8013)

(cherry picked from commit 23db935bcf258657682e66464bf8512def8af830)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
7 years agoUpdate 2.7 doc templates for 3.7.0 (GH-7996)
Ned Deily [Thu, 28 Jun 2018 19:20:35 +0000 (15:20 -0400)] 
Update 2.7 doc templates for 3.7.0 (GH-7996)

7 years agobpo-33958: Doc: Remove unused variable in example (GH-7927)
Miss Islington (bot) [Thu, 28 Jun 2018 06:37:17 +0000 (23:37 -0700)] 
bpo-33958: Doc: Remove unused variable in example (GH-7927)

(cherry picked from commit 62b6cea6b843076cfd6631eccd9347e8c3dd9458)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <srinivasreddy@users.noreply.github.com>
7 years ago[2.7] closes bpo-33956: update vendored expat to 2.2.5 (GH-7925)
Benjamin Peterson [Wed, 27 Jun 2018 03:56:58 +0000 (20:56 -0700)] 
[2.7] closes bpo-33956: update vendored expat to 2.2.5 (GH-7925)

(cherry picked from commit 4e21100fa7bf66e0b32146d3f46ae16afc73fee1)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
7 years agobpo-29514: Make magic number test work for candidates (GH-7946)
Ned Deily [Wed, 27 Jun 2018 03:55:36 +0000 (23:55 -0400)] 
bpo-29514: Make magic number test work for candidates (GH-7946)