]> granicus.if.org Git - python/log
python
7 years agoFix a memory leak in _msi.c (GH-4127) (#4308)
Miss Islington (bot) [Tue, 7 Nov 2017 10:33:41 +0000 (02:33 -0800)]
Fix a memory leak in _msi.c (GH-4127) (#4308)

(cherry picked from commit cb04f7518292108d68e5ba4c685ca2bf2da18eab)

7 years agoFix bpo-27666 backporting error in _cursesmodule.c (#4305)
Serhiy Storchaka [Tue, 7 Nov 2017 07:55:33 +0000 (09:55 +0200)]
Fix bpo-27666 backporting error in _cursesmodule.c (#4305)

7 years agobpo-31770: Prevent a crash and refleaks when calling sqlite3.Cursor.__init__() more...
Miss Islington (bot) [Tue, 7 Nov 2017 00:44:19 +0000 (16:44 -0800)]
bpo-31770: Prevent a crash and refleaks when calling sqlite3.Cursor.__init__() more than once (GH-3968) (#4302)

(cherry picked from commit e56ab746a965277ffcc4396d8a0902b6e072d049)

7 years ago[2.7] bpo-31271: Fix an assertion failure in io.TextIOWrapper.write. (GH-3201) (...
Oren Milman [Tue, 7 Nov 2017 00:17:54 +0000 (02:17 +0200)]
[2.7] bpo-31271: Fix an assertion failure in io.TextIOWrapper.write. (GH-3201) (#3951)

7 years agobpo-31923: Fix spelling in sqlite3 docs (GH-4227)
Miss Islington (bot) [Sat, 4 Nov 2017 23:11:25 +0000 (16:11 -0700)]
bpo-31923: Fix spelling in sqlite3 docs (GH-4227)

(cherry picked from commit aafece7a9e010075fff4420cfbb16f1ec0342698)

7 years ago[2.7] bpo-18699: Corrected documentation for window.chgat in curses module (GH-1430...
Serhiy Storchaka [Sat, 4 Nov 2017 08:42:56 +0000 (10:42 +0200)]
[2.7] bpo-18699: Corrected documentation for window.chgat in curses module (GH-1430). (#4272)

(cherry picked from commit b838cc3ff4e039af949c6a19bd896e98e944dcbe)

7 years ago[2.7] bpo-9678: Fix determining the MAC address in the uuid module. (GH-4264) (#4270)
Serhiy Storchaka [Sat, 4 Nov 2017 08:23:09 +0000 (10:23 +0200)]
[2.7] bpo-9678: Fix determining the MAC address in the uuid module. (GH-4264) (#4270)

* Using ifconfig on NetBSD and OpenBSD.
* Using arp on Linux, FreeBSD, NetBSD and OpenBSD.

Based on patch by Takayuki Shimizukawa..
(cherry picked from commit ee1a9a2b78d5b6bb1a8148fc5fcf365e6d4e9e67)

7 years agobpo-31924: Fix test_curses on NetBSD 8. (GH-4228) (#4260)
Miss Islington (bot) [Fri, 3 Nov 2017 20:11:12 +0000 (13:11 -0700)]
bpo-31924: Fix test_curses on NetBSD 8. (GH-4228) (#4260)

(cherry picked from commit a7723d8b09f516a2b75837a3527b8cc7bee89fad)

7 years ago[2.7] bpo-30057: Fix potential missed signal in signal.signal(). (GH-4258) (#4263)
Antoine Pitrou [Fri, 3 Nov 2017 19:36:39 +0000 (20:36 +0100)]
[2.7] bpo-30057: Fix potential missed signal in signal.signal(). (GH-4258) (#4263)

Bug report and patch by Jeroen Demeyer..
(cherry picked from commit f6f90ff079a22b79a58d47b6117cc8a8c7d366f3)

7 years agobpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse(). (GH-4220...
Miss Islington (bot) [Wed, 1 Nov 2017 19:24:00 +0000 (12:24 -0700)]
bpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse(). (GH-4220) (#4222)

(cherry picked from commit 4f469c096628af730b17798d0ebfd8925bfde836)

7 years agobpo-31893: Fix a backporting error in 8cbf4e10646c3f5b8f0d274c2d7dea5bb6305f57. ...
Serhiy Storchaka [Wed, 1 Nov 2017 15:43:07 +0000 (17:43 +0200)]
bpo-31893: Fix a backporting error in 8cbf4e10646c3f5b8f0d274c2d7dea5bb6305f57. (#4219)

7 years agobpo-31919: Fix building the curses module on OpenIndiana. (GH-4211) (#4216)
Miss Islington (bot) [Wed, 1 Nov 2017 13:11:18 +0000 (06:11 -0700)]
bpo-31919: Fix building the curses module on OpenIndiana. (GH-4211) (#4216)

(cherry picked from commit 894ebd065e02debf20c0657d26020ecc42b7534f)

7 years agoFix test_socket.test_create_connection() (GH-4206) (#4209)
Miss Islington (bot) [Wed, 1 Nov 2017 13:08:40 +0000 (06:08 -0700)]
Fix test_socket.test_create_connection() (GH-4206) (#4209)

bpo-31910: test_create_connection() now catchs also EADDRNOTAVAIL to
fix the test on Travis CI.
(cherry picked from commit 280c22a82a6756e9caffef031c564fd98f1b50e7)

7 years agobpo-25720: Fix the method for checking pad state of curses WINDOW (GH-4164) (#4213)
Miss Islington (bot) [Wed, 1 Nov 2017 12:36:48 +0000 (05:36 -0700)]
bpo-25720: Fix the method for checking pad state of curses WINDOW (GH-4164) (#4213)

Modify the code to use ncurses is_pad() instead of checking WINDOW
_flags field.  If your platform does not provide the is_pad(), the
existing way that checks the field will be enabled.

Note: This change does not drop support for platforms where do not
have both WINDOW _flags field and is_pad().
(cherry picked from commit 8bc7d63560024681dce9f40445f2877b2987e92c)

7 years agobpo-31893: Fix errors in b9052a0f91d2e83bbc27267247a5920c82b242a3. (GH-4196) (#4202)
Miss Islington (bot) [Tue, 31 Oct 2017 18:16:11 +0000 (11:16 -0700)]
bpo-31893: Fix errors in b9052a0f91d2e83bbc27267247a5920c82b242a3. (GH-4196) (#4202)

* Fix a compilation error on FreeBSD.
* Fix the data attribute size on Mac OS X.
(cherry picked from commit 2298fad5ff907dd48ea0fb5c71fa22334ef28c6b)

7 years agobpo-20064: Document PyObject_Malloc() (#4204)
Victor Stinner [Tue, 31 Oct 2017 17:08:28 +0000 (10:08 -0700)]
bpo-20064: Document PyObject_Malloc() (#4204)

Document the following functions:

* PyObject_Malloc()
* PyObject_Realloc()
* PyObject_Free()

Document also the pymalloc allocator.

7 years ago[2.7] bpo-31893: Fixed select.kqueue(). (GH-4166) (#4193)
Serhiy Storchaka [Tue, 31 Oct 2017 14:13:52 +0000 (16:13 +0200)]
[2.7] bpo-31893: Fixed select.kqueue(). (GH-4166) (#4193)

* Fixed the layout of the kqueue_event structure on OpenBSD and NetBSD.
* Fixed the comparison of the kqueue_event objects..
(cherry picked from commit b9052a0f91d2e83bbc27267247a5920c82b242a3)

7 years ago[2.7] bpo-31891: Fix building the curses module on NetBSD. (GH-4165). (#4194)
Serhiy Storchaka [Tue, 31 Oct 2017 14:12:35 +0000 (16:12 +0200)]
[2.7] bpo-31891: Fix building the curses module on NetBSD. (GH-4165). (#4194)

(cherry picked from commit baac01e629d90f63dfde6b5cc433f4bc65c5feeb)

7 years agobpo-31629: Add support.SaveSignals (#4183) (#4188)
Victor Stinner [Tue, 31 Oct 2017 10:44:55 +0000 (03:44 -0700)]
bpo-31629: Add support.SaveSignals (#4183) (#4188)

test_curses now saves/restores signals. On FreeBSD, the curses module
sets handlers of some signals, but don't restore old handlers when
the module is deinitialized.

(cherry picked from commit 19f68301a1295a9c30d9f28b8f1479cdcccd75aa)

7 years ago[2.7] bpo-20047: Make bytearray methods partition() and rpartition() rejecting (GH...
Serhiy Storchaka [Sun, 29 Oct 2017 10:25:38 +0000 (12:25 +0200)]
[2.7] bpo-20047: Make bytearray methods partition() and rpartition() rejecting (GH-4158) (#4163)

separators that are not bytes-like objects..
(cherry picked from commit a2314283ff87c65e1745a42c2f2b716b1a209128)

7 years agobpo-30855: Fix winfo_id related Tkinter test on Windows. (#4121)
Serhiy Storchaka [Wed, 25 Oct 2017 21:28:02 +0000 (00:28 +0300)]
bpo-30855: Fix winfo_id related Tkinter test on Windows. (#4121)

7 years agofix marshal uninitialized variable warnings (#4114)
Benjamin Peterson [Wed, 25 Oct 2017 06:09:55 +0000 (23:09 -0700)]
fix marshal uninitialized variable warnings (#4114)

GCC says:
../cpython/Python/marshal.c: In function ‘PyMarshal_WriteLongToFile’:
../cpython/Python/marshal.c:70:35: warning: ‘wf.ptr’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                       else if ((p)->ptr != (p)->end) *(p)->ptr++ = (c); \
                                   ^~
../cpython/Python/marshal.c:70:47: warning: ‘wf.end’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                       else if ((p)->ptr != (p)->end) *(p)->ptr++ = (c); \
                                               ^~
../cpython/Python/marshal.c:77:10: warning: ‘wf.str’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (p->str == NULL)
         ~^~~~~

This isn't a real problem because if the file pointer is not NULL, the
string-related fields are never touched. But, it doesn't hurt to set the unused
fields to NULL.

7 years ago[2.7] bpo-25287: Backport new tests for crypt and skip test_crypt on OpenBSD. (GH...
Serhiy Storchaka [Tue, 24 Oct 2017 20:35:22 +0000 (23:35 +0300)]
[2.7] bpo-25287: Backport new tests for crypt and skip test_crypt on OpenBSD. (GH-4111). (#4112)

(cherry picked from commit f52dff611cff2fb9e90340b4787eda50ab2d40c6)

7 years ago[2.7] bpo-31667: Fix gettext related links. (GH-3860) (#4100)
Serhiy Storchaka [Tue, 24 Oct 2017 07:59:17 +0000 (10:59 +0300)]
[2.7] bpo-31667: Fix gettext related links. (GH-3860) (#4100)

* Fix incorrect links.
* Remove redundant links.
* Add signatures and index entries for gettext related
functions in the locale module.
(cherry picked from commit c02a1f4ad8fcdbffad2911c5a31c71a17a89d713)

7 years ago[2.7] bpo-31752: Fix possible crash in timedelta constructor called with custom integ...
Serhiy Storchaka [Mon, 23 Oct 2017 16:57:04 +0000 (19:57 +0300)]
[2.7] bpo-31752: Fix possible crash in timedelta constructor called with custom integers. (GH-3947) (#4088)

Bad remainder in divmod() in intermediate calculations caused an assertion failure..
(cherry picked from commit 4ffd4653a7ec9c97775472276cf5e159e2366bb2)

7 years ago[2.7] bpo-28286: Add tests for the mode argument of GzipFile. (GH-4074). (#4077)
Serhiy Storchaka [Sun, 22 Oct 2017 11:54:05 +0000 (14:54 +0300)]
[2.7] bpo-28286: Add tests for the mode argument of GzipFile. (GH-4074). (#4077)

(cherry picked from commit bcbdd2f8db396c3f0ec9186162b39b5a34effa0e)

7 years agoFix py3k warnings in 1/0 in tests. (#4072)
Serhiy Storchaka [Sun, 22 Oct 2017 09:15:41 +0000 (12:15 +0300)]
Fix py3k warnings in 1/0 in tests. (#4072)

7 years agoUpdate TestCase.assertAlmostEqual and assertNotAlmostEqual docstrings. (GH-3998)...
Miss Islington (bot) [Wed, 18 Oct 2017 17:30:05 +0000 (10:30 -0700)]
Update TestCase.assertAlmostEqual and assertNotAlmostEqual docstrings. (GH-3998) (GH-4040)

The word "difference" from missing the sentence.
This clarifies that it compares the difference between the two objects.
(cherry picked from commit 032a6480e360427d4f964e31643604fad804ea14)

7 years ago[2.7] bpo-31334: Fix timeout in select.poll.poll() (GH-3277) (#4034)
Riccardo Coccioli [Wed, 18 Oct 2017 12:04:04 +0000 (14:04 +0200)]
[2.7] bpo-31334: Fix timeout in select.poll.poll() (GH-3277) (#4034)

Always pass -1, or INFTIM where defined, to the poll() system call when
a negative timeout is passed to the poll.poll([timeout]) method in the
select module. Various OSes throw an error with arbitrary negative
values..
(cherry picked from commit 6cfa927ceb931ad968b5b03e4a2bffb64a8a0604)

7 years ago[2.7] bpo-31786: Make functions in the select module blocking when timeout is a small...
Serhiy Storchaka [Wed, 18 Oct 2017 08:28:35 +0000 (11:28 +0300)]
[2.7] bpo-31786: Make functions in the select module blocking when timeout is a small negative value. (GH-4003). (#4031)

(cherry picked from commit 2c15b29aea5d6b9c61aa42d2c24a07ff1edb4b46)

7 years ago[2.7] bpo-31733, bpo-31692: Document 2 new env vars in What's New in Python 2.7 ...
Victor Stinner [Tue, 17 Oct 2017 20:13:13 +0000 (13:13 -0700)]
[2.7] bpo-31733, bpo-31692: Document 2 new env vars in What's New in Python 2.7 (GH-4019)

bpo-31733, bpo-31692: Document the new PYTHONSHOWREFCOUNT and
PYTHONSHOWALLOCCOUNT environment variables.

7 years ago[2.7] bpo-31692: Add PYTHONSHOWALLOCCOUNT env var (GH-3927)
Victor Stinner [Tue, 17 Oct 2017 09:25:23 +0000 (02:25 -0700)]
[2.7] bpo-31692: Add PYTHONSHOWALLOCCOUNT env var (GH-3927)

bpo-31692, bpo-19527:

* Add a new PYTHONSHOWALLOCCOUNT environment variable, similar to
  the Python 3 "-X showalloccount" option
* When Python is compiled with COUNT_ALLOCS, the new
  PYTHONSHOWALLOCCOUNT environment variable now has to be set to dump
  allocation counts into stderr on shutdown. Moreover, allocations
  statistics are now dumped into stderr rather than stdout.
* Add @test.support.requires_type_collecting decorator: skip test if
  COUNT_ALLOCS is defined
* Fix tests for COUNT_ALLOCS: decorate some methods with
  @requires_type_collecting
* test_sys.test_objecttypes(): update object type when COUNT_ALLOCS
  is defined

7 years agobpo-31733: Add PYTHONSHOWREFCOUNT env var (GH-3932)
Victor Stinner [Tue, 17 Oct 2017 08:35:19 +0000 (01:35 -0700)]
bpo-31733: Add PYTHONSHOWREFCOUNT env var (GH-3932)

Add a new PYTHONSHOWREFCOUNT environment variable. In debug mode,
Python now only print the total reference count if PYTHONSHOWREFCOUNT
is set.

7 years ago[2.7] bpo-31754: Fix type of 'itemsize' in PyBuffer_FillContiguousStrides (GH-3993)
vyas45 [Mon, 16 Oct 2017 18:23:43 +0000 (11:23 -0700)]
[2.7] bpo-31754: Fix type of 'itemsize' in PyBuffer_FillContiguousStrides (GH-3993)

7 years ago[2.7] bpo-30058: Fixed buffer overflow in select.kqueue.control(). (GH-1095). (#3976)
Serhiy Storchaka [Thu, 12 Oct 2017 21:13:11 +0000 (00:13 +0300)]
[2.7] bpo-30058: Fixed buffer overflow in select.kqueue.control(). (GH-1095). (#3976)

(cherry picked from commit de072100775cc29e6cd93a75466cecbd1086f258)

7 years agobpo-31766: restore 3.5 to docs version switchers (#3971)
Ned Deily [Thu, 12 Oct 2017 18:24:23 +0000 (14:24 -0400)]
bpo-31766: restore 3.5 to docs version switchers (#3971)

7 years ago[2.7] bpo-31490: Fix an assertion failure in ctypes in case an _anonymous_ attr is...
Oren Milman [Thu, 12 Oct 2017 14:39:01 +0000 (17:39 +0300)]
[2.7] bpo-31490: Fix an assertion failure in ctypes in case an _anonymous_ attr is defined only outside _fields_. (GH-3615) (#3952)

7 years ago[2.7] bpo-31728: Prevent crashes in _elementtree due to unsafe cleanup of Element...
Oren Milman [Wed, 11 Oct 2017 13:29:12 +0000 (16:29 +0300)]
[2.7] bpo-31728: Prevent crashes in _elementtree due to unsafe cleanup of Element.text and Element.tail (GH-3924) (#3950)

7 years agobpo-31681: Make sure pkgutil.get_data closes files properly (#3875)
Elvis Pranskevichus [Mon, 9 Oct 2017 14:55:54 +0000 (10:55 -0400)]
bpo-31681: Make sure pkgutil.get_data closes files properly (#3875)

Also remove an obsolete note about
backward compat with old Pythons.

7 years agobpo-31719: Fix test_regrtest.test_crashed() on s390x (#3912)
Victor Stinner [Mon, 9 Oct 2017 07:52:06 +0000 (00:52 -0700)]
bpo-31719: Fix test_regrtest.test_crashed() on s390x (#3912)

Add a new _testcapi._read_null() function to crash Python in a
reliable way on s390x.

On s390x, ctypes.string_at(0) returns an empty string rather than
crashing.

7 years agobpo-31720: msilib documentation, change MsiError into MSIError (GH-3914) (GH-3916)
Miss Islington (bot) [Sat, 7 Oct 2017 16:00:42 +0000 (09:00 -0700)]
bpo-31720: msilib documentation, change MsiError into MSIError (GH-3914) (GH-3916)

(cherry picked from commit 28f713601d3ec80820e842dcb25a234093f1ff18)

7 years agobpo-31507: Add docstring to parseaddr function in email.utils.parseaddr (GH-3647...
Rohit Balasubramanian [Sat, 7 Oct 2017 05:29:54 +0000 (10:59 +0530)]
bpo-31507: Add docstring to parseaddr function in email.utils.parseaddr (GH-3647) (GH-3735)

(cherry picked from commit 9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2)

7 years ago[2.7] remove tabs from getcompiler.c (GH-3892) (#3894)
Miss Islington (bot) [Thu, 5 Oct 2017 15:41:31 +0000 (08:41 -0700)]
[2.7] remove tabs from getcompiler.c (GH-3892) (#3894)

(cherry picked from commit a8ed11742b4c2115597977ce04fa8e043d9e0792)

7 years ago[2.7] bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (GH...
Serhiy Storchaka [Wed, 4 Oct 2017 18:37:53 +0000 (21:37 +0300)]
[2.7] bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (GH-3866) (#3876)

when pass a string larger than 2 GiB.

Decrease memory requirements for Tcl's bigmem tests..
(cherry picked from commit 27c623c845dd6e4b8e1782666ca3a956636da266)

7 years agoRemove retired and security branches from active docs (#3881)
Ned Deily [Wed, 4 Oct 2017 03:06:13 +0000 (23:06 -0400)]
Remove retired and security branches from active docs (#3881)

7 years ago[2.7] bpo-31478: Prevent unwanted behavior in _random.Random.seed() in case the arg...
Oren Milman [Mon, 2 Oct 2017 21:31:42 +0000 (00:31 +0300)]
[2.7] bpo-31478: Prevent unwanted behavior in _random.Random.seed() in case the arg has a bad __abs__() method (GH-3596) (#3845)

7 years agobpo-31158: Fix nondeterministic read in test_pty (#3808) (#3853)
Victor Stinner [Mon, 2 Oct 2017 09:58:09 +0000 (02:58 -0700)]
bpo-31158: Fix nondeterministic read in test_pty (#3808) (#3853)

(cherry picked from commit e6f62f69f07892b993910ff03c9db3ffa5cb9ca5)

7 years ago[2.7] bpo-31627: Make test_mailbox be lenient to empty hostname. (GH-3821) (#3838)
Serhiy Storchaka [Sat, 30 Sep 2017 19:52:25 +0000 (22:52 +0300)]
[2.7] bpo-31627: Make test_mailbox be lenient to empty hostname. (GH-3821) (#3838)

(cherry picked from commit f4ea642cb60556231e714089a79d3c59c202661e)

7 years ago[2.7] bpo-31285: Don't raise a SystemError in warnings.warn_explicit() in case __load...
Oren Milman [Sat, 30 Sep 2017 14:06:55 +0000 (17:06 +0300)]
[2.7] bpo-31285: Don't raise a SystemError in warnings.warn_explicit() in case __loader__.get_source() has a bad splitlines() method. (GH-3219) (#3823)

(cherry picked from commit 91fb0af)

7 years agobpo-28129: fix ctypes crashes (#386) (#3800)
Victor Stinner [Thu, 28 Sep 2017 14:31:40 +0000 (07:31 -0700)]
bpo-28129: fix ctypes crashes (#386) (#3800)

* init commit, with initial tests for from_param and fields __set__ and __get__, and some additions to from_buffer and from_buffer_copy

* added the rest of tests and patches. probably only a first draft.

* removed trailing spaces

* replace ctype with ctypes in error messages

* change back from ctypes instance to ctype instance

(cherry picked from commit 1bea762d9ec823544c530d567330a47f64d93d4f)

7 years agobpo-31593: test_socketserver waits child processes (#3786)
Victor Stinner [Wed, 27 Sep 2017 10:02:57 +0000 (03:02 -0700)]
bpo-31593: test_socketserver waits child processes (#3786)

7 years ago[2.7] bpo-31490: Fix an assertion failure in ctypes in case an _anonymous_ attr is...
Miss Islington (bot) [Wed, 27 Sep 2017 06:52:44 +0000 (23:52 -0700)]
[2.7] bpo-31490: Fix an assertion failure in ctypes in case an _anonymous_ attr is defined only outside _fields_. (GH-3615) (#3780)

(cherry picked from commit 30b61b51e05d2d43e8e2e783b0a9df738535423b)

7 years ago[2.7] bpo-31311: Fix a SystemError and a crash in ctypes._CData.__setstate__(), in...
Serhiy Storchaka [Wed, 27 Sep 2017 06:24:39 +0000 (09:24 +0300)]
[2.7] bpo-31311: Fix a SystemError and a crash in ctypes._CData.__setstate__(), in case of a bad __dict__. (GH-3254). (#3781)

(cherry picked from commit 57c2561c8c5663aef55b00e3f29cba575ff36ccd)

7 years ago[2.7] bpo-25359: Add missed "goto error" after setting an exception. (GH-3712) (...
Serhiy Storchaka [Wed, 27 Sep 2017 05:44:03 +0000 (08:44 +0300)]
[2.7] bpo-25359: Add missed "goto error" after setting an exception. (GH-3712) (#3779)

(cherry picked from commit d6238a76c655e0feb13478505220dc9049f1682f)

7 years ago[2.7] bpo-30347: Stop crashes when concurrently iterate over itertools.groupby()...
Serhiy Storchaka [Tue, 26 Sep 2017 20:15:36 +0000 (23:15 +0300)]
[2.7] bpo-30347: Stop crashes when concurrently iterate over itertools.groupby() iterators. (GH-1557). (#3772)

(cherry picked from commit c740e4fe8a9bc5815dc18c38d7f7600b128c3c51)

7 years ago[2.7] bpo-31579: Fixed a possible leak in enumerate() with large indices. (GH-3753...
Serhiy Storchaka [Tue, 26 Sep 2017 06:11:27 +0000 (09:11 +0300)]
[2.7] bpo-31579: Fixed a possible leak in enumerate() with large indices. (GH-3753). (#3761)

(cherry picked from commit 0e950dd22b075b4809c84afda8aede02b76ac0fa)

7 years agobpo-25732: Make functools.total_ordering implementing __ne__. (#3748)
Serhiy Storchaka [Mon, 25 Sep 2017 11:41:34 +0000 (14:41 +0300)]
bpo-25732: Make functools.total_ordering implementing __ne__. (#3748)

Patch by Raymond Hettinger.

7 years agobpo-31170: Write unit test for Expat 2.2.4 UTF-8 bug (#3570) (#3745)
Victor Stinner [Mon, 25 Sep 2017 08:43:56 +0000 (01:43 -0700)]
bpo-31170: Write unit test for Expat 2.2.4 UTF-8 bug (#3570) (#3745)

Non-regression tests for the Expat 2.2.3 UTF-8 decoder bug.

(cherry picked from commit e6d9fcbb8d0c325e57df08ae8781aafedb71eca2)

7 years ago[2.7] bpo-31351: Set return code in ensurepip when pip fails (GH-3734)
Igor Filatov [Mon, 25 Sep 2017 01:03:24 +0000 (04:03 +0300)]
[2.7] bpo-31351: Set return code in ensurepip when pip fails (GH-3734)

Previously ensurepip would always report success, even if the
pip installation failed.

(cherry picked from commit 9adda0cdf89432386b7a04444a6199b580d287a1)

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)