]> granicus.if.org Git - python/log
python
7 years agoBuild docs in parallel (GH-1842) (GH-1871)
Mariatta [Tue, 30 May 2017 22:29:07 +0000 (15:29 -0700)]
Build docs in parallel (GH-1842) (GH-1871)

(cherry picked from commit eba68e2c42e149acecb15bbeb692786e2540157d)

7 years agobpo-30354: Update data model documentation for super() (GH-1561) (GH-1869)
csabella [Tue, 30 May 2017 20:47:47 +0000 (16:47 -0400)]
bpo-30354: Update data model documentation for super() (GH-1561) (GH-1869)

The data model section of the language reference was written well
before the zero-argument form of super() was added.

To avoid giving the impression that they're doing something
unusual, this updates the description of `__new__` and `__init__`
to use the zero-argument form.

Patch by Cheryl Sabella.
(cherry picked from commit 12b1c180986fc744331b8f30d3d2f49a0fdb43dd)

7 years ago[3.5] bpo-30361: Use better example for mixed-type operands (GH-1701) (#1857)
Mariatta [Mon, 29 May 2017 22:20:47 +0000 (15:20 -0700)]
[3.5] bpo-30361: Use better example for mixed-type operands (GH-1701) (#1857)

(cherry picked from commit e405d4b8dfb8b497e1c3d1f0f8e28030040c165e)

7 years ago[3.5] bpo-29960 _random.Random corrupted on exception in setstate(). … (#1288)
Mariatta [Sat, 27 May 2017 14:19:40 +0000 (07:19 -0700)]
[3.5] bpo-29960 _random.Random corrupted on exception in setstate(). … (#1288)

(cherry picked from commit 9616a82e7802241a4b74cf7ae38d43c37bf66e48)

7 years ago[3.5] bpo-30398: Add a docstring for re.error. (GH-1647) (#1831)
Serhiy Storchaka [Sat, 27 May 2017 13:38:12 +0000 (16:38 +0300)]
[3.5] bpo-30398: Add a docstring for re.error. (GH-1647) (#1831)

Also document that some attributes may be None.
(cherry picked from commit 12d6b5d)

7 years ago[3.5] Fix the signature of JSONDecodeError (no end parameter). (GH-1827) (#1829)
Serhiy Storchaka [Sat, 27 May 2017 13:37:25 +0000 (16:37 +0300)]
[3.5] Fix the signature of JSONDecodeError (no end parameter). (GH-1827) (#1829)

Unlikely to the simplejson module, json.JSONDecodeError doesn't accept the end argument.
(cherry picked from commit 5becf38)

7 years ago[3.5] bpo-30414: multiprocessing.Queue._feed do not break from main loop on exc ...
Antoine Pitrou [Thu, 25 May 2017 15:19:10 +0000 (17:19 +0200)]
[3.5] bpo-30414: multiprocessing.Queue._feed do not break from main loop on exc (GH-1683) (#1816)

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.
(cherry picked from commit bc50f03db4f58c869b78e98468e374d7e61f1227)

7 years ago[3.5] bpo-30160: Clarify intended usage of wfile (gh-1300) (GH-1792)
Zachary Ware [Wed, 24 May 2017 21:11:21 +0000 (16:11 -0500)]
[3.5] bpo-30160: Clarify intended usage of wfile (gh-1300) (GH-1792)

The library does not enforce compliance with the HTTP protocol,
so violations are not technically disallowed. Extend the stream's
description to avoid suggesting that intentional protocol violations are
not supported.
(cherry picked from commit a083c8e)

7 years agobpo-30394: Fix a socket leak in smtplib.SMTP.__init__() (#1700) (#1789)
Stéphane Wirtel [Wed, 24 May 2017 18:49:24 +0000 (20:49 +0200)]
bpo-30394: Fix a socket leak in smtplib.SMTP.__init__() (#1700) (#1789)

7 years ago[3.5] bpo-30376: Update outdated WindowObject references (GH-1630) (#1747)
Kushal Das [Tue, 23 May 2017 16:56:45 +0000 (09:56 -0700)]
[3.5] bpo-30376: Update outdated WindowObject references (GH-1630) (#1747)

(cherry picked from commit 93fc20b73eea3da0b6305aaee951e5dd22d5c408)

7 years ago[3.5] call remove_done_callback in finally section (GH-1688) (#1758)
Łukasz Langa [Tue, 23 May 2017 07:36:18 +0000 (00:36 -0700)]
[3.5] call remove_done_callback in finally section (GH-1688) (#1758)

(cherry picked from commit 21b3e04c13212b29e8c35ffc36eed8603fde08f4)

7 years agoFix spelling mistakes in tkinter.py (#1752)
Vijay Kumar [Tue, 23 May 2017 06:15:03 +0000 (11:45 +0530)]
Fix spelling mistakes in tkinter.py (#1752)

Ran the docstrings through spell checker, and fixed spelling issues.

7 years ago[3.5] bpo-21056: Document return type of next method of csv reader (GH-146) (#1750)
Mariatta [Tue, 23 May 2017 05:27:10 +0000 (22:27 -0700)]
[3.5] bpo-21056: Document return type of next method of csv reader (GH-146) (#1750)

(cherry picked from commit d618c8c6d31b9b288f8a070417683974eb98e3ba)

7 years ago[3.5] Fix typos in multiple `.rst` files (GH-1668) (#1706)
delirious-lettuce [Mon, 22 May 2017 17:16:32 +0000 (11:16 -0600)]
[3.5] Fix typos in multiple `.rst` files (GH-1668) (#1706)

7 years agobpo-30003: Fix handling escape characters in HZ codec (#1556) (#1718)
Xiang Zhang [Mon, 22 May 2017 17:02:33 +0000 (01:02 +0800)]
bpo-30003: Fix handling escape characters in HZ codec (#1556) (#1718)

7 years ago[3.5] bpo-30415: Add new tests for the fnmatch module. (GH-1684) (#1695)
Serhiy Storchaka [Sun, 21 May 2017 07:35:58 +0000 (10:35 +0300)]
[3.5] bpo-30415: Add new tests for the fnmatch module. (GH-1684) (#1695)

(cherry picked from commit 8175547)

7 years agobpo-29976: urllib.parse clarify '' in scheme values. (GH-984) (GH-1693)
Senthil Kumaran [Sun, 21 May 2017 06:22:55 +0000 (23:22 -0700)]
bpo-29976: urllib.parse clarify '' in scheme values. (GH-984) (GH-1693)

(cherry picked from commit 906f5330b9c9a74cad1cf27fddaf77e99dff9edd)

7 years ago[3.5] bpo-27945: Fixed various segfaults with dict. (GH-1657) (#1678)
Serhiy Storchaka [Sat, 20 May 2017 10:06:47 +0000 (13:06 +0300)]
[3.5] bpo-27945: Fixed various segfaults with dict. (GH-1657) (#1678)

Based on patches by Duane Griffin and Tim Mitchell.
(cherry picked from commit 753bca3934a7618a4fa96e107ad1c5c18633a683)

7 years ago[3.5] bpo-25794: Fix `type.__setattr__()` for non-interned attribute names. (GH-1652...
Serhiy Storchaka [Sat, 20 May 2017 07:23:58 +0000 (10:23 +0300)]
[3.5] bpo-25794: Fix `type.__setattr__()` for non-interned attribute names. (GH-1652) (#1674)

Based on patch by Eryk Sun.
(cherry picked from commit d896985bb2de49046f9b6879e906d1e4db255e23)

7 years agobpo-27103: regrtest disables -W if -R is used (#1660)
Victor Stinner [Fri, 19 May 2017 05:12:57 +0000 (22:12 -0700)]
bpo-27103: regrtest disables -W if -R is used (#1660)

Workaround for a regrtest bug.

7 years agobpo-30387: Fix warning in test_threading (#1634) (#1637)
Victor Stinner [Wed, 17 May 2017 21:49:43 +0000 (14:49 -0700)]
bpo-30387: Fix warning in test_threading (#1634) (#1637)

test_is_alive_after_fork() now joins directly the thread to avoid the
following warning added by bpo-30357:

Warning -- threading_cleanup() failed to cleanup 0 threads
after 2 sec (count: 0, dangling: 21)

Use also a different exit code to catch generic exit code 1.
(cherry picked from commit f8d05b3a24e745ab4a974b891ac1389e2f11ce4d)

7 years agobpo-30301: Fix AttributeError when using SimpleQueue.empty() (#1601) (#1627)
Xiang Zhang [Wed, 17 May 2017 14:02:55 +0000 (22:02 +0800)]
bpo-30301: Fix AttributeError when using SimpleQueue.empty() (#1601) (#1627)

Under *spawn* and *forkserver* start methods, SimpleQueue.empty() could
raise AttributeError due to not setting _poll in __setstate__.

7 years agobpo-30273: update distutils.sysconfig for venv's created from Python (#1515) (#1626)
Victor Stinner [Wed, 17 May 2017 00:59:24 +0000 (17:59 -0700)]
bpo-30273: update distutils.sysconfig for venv's created from Python (#1515) (#1626)

compiled out-of-tree (builddir != srcdir). (see also bpo-15366)
(cherry picked from commit dbdea629e2e0e4bd8845aa55041e0a0ca4172cf3)

7 years agobpo-30357: test_thread now uses threading_cleanup() (#1592) (#1623)
Victor Stinner [Wed, 17 May 2017 00:05:29 +0000 (17:05 -0700)]
bpo-30357: test_thread now uses threading_cleanup() (#1592) (#1623)

test_thread: setUp() now uses support.threading_setup() and
support.threading_cleanup() to wait until threads complete to avoid
random side effects on following tests.

Co-Authored-By: Grzegorz Grzywacz <grzegorz.grzywacz@nazwa.pl>
(cherry picked from commit 79ef7f8e88a4972c4aecf95cfc5cd934f1861e08)

7 years agobpo-30329: Catch Windows error 10022 on shutdown() (#1538) (#1621)
Victor Stinner [Tue, 16 May 2017 23:02:35 +0000 (16:02 -0700)]
bpo-30329: Catch Windows error 10022 on shutdown() (#1538) (#1621)

Catch the Windows socket WSAEINVAL error (code 10022) in imaplib and
poplib on shutdown(SHUT_RDWR): An invalid operation was attempted

This error occurs sometimes on SSL connections.
(cherry picked from commit 83a2c2879839da2e10037f5e4af1bd1dafbf1a52)

7 years agobpo-30380: Pin the version of Sphinx used to build the documentation (GH-1612) (GH...
Brett Cannon [Tue, 16 May 2017 21:40:33 +0000 (14:40 -0700)]
bpo-30380: Pin the version of Sphinx used to build the documentation (GH-1612) (GH-1618)

7 years ago[3.5] bpo-30380: Fix Sphinx 1.6.1 warnings. (GH-1613) (GH-1615)
Serhiy Storchaka [Tue, 16 May 2017 21:29:42 +0000 (00:29 +0300)]
[3.5] bpo-30380: Fix Sphinx 1.6.1 warnings. (GH-1613) (GH-1615)

7 years agoRemove unused variable in test_urllibnet. (#1598) (#1599)
Senthil Kumaran [Tue, 16 May 2017 15:36:38 +0000 (08:36 -0700)]
Remove unused variable in test_urllibnet. (#1598) (#1599)

(cherry picked from commit 1bd7d299bd2a91f8267f97a413568ab8fe7fdfbb)

7 years ago[3.5] bpo-30375: Correct the stacklevel of regex compiling warnings. (GH-1595) (...
Serhiy Storchaka [Tue, 16 May 2017 15:16:45 +0000 (18:16 +0300)]
[3.5] bpo-30375: Correct the stacklevel of regex compiling warnings. (GH-1595) (#1605)

Warnings emitted when compile a regular expression now always point
to the line in the user code.  Previously they could point into inners
of the re module if emitted from inside of groups or conditionals..
(cherry picked from commit c7ac7280c321b3c1679fe5f657a6be0f86adf173)

7 years ago bpo-29651 - Cover edge case of square brackets in urllib docs (#1128) (#1597)
Senthil Kumaran [Tue, 16 May 2017 05:41:03 +0000 (22:41 -0700)]
 bpo-29651 - Cover edge case of square brackets in urllib docs (#1128) (#1597)

(cherry picked from commit f6e863d868a621594df2a8abe072b5d4766e7137)

7 years agobpo-30242: resolve some undefined behaviours in struct (#1418) (#1587)
Xiang Zhang [Mon, 15 May 2017 05:17:41 +0000 (13:17 +0800)]
bpo-30242: resolve some undefined behaviours in struct (#1418) (#1587)

7 years agobpo-30110: fix resource leak in test_asyncio.test_events (#1413) (#1585)
Xiang Zhang [Mon, 15 May 2017 05:17:13 +0000 (13:17 +0800)]
bpo-30110: fix resource leak in test_asyncio.test_events (#1413) (#1585)

7 years agobpo-30358: Document sort argument of profile.runctx() (GH-1566)
Berker Peksag [Sun, 14 May 2017 15:31:32 +0000 (18:31 +0300)]
bpo-30358: Document sort argument of profile.runctx() (GH-1566)

(cherry picked from commit 99776296230ddd8429ebad2d07854b8c27ea10ab)

7 years ago[3.5] Move Codecov's configuration file under .github (GH-1494) (#1575)
Brett Cannon [Sat, 13 May 2017 20:56:13 +0000 (13:56 -0700)]
[3.5] Move Codecov's configuration file under .github (GH-1494) (#1575)

(cherry picked from commit cbddf58c797f850a5b06f317a4bb7ab69c6e9715)

7 years ago[3.5] bpo-30178: Indent methods and attributes of MimeType class (GH-1306) (#1571)
Mariatta [Sat, 13 May 2017 16:45:14 +0000 (09:45 -0700)]
[3.5] bpo-30178: Indent methods and attributes of MimeType class (GH-1306) (#1571)

(cherry picked from commit c71168090df435c1eb8c03005b11df764cd7ebd6)

7 years agobpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1547)
INADA Naoki [Fri, 12 May 2017 05:34:40 +0000 (14:34 +0900)]
bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1547)

* bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1097)

when there are no more `await` or `yield (from)` before return in coroutine,
cancel was ignored.

example:

    async def coro():
        asyncio.Task.current_task().cancel()
        return 42
    ...
    res = await coro()  # should raise CancelledError
(cherry picked from commit 991adca012f5e106c2d4040ce619c696ba6f9c46)

* fix test

7 years ago[3.5] bpo-30320, bpo-25277: backport test_eintr enhancements from master to 3.5 ...
Victor Stinner [Wed, 10 May 2017 12:13:37 +0000 (14:13 +0200)]
[3.5] bpo-30320, bpo-25277: backport test_eintr enhancements from master to 3.5 (#1532)

* bpo-30320: test_eintr now uses pthread_sigmask() (#1523)

Rewrite sigwaitinfo() and sigtimedwait() unit tests for EINTR using
pthread_sigmask() to fix a race condition between the child and the
parent process.

Remove the pipe which was used as a weak workaround against the race
condition.

sigtimedwait() is now tested with a child process sending a signal
instead of testing the timeout feature which is more unstable
(especially regarding to clock resolution depending on the platform).
(cherry picked from commit 211a392cc15f9a7b1b8ce65d8f6c9f8237d1b77f)

* test_eintr: Fix ResourceWarning warnings

(cherry picked from commit c50cccfcc3b3a9ef3fe7a78b7e7271930dc24aee)

* test_eintr: remove unused import

* bpo-25277: Add a watchdog to test_eintr

Set a timeout of 10 minutes in test_eintr using faulthandler.

7 years agobpo-30281: Fix the default value for stop in PySlice_Unpack() (#1530) (#1480)
Xiang Zhang [Wed, 10 May 2017 11:11:09 +0000 (19:11 +0800)]
bpo-30281: Fix the default value for stop in PySlice_Unpack() (#1530) (#1480)

7 years agotest_eintr: less verbose, the test is now stable (#1521)
Victor Stinner [Wed, 10 May 2017 00:38:09 +0000 (02:38 +0200)]
test_eintr: less verbose, the test is now stable (#1521)

Backport the change from the master branch.

7 years ago[3.5] bpo-29243: Fix Makefile with respect to --enable-optimizations (GH-1478) (...
torsava [Tue, 9 May 2017 15:12:35 +0000 (17:12 +0200)]
[3.5] bpo-29243: Fix Makefile with respect to --enable-optimizations (GH-1478) (#1520)

* bpo-29243: Fix Makefile with respect to --enable-optimizations

When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during `make` but rebuilt again during `make test`,
`make install` and others. This patch fixes the issue.

Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.

* !squash.
(cherry picked from commit a1054c3b0037d4c2a5492e79fc193f36245366c7)

7 years agobpo-29990: Fix range checking in GB18030 decoder (#1495) (#1508)
Xiang Zhang [Tue, 9 May 2017 04:17:09 +0000 (12:17 +0800)]
bpo-29990: Fix range checking in GB18030 decoder (#1495) (#1508)

When decoding a 4-byte GB18030 sequence, the first and third byte cannot exceed 0xFE.

7 years ago[3.5] Revert bpo-26293 for zipfile breakage. See also bpo-29094. (GH-1484). (#1486)
Serhiy Storchaka [Sat, 6 May 2017 12:11:20 +0000 (15:11 +0300)]
[3.5] Revert bpo-26293 for zipfile breakage. See also bpo-29094. (GH-1484). (#1486)

(cherry picked from commit 3763ea865cee5bbabcce11cd577811135e0fc747)

7 years agobpo-30264: ExpatParser closes the source on error (#1451) (#1475)
Victor Stinner [Fri, 5 May 2017 08:08:05 +0000 (10:08 +0200)]
bpo-30264: ExpatParser closes the source on error (#1451) (#1475)

ExpatParser.parse() of xml.sax.xmlreader now always closes the
source: close the file object or the urllib object if source is a
string (not an open file-like object). The change fixes a
ResourceWarning on parsing error.

Add test_parse_close_source() unit test.
(cherry picked from commit ef9c0e732fc50aefbdd7c5a80e04e14b31684e66)

7 years ago[3.5] bpo-30243: Fixed the possibility of a crash in _json. (GH-1420) (#1470)
Serhiy Storchaka [Fri, 5 May 2017 07:40:47 +0000 (10:40 +0300)]
[3.5] bpo-30243: Fixed the possibility of a crash in _json. (GH-1420) (#1470)

It was possible to get a core dump by using uninitialized
_json objects. Now __new__ methods create initialized objects.
__init__ methods are removed..
(cherry picked from commit 76a3e51a403bc84ed536921866c86dd7d07aaa7e)

7 years agobpo-23404: make touch becomes make regen-all (#1405) (#1461) (#1465)
Victor Stinner [Fri, 5 May 2017 00:19:59 +0000 (02:19 +0200)]
bpo-23404: make touch becomes make regen-all (#1405) (#1461) (#1465)

* bpo-23404: make touch becomes make regen-all (#1405)

Don't rebuild generated files based on file modification time
anymore, the action is now explicit. Replace "make touch"
with "make regen-all".

Changes:

* Remove "make touch", Tools/hg/hgtouch.py and .hgtouch
* Add a new "make regen-all" command to rebuild all generated files
* Add subcommands to only generate specific files:

  - regen-ast: Include/Python-ast.h and Python/Python-ast.c
  - regen-grammar: Include/graminit.h and Python/graminit.c
  - regen-importlib: Python/importlib_external.h and Python/importlib.h
  - regen-opcode: Include/opcode.h
  - regen-opcode-targets: Python/opcode_targets.h
  - regen-typeslots: Objects/typeslots.inc

* Rename PYTHON_FOR_GEN to PYTHON_FOR_REGEN
* pgen is now only built by by "make regen-grammar"
* Add $(srcdir)/ prefix to paths to source files to handle correctly
  compilation outside the source directory

Note: $(PYTHON_FOR_REGEN) is no more used nor needed by "make"
default target building Python.
(cherry picked from commit a5c62a8e9f0de6c4133825a5710984a3cd5e102b)

* bpo-30273: Update sysconfig (#1464)

The AST_H_DIR variable was removed from Makefile.pre.in by the commit
a5c62a8e9f0de6c4133825a5710984a3cd5e102b (bpo-23404).

AST_H_DIR was hardcoded to "Include", so replace the removed variable
by its content.

Remove also ASDLGEN variable from sysconfig example since this
variable was also removed.
(cherry picked from commit b109a1d3360fc4bb87b9887264e3634632d392ca)

(cherry picked from commit 9d02f562961efd12d3c8317a10916db7f77330cc)

7 years ago[3.5] bpo-30185: avoid KeyboardInterrupt tracebacks in forkserver (GH-1319) (#1455)
Antoine Pitrou [Thu, 4 May 2017 15:16:48 +0000 (17:16 +0200)]
[3.5] bpo-30185: avoid KeyboardInterrupt tracebacks in forkserver (GH-1319) (#1455)

* bpo-30185: avoid KeyboardInterrupt tracebacks in forkserver

* Tweak comment.
(cherry picked from commit 6dd4d734ed207ba16b017e38f8909de7ef187e29)

7 years agobpo-30225: Fix is_valid_fd() on macOS Tiger (#1443) (#1450)
Victor Stinner [Thu, 4 May 2017 11:21:16 +0000 (13:21 +0200)]
bpo-30225: Fix is_valid_fd() on macOS Tiger (#1443) (#1450)

is_valid_fd() now uses fstat() instead of dup() on macOS to return 0
on a pipe when the other side of the pipe is closed. fstat() fails
with EBADF in that case, whereas dup() succeed.
(cherry picked from commit 1c4670ea0cc3d208121af11b9b973e6bb268e570)

7 years ago[3.5] bpo-30184: Add tests for invalid use of PyArg_ParseTupleAndKeywords. (GH-1316...
Serhiy Storchaka [Thu, 4 May 2017 03:50:43 +0000 (06:50 +0300)]
[3.5] bpo-30184: Add tests for invalid use of PyArg_ParseTupleAndKeywords. (GH-1316). (#1442)

(cherry picked from commit 5f161fd86dd5bb936a1a2a13391b13b7e59ec201)

7 years ago[3.5] bpo-28315: Improve code examples in docs (GH-1372) (#1446)
Mariatta [Thu, 4 May 2017 01:41:12 +0000 (18:41 -0700)]
[3.5] bpo-28315: Improve code examples in docs (GH-1372) (#1446)

Replace
   File "<stdin>", line 1, in ?
with
   File "<stdin>", line 1, in <module>
(cherry picked from commit 8856940cf2e82cb17db2b684cd5732fe658605ca)

7 years ago[3.5] bpo-28556: Routine updates to typing (GH-1366) (#1417)
Mariatta [Wed, 3 May 2017 16:37:50 +0000 (09:37 -0700)]
[3.5] bpo-28556: Routine updates to typing (GH-1366) (#1417)

- Add NoReturn type
- Use WrapperDescriptorType (original PR by Jim Fasarakis-Hilliard)
- Minor bug-fixes
(cherry picked from commit f06e0218ef6007667f5d61184b85a81a0466d3ae)

7 years agobpo-24725: Skip the test_socket.testFDPassEmpty on OS X (#1427)
Victor Stinner [Wed, 3 May 2017 12:11:35 +0000 (14:11 +0200)]
bpo-24725: Skip the test_socket.testFDPassEmpty on OS X (#1427)

In OS X 10.11, the test fails consistently due to a platform change
since 10.10. Thanks to Jeff Ramnani for the patch.

(cherry picked from commit 3c61a448f106c7cafb050ff7be5c5c421273e68f)

7 years ago[3.6] bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS (#463)...
Victor Stinner [Wed, 3 May 2017 10:04:57 +0000 (12:04 +0200)]
[3.6] bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS (#463) (#1424)

Skip some tests of select.poll when running on macOS due to unresolved
issues with the underlying system poll function on some macOS versions.

(cherry picked from commit de04644627f82d9dc48b3423def7ff5b4aa1926a)
(cherry picked from commit 1d391f926b37484b8d4b326003a72c0084db19ec)

7 years ago[3.5] Fix typo in selectors.rst (GH-1383) (#1415)
Mariatta [Wed, 3 May 2017 04:36:01 +0000 (21:36 -0700)]
[3.5] Fix typo in selectors.rst (GH-1383) (#1415)

decriptor -> descriptor
(cherry picked from commit b0d82036549074357717d130a772d1e2ebc8ea01)

7 years agoregrtest: always show before/after of modified env (#1407)
Victor Stinner [Wed, 3 May 2017 00:12:34 +0000 (02:12 +0200)]
regrtest: always show before/after of modified env (#1407)

Buildbots don't run tests with -vv and so only log "xxx was modified
by test_xxx" which is not enough to debug such random issue. In many
cases, I'm unable to reproduce the warning and so unable to fix it.

Always logging the value before and value after should help to debug
such warning on buildbots.
(cherry picked from commit ec4b17239d899550be4ee6104b61751bb3c70382)

7 years agoBackport bpo-30205 to 3.5 (#1404)
Antoine Pitrou [Tue, 2 May 2017 22:22:28 +0000 (00:22 +0200)]
Backport bpo-30205 to 3.5 (#1404)

7 years ago[3.5] bpo-30232: Support Git worktree in configure.ac (#1398) (#1401)
Victor Stinner [Tue, 2 May 2017 22:06:17 +0000 (00:06 +0200)]
[3.5] bpo-30232: Support Git worktree in configure.ac (#1398) (#1401)

* bpo-30232: Support Git worktree in configure.ac (#1391)

Don't test if .git/HEAD file exists, but only if the .git file (or
directory) exists.
(cherry picked from commit 5facdbb29169c2799c42f887cef4cd9d087b0167)

* bpo-30232: Regenerate configure (#1396)

Run autoconf.
(cherry picked from commit 9ed34a89532763cf89f5e11fffb91ef7dee29fed)

(cherry picked from commit 4dae0d111dd7bb34ec730eea2327a3219acff211)

7 years agoIssue 27372: Stop test_idle from changing locale, so test passes. (#1397)
Victor Stinner [Tue, 2 May 2017 21:06:39 +0000 (23:06 +0200)]
Issue 27372: Stop test_idle from changing locale, so test passes. (#1397)

In 3.6, the warning is now called an error, making it harder to ignore.

(cherry picked from commit 7c1534141d3a159a32db9742e1d201d5c7a9ba81)

7 years agobpo-30199: test_ssl closes all asyncore channels (#1381) (#1389)
Victor Stinner [Tue, 2 May 2017 14:48:36 +0000 (16:48 +0200)]
bpo-30199: test_ssl closes all asyncore channels (#1381) (#1389)

AsyncoreEchoServer of test_ssl now calls
asyncore.close_all(ignore_all=True) to ensure that
asyncore.socket_map is cleared once the test completes, even if
ConnectionHandler was not correctly unregistered.

Fix the following warning:

Warning -- asyncore.socket_map was modified by test_ssl
  Before: {}
  After:  {6: <test.test_ssl.AsyncoreEchoServer.EchoServer.ConnectionHandler>}
(cherry picked from commit 1dae7450c68bad498e57800387b24cb103c461fa)

7 years agobpo-30132: distutils BuildExtTestCase use temp_cwd (#1387) (#1388)
Victor Stinner [Tue, 2 May 2017 14:26:04 +0000 (16:26 +0200)]
bpo-30132: distutils BuildExtTestCase use temp_cwd (#1387) (#1388)

BuildExtTestCase of test_distutils now uses support.temp_cwd() in
setUp() to remove files created in the current working in all
BuildExtTestCase unit tests, not only test_build_ext().

Fix the following warning:

Warning -- files was modified by test_distutils
  Before: []
  After:  ['vc140.pdb']
(cherry picked from commit 30768958490c658fba0fe24f1cabbdad44be22ff)

7 years agobpo-30108: Restore sys.path in test_site (#1197) (#1379)
Victor Stinner [Tue, 2 May 2017 09:45:45 +0000 (11:45 +0200)]
bpo-30108: Restore sys.path in test_site (#1197) (#1379)

Add setUpModule() and tearDownModule() functions to test_site to
save/restore sys.path at the module level to prevent warning if the
user site directory is created, since site.addsitedir() modifies
sys.path.
(cherry picked from commit b85c136903c6d2368162f7c4a58f258c9c69ead0)

7 years agobpo-30104: Use -fno-strict-aliasing on clang (#1376) (#1377)
Victor Stinner [Tue, 2 May 2017 09:16:21 +0000 (11:16 +0200)]
bpo-30104: Use -fno-strict-aliasing on clang (#1376) (#1377)

Python/dtoa.c is not compiled correctly with clang 4.0 and
optimization level -O2 or higher, because of an aliasing issue on the
double/ULong[2] union. Only compile dtoa.c with -fno-strict-aliasing.

LLVM bug report:
https://bugs.llvm.org//show_bug.cgi?id=31928
(cherry picked from commit 809101f14f27ddb394cd77c477470761ecf99f41)

7 years ago[3.5] Improve the grammar in windows.rst (GH-1330) (GH-1359)
Mariatta [Sun, 30 Apr 2017 05:18:51 +0000 (22:18 -0700)]
[3.5] Improve the grammar in windows.rst (GH-1330) (GH-1359)

(cherry picked from commit 80a3da4d4aad0b51893e1e2f696b6252eca80e07)

7 years ago[3.5] bpo-30208: DOC: fix small typos in IDLE (#1357)
csabella [Sun, 30 Apr 2017 00:43:11 +0000 (20:43 -0400)]
[3.5] bpo-30208: DOC: fix small typos in IDLE (#1357)

(cherry picked from commit d9af73330f46d79cc0c56d369f65ebeec3cb5334)

7 years ago[3.5] bpo-30197: Enhance functions swap_attr() and swap_item() in test.support. ...
Serhiy Storchaka [Fri, 28 Apr 2017 17:05:53 +0000 (20:05 +0300)]
[3.5] bpo-30197: Enhance functions swap_attr() and swap_item() in test.support. (#1341) (#1346)

They now work when delete replaced attribute or item inside the with
statement.  The old value of the attribute or item (or None if it doesn't
exist) now will be assigned to the target of the "as" clause, if there is
one.

(cherry picked from commit d1a1def7bf221b04dcf3fc3a67aa19aa2f622f83)

7 years ago[3.5] bpo-30107: don't dump core on expected test_io crash (#1235) (#1344)
Victor Stinner [Fri, 28 Apr 2017 14:59:44 +0000 (16:59 +0200)]
[3.5] bpo-30107: don't dump core on expected test_io crash (#1235) (#1344)

* bpo-30107: Make SuppressCrashReport quiet on macOS (#1279) (#1335)

On macOS, SuppressCrashReport now redirects /usr/bin/defaults command
stderr into a pipe to not pollute stderr. It fixes a
test_io.test_daemon_threads_shutdown_stderr_deadlock() failure when
the CrashReporter domain doesn't exists. Message logged into stderr:

2017-04-24 16:57:21.432 defaults[41046:2462851]
The domain/default pair of (com.apple.CrashReporter, DialogType) does not exist
(cherry picked from commit d819ad9832292d854e9710493ecdf959b69802e3)

* bpo-30107: don't dump core on expected test_io crash (#1235)

test_io has two unit tests which trigger a deadlock:

* test_daemon_threads_shutdown_stdout_deadlock()
* test_daemon_threads_shutdown_stderr_deadlock()

These tests call Py_FatalError() if the expected bug is triggered
which calls abort(). Use test.support.SuppressCrashReport to prevent
the creation on a core dump, to fix the warning:

Warning -- files was modified by test_io
  Before: []
  After:  ['python.core']

7 years agobpo-30131: test_logging now joins queue threads (#1298) (#1318)
Victor Stinner [Fri, 28 Apr 2017 02:27:11 +0000 (04:27 +0200)]
bpo-30131: test_logging now joins queue threads (#1298) (#1318)

QueueListenerTest of test_logging now closes the multiprocessing
Queue and joins its thread to prevent leaking dangling threads to
following tests.

Add also @support.reap_threads to detect earlier if a test leaks
threads (and try to "cleanup" these threads).
(cherry picked from commit 8ca2f2faefa8dba323a2e4c4b86efb633d7a53cf)

7 years agobpo-30175: Skip client cert tests of test_imaplib (#1320) (#1324)
Victor Stinner [Thu, 27 Apr 2017 19:32:09 +0000 (21:32 +0200)]
bpo-30175: Skip client cert tests of test_imaplib (#1320) (#1324)

* bpo-30175: Skip client cert tests of test_imaplib

The IMAP server cyrus.andrew.cmu.edu doesn't accept our randomly
generated client x509 certificate anymore.

* bpo-30188: Catch EOFError in NetworkedNNTPTests

test_nntplib fails randomly with EOFError in
NetworkedNNTPTests.setUpClass(). Catch EOFError to skip tests in that
case.

(cherry picked from commit 5bccca58b9b2b3a925b16750bedbd907695ea8d7)

7 years ago[3.5] bpo-30182: Use the correct name for ISO in Unicode HOWTO. (GH-1312) (GH-1314)
Mariatta [Thu, 27 Apr 2017 05:19:09 +0000 (22:19 -0700)]
[3.5] bpo-30182: Use the correct name for ISO in Unicode HOWTO. (GH-1312) (GH-1314)

(cherry picked from commit 6fde770e4e940c19cd62de0b6aeb77840690843e)

7 years ago[3.5] bpo-30142: Remove "callable" from the 2to3fixer documentation. (GH-1304)
Dong-hee Na [Wed, 26 Apr 2017 16:55:21 +0000 (01:55 +0900)]
[3.5] bpo-30142: Remove "callable" from the 2to3fixer documentation. (GH-1304)

7 years agobpo-29974: Improve typing.TYPE_CHECKING example (GH-982)
Berker Peksag [Wed, 26 Apr 2017 14:24:35 +0000 (17:24 +0300)]
bpo-29974: Improve typing.TYPE_CHECKING example (GH-982)

* Fix PEP 8 (SomeType instead of some_type)
* Add a function parameter annotation
* Explain, using wording from PEP 484 and PEP 526,
  why one annotation is in quotes and another is not.

Suggested by Ivan Levkevskyi.

(cherry picked from commit 87c07fe9d908d0a2143fcc8369255c6ff3241503)

7 years agobpo-28698: Fix c_wchar_p doc example (GH-1160)
Louie Lu [Wed, 26 Apr 2017 08:47:03 +0000 (16:47 +0800)]
bpo-28698: Fix c_wchar_p doc example (GH-1160)

(cherry picked from commit 0d637e236d7099f7b724026c8cb7bd83d8e12e6b)

7 years ago[3.5] bpo-29751: Improve PyLong_FromString documentation (GH-915) (#1267)
Mariatta [Mon, 24 Apr 2017 04:02:30 +0000 (21:02 -0700)]
[3.5] bpo-29751: Improve PyLong_FromString documentation (GH-915) (#1267)

(cherry picked from commit 26896f2832324dde85cdd63d525571ca669f6f0b)

7 years ago[3.5] bpo-15718: Document the upper bound constrain on the __len__ return value....
Serhiy Storchaka [Sun, 23 Apr 2017 05:50:20 +0000 (08:50 +0300)]
[3.5] bpo-15718: Document the upper bound constrain on the __len__ return value. (GH-1256) (#1260)

(cherry picked from commit 85157cd)

7 years ago[3.5] Fix trailing colon and newline in test.rst (GH-1250) (#1255)
Louie Lu [Sat, 22 Apr 2017 11:49:40 +0000 (19:49 +0800)]
[3.5] Fix trailing colon and newline in test.rst (GH-1250) (#1255)

(cherry picked from commit 7fae81e1672d0b4110d31ea6a765b54f63a2e54b)

7 years agobpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future (GH-1170...
Mariatta [Sat, 22 Apr 2017 02:58:01 +0000 (19:58 -0700)]
bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future   (GH-1170) (#1246)

(cherry picked from commit ae5b3260dd459845aad8a30491b76d471577785d)

7 years ago[3.5] bpo-29802: Fix the cleaning up issue in PyUnicode_FSDecoder(). (GH-1217) (...
Serhiy Storchaka [Fri, 21 Apr 2017 07:55:54 +0000 (10:55 +0300)]
[3.5] bpo-29802: Fix the cleaning up issue in PyUnicode_FSDecoder(). (GH-1217) (#1219)

(cherry picked from commit 7a113a0)

7 years ago[3.5] Add missing .gitignore entries for VS2015 IntelliSense DB (GH-1223) (#1226)
Mariatta [Fri, 21 Apr 2017 03:56:03 +0000 (20:56 -0700)]
[3.5] Add missing .gitignore entries for VS2015 IntelliSense DB (GH-1223) (#1226)

(cherry picked from commit 8e675286a92f33837cfffac5914b5175dac5d573)

7 years ago[3.5] bpo-30109: Fix reindent.py (GH-1207) (GH-1209)
Mariatta [Thu, 20 Apr 2017 14:12:50 +0000 (07:12 -0700)]
[3.5] bpo-30109: Fix reindent.py (GH-1207) (GH-1209)

Skip the file if it has bad encoding.
(cherry picked from commit 58f3c9dc8f5626abe09ac9738c34f6ba99ce2972)

7 years agoRemove redundant comma in argparse HOWTO (GH-1141)
Berker Peksag [Thu, 20 Apr 2017 04:40:05 +0000 (07:40 +0300)]
Remove redundant comma in argparse HOWTO (GH-1141)

Reported by Sean Canavan on docs@p.o.

(cherry picked from commit 8526fb74edf5ac9ca175b7cdcb0d82bb8780d2cf)

7 years agobpo-30078: Add an example of passing a path to unittest (GH-1178)
Berker Peksag [Thu, 20 Apr 2017 04:37:18 +0000 (07:37 +0300)]
bpo-30078: Add an example of passing a path to unittest (GH-1178)

(cherry picked from commit f7e62cf8adfb8ab6a6a870903defe8ff218a0383)

7 years agobpo-19225: Remove duplicated description for standard warning categories (GH-1068)
cocoatomo [Thu, 20 Apr 2017 03:56:05 +0000 (12:56 +0900)]
bpo-19225: Remove duplicated description for standard warning categories (GH-1068)

7 years ago[3.5] bpo-30065: Fixed arguments validation in _posixsubprocess.fork_exec(). (GH...
Serhiy Storchaka [Wed, 19 Apr 2017 21:51:05 +0000 (00:51 +0300)]
[3.5] bpo-30065: Fixed arguments validation in _posixsubprocess.fork_exec(). (GH-1110) (#1190)

(cherry picked from commit 66bffd1)

7 years ago[3.5] bpo-30070: Fixed leaks and crashes in errors handling in the parser module...
Serhiy Storchaka [Wed, 19 Apr 2017 20:44:43 +0000 (23:44 +0300)]
[3.5] bpo-30070: Fixed leaks and crashes in errors handling in the parser module. (GH-1131). (#1185)

(cherry picked from commit a79f4c219531c05fc8f670c1e4bbf12c081935d3)

7 years ago[3.5] bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() (GH...
Serhiy Storchaka [Wed, 19 Apr 2017 19:09:56 +0000 (22:09 +0300)]
[3.5] bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() (GH-1096) (GH-1180) (#1182)

raised an error.

(cherry picked from commit bf623ae8843dc30b28c574bec8d29fc14be59d86)
(cherry picked from commit 680fea4067537a9b9c79aadd44a3a19e83cd2dbf)

7 years ago[3.5] bpo-29943: Do not replace the function PySlice_GetIndicesEx() with a macro...
Serhiy Storchaka [Sun, 16 Apr 2017 09:03:51 +0000 (12:03 +0300)]
[3.5] bpo-29943: Do not replace the function PySlice_GetIndicesEx() with a macro (#1049)

if Py_LIMITED_API is not defined.

7 years agobpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is present ...
Xiang Zhang [Sat, 15 Apr 2017 05:28:08 +0000 (13:28 +0800)]
bpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is present (#1130) (#1151)

7 years ago[3.5] bpo-30059: Include Py_Ellipsis in C API documentation (GH-1018) (GH-1148)
Michael Seifert [Sat, 15 Apr 2017 02:05:00 +0000 (04:05 +0200)]
[3.5] bpo-30059: Include Py_Ellipsis in C API documentation (GH-1018) (GH-1148)

7 years ago[3.5] bpo-29738: Fix memory leak in _get_crl_dp (GH-526) (GH-1143)
Mariatta [Sat, 15 Apr 2017 01:36:11 +0000 (18:36 -0700)]
[3.5] bpo-29738: Fix memory leak in _get_crl_dp (GH-526) (GH-1143)

* Remove conditional on free of `dps`, since `dps` is now allocated for
all versions of OpenSSL
* Remove call to `x509_check_ca` since it was only used to cache
the `crldp` field of the certificate
CRL_DIST_POINTS_free is available in all supported versions of OpenSSL
(recent 0.9.8+) and LibreSSL.
(cherry picked from commit 2849cc34a8db93d448a62d69c462402347b50dcb)

7 years agoFix misplaced positional argument in OS X support library (#1135)
Jack McCracken [Fri, 14 Apr 2017 14:45:17 +0000 (10:45 -0400)]
Fix misplaced positional argument in OS X support library (#1135)

7 years agoRelax test timing (bpo-29861) to avoid sporadic failures (#1120) (#1133)
Antoine Pitrou [Fri, 14 Apr 2017 11:45:27 +0000 (13:45 +0200)]
Relax test timing (bpo-29861) to avoid sporadic failures (#1120) (#1133)

(cherry picked from commit 685cdb9acc3fca04a9897d88b89771ddfd50e772)

7 years ago[3.5] bpo-29694: race condition in pathlib mkdir with flags parents=True (GH-1089...
Mariatta [Fri, 14 Apr 2017 02:26:24 +0000 (19:26 -0700)]
[3.5] bpo-29694: race condition in pathlib mkdir with flags parents=True (GH-1089). (GH-1127)

(cherry picked from commit 22a594a0047d7706537ff2ac676cdc0f1dcb329c)

7 years ago[3.5] Fix a typo in Doc/library/functions.rst (GH-1117) (GH-1124)
Mariatta [Thu, 13 Apr 2017 23:38:17 +0000 (16:38 -0700)]
[3.5] Fix a typo in Doc/library/functions.rst (GH-1117) (GH-1124)

Replace `For object's ... ` with `For objects ...`
(cherry picked from commit 873ef20d0007b4b120933473e6252d2309a70102)

7 years agobpo-30021: Add examples for re.escape(). (#1048) (#1116)
Serhiy Storchaka [Thu, 13 Apr 2017 16:41:26 +0000 (19:41 +0300)]
bpo-30021: Add examples for re.escape(). (#1048) (#1116)

And fix the parameter name.

(cherry picked from commit 8fc7bc2b7631ee819ee614e47b6f44bacebe1574)

7 years agobpo-29791: Clarify that flush is keyword-only argument (GH-1093)
Berker Peksag [Thu, 13 Apr 2017 13:16:30 +0000 (16:16 +0300)]
bpo-29791: Clarify that flush is keyword-only argument (GH-1093)

Reported by Lucio Ricardo Montero Valenzuela.

(cherry picked from commit 61b9ac93712df8092a25223cd56fa6528359792b)

7 years ago[3.5] bpo-29692: contextlib.contextmanager may incorrectly unchain RuntimeError ...
Mariatta [Thu, 13 Apr 2017 10:14:53 +0000 (03:14 -0700)]
[3.5] bpo-29692: contextlib.contextmanager may incorrectly unchain RuntimeError (GH-949) (#1107)

contextlib._GeneratorContextManager.__exit__ includes a special case to deal with
PEP 479 RuntimeErrors created when `StopIteration` is thrown into the context
manager body.

Previously this check was too permissive, and undid one level of chaining on *all*
RuntimeError instances, not just those that wrapped a StopIteration instance.
(cherry picked from commit 00c75e9a45ff0366c185e9e8a2e23af5a35481b0)

7 years ago[3.5] Clarify exception handler scope in contextlib (GH-1104)
Mariatta [Thu, 13 Apr 2017 04:05:25 +0000 (21:05 -0700)]
[3.5] Clarify exception handler scope in contextlib (GH-1104)

Moved explicit raise from inside try to try...else.
(cherry picked from commit 680e20beee8bbce9f857b8e7795009191f98b0ba)

7 years ago[3.5] Remove superfluous comment in urllib.error. (GH-1076) (GH-1102)
Mariatta [Thu, 13 Apr 2017 03:46:07 +0000 (20:46 -0700)]
[3.5] Remove superfluous comment in urllib.error. (GH-1076) (GH-1102)

(cherry picked from commit 6fab78e9027f9ebd6414995580781b480433e595)

7 years agobpo-26985: Add missing info of code object in inspect documentation (GH-1090) (GH...
Xiang Zhang [Thu, 13 Apr 2017 03:37:38 +0000 (11:37 +0800)]
bpo-26985: Add missing info of code object in inspect documentation (GH-1090) (GH-1100)

7 years agoRemove OSError related comment in urllib.request. (#1071)
Senthil Kumaran [Mon, 10 Apr 2017 03:38:00 +0000 (20:38 -0700)]
Remove OSError related comment in urllib.request. (#1071)

(cherry picked from commit 6dfcc81f6b1c82a71a1c876e14424fb8b3573447)

7 years ago[3.5] Correct typo in configparser.rst (GH-1012) (GH-1027)
Mariatta [Sun, 9 Apr 2017 22:16:14 +0000 (15:16 -0700)]
[3.5] Correct typo in configparser.rst (GH-1012) (GH-1027)

(cherry picked from commit 01fa9ae5460b00bf1ced500c797176ebd3fb060d)