Yury Selivanov [Thu, 15 Dec 2016 23:58:35 +0000 (18:58 -0500)]
Merge 3.6
Yury Selivanov [Thu, 15 Dec 2016 23:58:19 +0000 (18:58 -0500)]
docs: asyncio is no longer provisional
Yury Selivanov [Thu, 15 Dec 2016 22:57:55 +0000 (17:57 -0500)]
Merge 3.6 (issue #28635)
Yury Selivanov [Thu, 15 Dec 2016 22:56:43 +0000 (17:56 -0500)]
Issue #28635: asyncio-related fixes and additions.
Yury Selivanov [Thu, 15 Dec 2016 22:36:37 +0000 (17:36 -0500)]
Merge 3.6 (issue #28091)
Yury Selivanov [Thu, 15 Dec 2016 22:36:05 +0000 (17:36 -0500)]
Issue #28091: Document PEP 525 & PEP 530.
Patch by Eric Appelt.
Xavier de Gaye [Thu, 15 Dec 2016 20:01:52 +0000 (21:01 +0100)]
Merge 3.6.
Xavier de Gaye [Thu, 15 Dec 2016 19:59:58 +0000 (20:59 +0100)]
Issue #26919: On Android, operating system data is now always encoded/decoded
to/from UTF-8, instead of the locale encoding to avoid inconsistencies with
os.fsencode() and os.fsdecode() which are already using UTF-8.
Victor Stinner [Thu, 15 Dec 2016 16:23:24 +0000 (17:23 +0100)]
Merge 3.6
Victor Stinner [Thu, 15 Dec 2016 16:21:23 +0000 (17:21 +0100)]
Fix a memory leak in split-table dictionaries
Issue #28147: Fix a memory leak in split-table dictionaries: setattr() must not
convert combined table into split table.
Patch written by INADA Naoki.
Victor Stinner [Thu, 15 Dec 2016 15:59:40 +0000 (16:59 +0100)]
Use _PyDict_NewPresized() in _PyStack_AsDict()
Issue #27810.
Victor Stinner [Thu, 15 Dec 2016 15:22:19 +0000 (16:22 +0100)]
Merge 3.6
Victor Stinner [Thu, 15 Dec 2016 15:20:53 +0000 (16:20 +0100)]
Issue #28979: Fix What's New in Python 3.6, dict
The new dict implementation is not faster, but more compact.
Patch written by Brendan Donegan.
Victor Stinner [Thu, 15 Dec 2016 11:40:53 +0000 (12:40 +0100)]
Add _PY_FASTCALL_SMALL_STACK constant
Issue #28870: Add a new _PY_FASTCALL_SMALL_STACK constant, size of "small
stacks" allocated on the C stack to pass positional arguments to
_PyObject_FastCall().
_PyObject_Call_Prepend() now uses a small stack of 5 arguments (40 bytes)
instead of 8 (64 bytes), since it is modified to use _PY_FASTCALL_SMALL_STACK.
Victor Stinner [Thu, 15 Dec 2016 11:36:50 +0000 (12:36 +0100)]
Fix _PyObject_CallFunctionVa(), use the small stack
Issue #28915. Oops, I disabled the small stack to test both code paths. It's
now fixed.
Xiang Zhang [Thu, 15 Dec 2016 09:05:04 +0000 (17:05 +0800)]
Issue #28930: Merge from 3.6.
Xiang Zhang [Thu, 15 Dec 2016 08:41:12 +0000 (16:41 +0800)]
Issue #28930: Add a Makefile rule for bytes_methods.c.
Add a dependency to stringlib to make sure that bytes_methods.c is
recompiled if stringlib is modified.
Victor Stinner [Thu, 15 Dec 2016 08:14:25 +0000 (09:14 +0100)]
Issue #28838: Cleanup abstract.h
Rewrite all comments to use the same style than other Python header files:
comment functions *before* their declaration, no newline between the comment
and the declaration.
Reformat some comments, add newlines, to make them easier to read.
Quote argument like 'arg' to mention an argument in a comment.
Victor Stinner [Thu, 15 Dec 2016 08:06:45 +0000 (09:06 +0100)]
Null merge 3.6
Victor Stinner [Thu, 15 Dec 2016 08:05:11 +0000 (09:05 +0100)]
_asyncio uses _PyObject_CallMethodIdObjArgs()
Issue #28920: Replace _PyObject_CallMethodId(obj, meth, "O", arg) with
_PyObject_CallMethodIdObjArgs(obj, meth, arg, NULL) to avoid
_PyObject_CallMethodId() special case when arg is a tuple.
If arg is a tuple, _PyObject_CallMethodId() unpacks the tuple: obj.meth(*arg).
Berker Peksag [Thu, 15 Dec 2016 02:38:46 +0000 (05:38 +0300)]
Issue #28944: Merge from 3.6
Berker Peksag [Thu, 15 Dec 2016 02:38:25 +0000 (05:38 +0300)]
Issue #28944: Merge from 3.5
Berker Peksag [Thu, 15 Dec 2016 02:37:56 +0000 (05:37 +0300)]
Issue #28944: Fix footnote numbering
Berker Peksag [Thu, 15 Dec 2016 02:21:44 +0000 (05:21 +0300)]
Issue #28919: Simplify _copy_func_details() in unittest.mock
Patch by Jiajun Huang.
Xavier de Gaye [Wed, 14 Dec 2016 19:37:53 +0000 (20:37 +0100)]
Issue #28849: Merge 3.6.
Xavier de Gaye [Wed, 14 Dec 2016 19:37:10 +0000 (20:37 +0100)]
Issue #28849: Skip test_sysconfig.test_triplet_in_ext_suffix on non linux platforms.
Steve Dower [Wed, 14 Dec 2016 19:22:14 +0000 (11:22 -0800)]
Fixes maximum usable length of buffer for formatting time zone in localtime().
Steve Dower [Wed, 14 Dec 2016 19:22:05 +0000 (11:22 -0800)]
Fixes maximum usable length of buffer for formatting time zone in localtime().
Serhiy Storchaka [Wed, 14 Dec 2016 17:56:53 +0000 (19:56 +0200)]
Merge from 3.6.
Serhiy Storchaka [Wed, 14 Dec 2016 17:54:38 +0000 (19:54 +0200)]
Merge from 3.6.
Serhiy Storchaka [Wed, 14 Dec 2016 17:52:17 +0000 (19:52 +0200)]
Revert changeset
1f31bf3f76f5 (issue5322) except tests.
Xavier de Gaye [Wed, 14 Dec 2016 10:54:49 +0000 (11:54 +0100)]
Issue #28683: Merge 3.6.
Xavier de Gaye [Wed, 14 Dec 2016 10:52:28 +0000 (11:52 +0100)]
Issue #28683: Fix the tests that bind() a unix socket and raise PermissionError
on Android for a non-root user.
Xavier de Gaye [Wed, 14 Dec 2016 10:16:06 +0000 (11:16 +0100)]
Issue #20211: Merge 3.6.
Xavier de Gaye [Wed, 14 Dec 2016 10:14:33 +0000 (11:14 +0100)]
Issue #20211: Do not add the directory for installing C header files and
the directory for installing object code libraries to the cross compilation
search paths.
Yury Selivanov [Wed, 14 Dec 2016 00:03:51 +0000 (19:03 -0500)]
Issue #26110: Add LOAD_METHOD/CALL_METHOD opcodes.
Special thanks to INADA Naoki for pushing the patch through
the last mile, Serhiy Storchaka for reviewing the code, and to
Victor Stinner for suggesting the idea (originally implemented
in the PyPy project).
Steve Dower [Tue, 13 Dec 2016 17:06:55 +0000 (09:06 -0800)]
Issue #26071: Fixes preprocessor definition and rebuilds wininst-14.0[-amd64].exe
Steve Dower [Tue, 13 Dec 2016 17:06:42 +0000 (09:06 -0800)]
Issue #26071: Fixes preprocessor definition and rebuilds wininst-14.0[-amd64].exe
Steve Dower [Tue, 13 Dec 2016 17:06:24 +0000 (09:06 -0800)]
Issue #26071: Fixes preprocessor definition and rebuilds wininst-14.0[-amd64].exe
Xavier de Gaye [Tue, 13 Dec 2016 15:32:21 +0000 (16:32 +0100)]
Issue #16255: subrocess.Popen uses /system/bin/sh on Android as the shell,
instead of /bin/sh.
Xavier de Gaye [Tue, 13 Dec 2016 15:05:15 +0000 (16:05 +0100)]
Issue #28190: Merge 3.6.
Xavier de Gaye [Tue, 13 Dec 2016 15:04:14 +0000 (16:04 +0100)]
Issue #28190: Cross compiling the _curses module does not use anymore
/usr/include/ncursesw as a headers search path.
Xavier de Gaye [Tue, 13 Dec 2016 09:03:34 +0000 (10:03 +0100)]
Issue #28759: Merge 3.6.
Xavier de Gaye [Tue, 13 Dec 2016 09:00:01 +0000 (10:00 +0100)]
Issue #28759: Fix the tests that fail with PermissionError when run as
a non-root user on Android where access rights are controled by SELinux MAC.
Xavier de Gaye [Tue, 13 Dec 2016 08:22:01 +0000 (09:22 +0100)]
Issue #26936: Fix the test_socket failures on Android - getservbyname(),
getservbyport() and getaddrinfo() are broken on some Android API levels.
Xavier de Gaye [Tue, 13 Dec 2016 08:12:49 +0000 (09:12 +0100)]
Issue #26856: Merge 3.6.
Xavier de Gaye [Tue, 13 Dec 2016 08:11:38 +0000 (09:11 +0100)]
Issue #26856: Fix the tests assuming that the pwd module has getpwall() and
assuming some invariants about uids that are not valid for Android.
Yury Selivanov [Mon, 12 Dec 2016 21:45:21 +0000 (16:45 -0500)]
Merge 3.6 (issue #28089)
Yury Selivanov [Mon, 12 Dec 2016 21:44:58 +0000 (16:44 -0500)]
Issue #28089: Document TCP_NODELAY in asyncio
Initial patch by Mariatta Wijaya.
Steve Dower [Mon, 12 Dec 2016 19:19:03 +0000 (11:19 -0800)]
Issue #28896: Disable WindowsRegistryFinder by default.
Steve Dower [Mon, 12 Dec 2016 19:17:59 +0000 (11:17 -0800)]
Issue #28896: Disable WindowsRegistryFinder by default.
Xavier de Gaye [Mon, 12 Dec 2016 08:56:55 +0000 (09:56 +0100)]
Issue #28764: Merge 3.6.
Xavier de Gaye [Mon, 12 Dec 2016 08:55:57 +0000 (09:55 +0100)]
Issue #28764: Fix a test_mailbox failure on Android API 24 when run as a non-root user.
Steve Dower [Sun, 11 Dec 2016 22:48:44 +0000 (14:48 -0800)]
Issue #28783: Replaces bdist_wininst in nuget packages with stub
Steve Dower [Sun, 11 Dec 2016 22:48:32 +0000 (14:48 -0800)]
Issue #28783: Replaces bdist_wininst in nuget packages with stub
Steve Dower [Sun, 11 Dec 2016 22:35:07 +0000 (14:35 -0800)]
Issue #28783: Replaces bdist_wininst in nuget packages with stub
Serhiy Storchaka [Sun, 11 Dec 2016 17:39:36 +0000 (19:39 +0200)]
Issue #28739: f-string expressions no longer accepted as docstrings and
by ast.literal_eval() even if they do not include subexpressions.
Serhiy Storchaka [Sun, 11 Dec 2016 17:37:19 +0000 (19:37 +0200)]
Issue #28739: f-string expressions no longer accepted as docstrings and
by ast.literal_eval() even if they do not include subexpressions.
Serhiy Storchaka [Sun, 11 Dec 2016 12:44:21 +0000 (14:44 +0200)]
Issue #28512: Fixed setting the offset attribute of SyntaxError by
PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
Serhiy Storchaka [Sun, 11 Dec 2016 12:43:18 +0000 (14:43 +0200)]
Issue #28512: Fixed setting the offset attribute of SyntaxError by
PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
Serhiy Storchaka [Sun, 11 Dec 2016 12:39:01 +0000 (14:39 +0200)]
Issue #28512: Fixed setting the offset attribute of SyntaxError by
PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
Martin Panter [Sun, 11 Dec 2016 03:17:06 +0000 (03:17 +0000)]
Issues #28916, #26483: Merge stdtypes.rst from 3.6
Martin Panter [Sun, 11 Dec 2016 02:31:32 +0000 (02:31 +0000)]
Issues #28916, #26483: Merge stdtypes.rst from 3.5
Martin Panter [Sun, 11 Dec 2016 01:08:25 +0000 (01:08 +0000)]
Issue #26483: Clarify str.isdecimal() and isdigit()
Patch by Julien Palard.
Martin Panter [Sun, 11 Dec 2016 01:07:29 +0000 (01:07 +0000)]
Issue #28916: Correct description of %o and %x alternative forms
* In Python 3, the specifier is 0o
* There is no special case for leading zeros
* Remove duplicate tests
* Clarify other existing tests and comments
Brett Cannon [Sat, 10 Dec 2016 22:15:22 +0000 (14:15 -0800)]
Merge for issue #28424
Brett Cannon [Sat, 10 Dec 2016 22:14:47 +0000 (14:14 -0800)]
Merge for issue #28424
Brett Cannon [Sat, 10 Dec 2016 22:13:38 +0000 (14:13 -0800)]
Issue #28424: Document pkgutil.get_data() doesn't work with namespace packages.
Thanks to Douglas Greiman for the patch.
Xavier de Gaye [Sat, 10 Dec 2016 16:34:46 +0000 (17:34 +0100)]
Issue #28849: Merge 3.6.
Xavier de Gaye [Sat, 10 Dec 2016 16:31:28 +0000 (17:31 +0100)]
Issue #28849: Do not define sys.implementation._multiarch on Android.
Antoine Pitrou [Sat, 10 Dec 2016 16:19:21 +0000 (17:19 +0100)]
Issue #28779: multiprocessing.set_forkserver_preload() would crash the forkserver process if a preloaded module instantiated some multiprocessing objects such as locks.
Antoine Pitrou [Sat, 10 Dec 2016 16:16:17 +0000 (17:16 +0100)]
Issue #28779: multiprocessing.set_forkserver_preload() would crash the forkserver process if a preloaded module instantiated some multiprocessing objects such as locks.
Antoine Pitrou [Sat, 10 Dec 2016 16:13:16 +0000 (17:13 +0100)]
Issue #28779: multiprocessing.set_forkserver_preload() would crash the forkserver process if a preloaded module instantiated some multiprocessing objects such as locks.
Xavier de Gaye [Sat, 10 Dec 2016 15:48:07 +0000 (16:48 +0100)]
Issue #28918: Merge 3.6.
Xavier de Gaye [Sat, 10 Dec 2016 15:45:53 +0000 (16:45 +0100)]
Issue #28918: Fix the cross compilation of xxlimited when Python
has been built with Py_DEBUG defined.
Martin Panter [Sat, 10 Dec 2016 05:57:49 +0000 (05:57 +0000)]
Issue #28771: Merge C API doc fix from 3.6
Martin Panter [Sat, 10 Dec 2016 05:57:38 +0000 (05:57 +0000)]
Issue #28771: Merge C API doc fix from 3.5
Martin Panter [Sat, 10 Dec 2016 05:56:13 +0000 (05:56 +0000)]
Issue #28771: Update tp_get/setattr signature documentation
Martin Panter [Sat, 10 Dec 2016 05:39:12 +0000 (05:39 +0000)]
Issue #28820: Merge typo fixes from 3.6
Martin Panter [Sat, 10 Dec 2016 05:32:55 +0000 (05:32 +0000)]
Fix typos in comment and documentation
Martin Panter [Sat, 10 Dec 2016 05:38:25 +0000 (05:38 +0000)]
Issue #28820: Merge spelling fixes from 3.5
Martin Panter [Sat, 10 Dec 2016 05:12:56 +0000 (05:12 +0000)]
Issue #28820: Fix spelling of “practice” as a noun
Martin Panter [Sat, 10 Dec 2016 04:22:27 +0000 (04:22 +0000)]
Issue #28755: Merge Arg Clinic howto from 3.6
Martin Panter [Sat, 10 Dec 2016 04:14:02 +0000 (04:14 +0000)]
Issues #28755, #28753: Merge Arg Clinic howto from 3.5
Martin Panter [Sat, 10 Dec 2016 04:10:45 +0000 (04:10 +0000)]
Issue #28755: Improve syntax highlighting in Arg Clinic howto
Martin Panter [Sat, 10 Dec 2016 03:49:12 +0000 (03:49 +0000)]
Issue 28753: Argument Clinic howto docfix, courtesy Julien Palard.
Victor Stinner [Fri, 9 Dec 2016 17:51:13 +0000 (18:51 +0100)]
Backed out changeset
99c34e47348b
The change broke test_gdb.
Victor Stinner [Fri, 9 Dec 2016 17:08:18 +0000 (18:08 +0100)]
Issue #20185: Convert _warnings.warn() to Argument Clinic
Fix warn_explicit(): interpret source=None as source=NULL.
Victor Stinner [Fri, 9 Dec 2016 16:12:17 +0000 (17:12 +0100)]
Inline PyEval_EvalFrameEx() in callers
The PEP 523 modified PyEval_EvalFrameEx(): it's now an indirection to
interp->eval_frame().
Inline the call in performance critical code. Leave PyEval_EvalFrame()
unchanged, this function is only kept for backward compatibility.
Victor Stinner [Fri, 9 Dec 2016 16:08:59 +0000 (17:08 +0100)]
Remove useless variable initialization
Don't initialize variables which are not used before they are assigned.
Victor Stinner [Fri, 9 Dec 2016 16:06:43 +0000 (17:06 +0100)]
Initialize variables to fix compiler warnings
Warnings seen on the "AMD64 Debian PGO 3.x" buildbot. Warnings are false
positive, but variable initialization should not harm performances.
Victor Stinner [Fri, 9 Dec 2016 15:22:32 +0000 (16:22 +0100)]
Use PyObject_CallFunctionObjArgs()
Issue #28915: Replace PyObject_CallFunction() with
PyObject_CallFunctionObjArgs() when the format string was only made of "O"
formats, PyObject* arguments.
PyObject_CallFunctionObjArgs() avoids the creation of a temporary tuple and
doesn't have to parse a format string.
Victor Stinner [Fri, 9 Dec 2016 15:09:30 +0000 (16:09 +0100)]
Use _PyObject_CallMethodIdObjArgs()
Issue #28915: Replace _PyObject_CallMethodId() with
_PyObject_CallMethodIdObjArgs() in various modules when the format string was
only made of "O" formats, PyObject* arguments.
_PyObject_CallMethodIdObjArgs() avoids the creation of a temporary tuple and
doesn't have to parse a format string.
Victor Stinner [Fri, 9 Dec 2016 14:39:28 +0000 (15:39 +0100)]
Use _PyObject_CallMethodIdObjArgs() in _io
Issue #28915: Replace _PyObject_CallMethodId() with
_PyObject_CallMethodIdObjArgs() when the format string was only made of "O"
formats, PyObject* arguments.
_PyObject_CallMethodIdObjArgs() avoids the creation of a temporary tuple and
doesn't have to parse a format string.
Victor Stinner [Fri, 9 Dec 2016 14:24:31 +0000 (15:24 +0100)]
Use _PyObject_CallMethodIdObjArgs() in _datetime
Issue #28915: Replace _PyObject_CallMethodId() with
_PyObject_CallMethodIdObjArgs() when the format string was only made of "O"
formats, PyObject* arguments.
_PyObject_CallMethodIdObjArgs() avoids the creation of a temporary tuple and
doesn't have to parse a format string.
Victor Stinner [Fri, 9 Dec 2016 14:26:00 +0000 (15:26 +0100)]
Use _PyObject_CallMethodIdObjArgs() in _elementtree
Issue #28915: Replace _PyObject_CallMethodId() with
_PyObject_CallMethodIdObjArgs() when the format string was only made of "O"
formats, PyObject* arguments.
_PyObject_CallMethodIdObjArgs() avoids the creation of a temporary tuple and
doesn't have to parse a format string.
Victor Stinner [Fri, 9 Dec 2016 14:18:31 +0000 (15:18 +0100)]
Use _PyObject_CallMethodIdObjArgs() in _ctypes
Issue #28915: Replace _PyObject_CallMethodId() with
_PyObject_CallMethodIdObjArgs() in unpickle(). _PyObject_CallMethodIdObjArgs()
avoids the creation of a temporary tuple and doesn't have to parse a format
string.
Replace _PyObject_CallMethodId() with _PyObject_GetAttrId()+PyObject_Call() for
the second call since it requires to "unpack" a tuple.
Add also a check in the type of the second parameter (state): it must be a
tuple.
Victor Stinner [Fri, 9 Dec 2016 14:35:40 +0000 (15:35 +0100)]
Fix refleak introduced in change
032cbdb596fe
Issue #28915.
Victor Stinner [Fri, 9 Dec 2016 15:05:51 +0000 (16:05 +0100)]
regrtest --fromfile now accepts a list of filenames
Victor Stinner [Fri, 9 Dec 2016 13:24:02 +0000 (14:24 +0100)]
Use _PyObject_CallMethodIdObjArgs() in _asyncio
Issue #28915: Replace _PyObject_CallMethodId() with
_PyObject_CallMethodIdObjArgs() when the format string was only made of "O"
formats, PyObject* arguments.
_PyObject_CallMethodIdObjArgs() avoids the creation of a temporary tuple and
doesn't have to parse a format string.