]> granicus.if.org Git - python/log
python
8 years agoIssue #28755: Merge Arg Clinic howto from 3.6
Martin Panter [Sat, 10 Dec 2016 04:22:27 +0000 (04:22 +0000)]
Issue #28755: Merge Arg Clinic howto from 3.6

8 years agoIssues #28755, #28753: Merge Arg Clinic howto from 3.5
Martin Panter [Sat, 10 Dec 2016 04:14:02 +0000 (04:14 +0000)]
Issues #28755, #28753: Merge Arg Clinic howto from 3.5

8 years agoIssue #28755: Improve syntax highlighting in Arg Clinic howto
Martin Panter [Sat, 10 Dec 2016 04:10:45 +0000 (04:10 +0000)]
Issue #28755: Improve syntax highlighting in Arg Clinic howto

8 years agoIssue 28753: Argument Clinic howto docfix, courtesy Julien Palard.
Martin Panter [Sat, 10 Dec 2016 03:49:12 +0000 (03:49 +0000)]
Issue 28753: Argument Clinic howto docfix, courtesy Julien Palard.

8 years agoBacked out changeset 99c34e47348b
Victor Stinner [Fri, 9 Dec 2016 17:51:13 +0000 (18:51 +0100)]
Backed out changeset 99c34e47348b

The change broke test_gdb.

8 years agoIssue #20185: Convert _warnings.warn() to Argument Clinic
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.

8 years agoInline PyEval_EvalFrameEx() in callers
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.

8 years agoRemove useless variable initialization
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.

8 years agoInitialize variables to fix compiler warnings
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.

8 years agoUse PyObject_CallFunctionObjArgs()
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.

8 years agoUse _PyObject_CallMethodIdObjArgs()
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.

8 years agoUse _PyObject_CallMethodIdObjArgs() in _io
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.

8 years agoUse _PyObject_CallMethodIdObjArgs() in _datetime
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.

8 years agoUse _PyObject_CallMethodIdObjArgs() in _elementtree
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.

8 years agoUse _PyObject_CallMethodIdObjArgs() in _ctypes
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.

8 years agoFix refleak introduced in change 032cbdb596fe
Victor Stinner [Fri, 9 Dec 2016 14:35:40 +0000 (15:35 +0100)]
Fix refleak introduced in change 032cbdb596fe

Issue #28915.

8 years agoregrtest --fromfile now accepts a list of filenames
Victor Stinner [Fri, 9 Dec 2016 15:05:51 +0000 (16:05 +0100)]
regrtest --fromfile now accepts a list of filenames

8 years agoUse _PyObject_CallMethodIdObjArgs() in _asyncio
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.

8 years agoIssue #28915: Use _PyObject_CallNoArg()
Victor Stinner [Fri, 9 Dec 2016 11:29:18 +0000 (12:29 +0100)]
Issue #28915: Use _PyObject_CallNoArg()

Replace PyObject_CallFunction(func, NULL) with _PyObject_CallNoArg(func).

8 years agoIssue #26937: Merge 3.6.
Xavier de Gaye [Fri, 9 Dec 2016 08:35:49 +0000 (09:35 +0100)]
Issue #26937: Merge 3.6.

8 years agoIssue #26937: The chown() method of the tarfile.TarFile class does not fail now
Xavier de Gaye [Fri, 9 Dec 2016 08:33:09 +0000 (09:33 +0100)]
Issue #26937: The chown() method of the tarfile.TarFile class does not fail now
when the grp module cannot be imported, as for example on Android platforms.

8 years agoUse _PyObject_FastCallVa() in type slots
Victor Stinner [Thu, 8 Dec 2016 23:41:46 +0000 (00:41 +0100)]
Use _PyObject_FastCallVa() in type slots

Issue #28915: Replace Py_VaBuildValue()+PyObject_Call() with
_PyObject_FastCallVa() to avoid the creation of temporary tuple.

8 years agoAdd _PyObject_VaCallFunctionObjArgs() private function
Victor Stinner [Thu, 8 Dec 2016 23:40:33 +0000 (00:40 +0100)]
Add _PyObject_VaCallFunctionObjArgs() private function

Issue #28915: Similar to _PyObject_CallFunctionObjArgs() but use va_list to
pass arguments.

8 years agotime_strptime() uses PyObject_Call()
Victor Stinner [Thu, 8 Dec 2016 23:38:53 +0000 (00:38 +0100)]
time_strptime() uses PyObject_Call()

Issue #28915: Use PyObject_Call() to pass a tuple of positional arguments,
instead of relying on _PyObject_CallMethodId() weird behaviour to unpack the
tuple.

8 years agobuild_struct_time() uses Py_BuildValue()
Victor Stinner [Thu, 8 Dec 2016 23:38:16 +0000 (00:38 +0100)]
build_struct_time() uses Py_BuildValue()

Issue #28915: Avoid calling _PyObject_CallMethodId() with "(...)" format to
avoid the creation of a temporary tuple: use Py_BuildValue() with
_PyObject_CallMethodIdObjArgs().

8 years agoUse _PyObject_CallMethodIdObjArgs()
Victor Stinner [Thu, 8 Dec 2016 23:36:19 +0000 (00:36 +0100)]
Use _PyObject_CallMethodIdObjArgs()

Issue #28915: Replace _PyObject_CallMethodId() with
_PyObject_CallMethodIdObjArgs() when the format string only use the format 'O'
for objects, like "(O)".

_PyObject_CallMethodIdObjArgs() avoids the code to parse a format string and
avoids the creation of a temporary tuple.

8 years agoDon't parenthesis in _PyObject_CallMethodId() format
Victor Stinner [Thu, 8 Dec 2016 23:33:39 +0000 (00:33 +0100)]
Don't parenthesis in _PyObject_CallMethodId() format

Issue #28915: Without parenthesis, _PyObject_CallMethodId() avoids the creation
a temporary tuple, and so is more efficient.

8 years ago_PyObject_CallFunctionVa() uses fast call
Victor Stinner [Thu, 8 Dec 2016 23:31:47 +0000 (00:31 +0100)]
_PyObject_CallFunctionVa() uses fast call

Issue #28915: Use _Py_VaBuildStack() to build a C array of PyObject* and then
use _PyObject_FastCall().

The function has a special case if the stack only contains one parameter and
the parameter is a tuple: "unpack" the tuple of arguments in this case.

8 years agoAdd _Py_VaBuildStack() function
Victor Stinner [Thu, 8 Dec 2016 23:29:49 +0000 (00:29 +0100)]
Add _Py_VaBuildStack() function

Issue #28915: Similar to Py_VaBuildValue(), but work on a C array of PyObject*,
instead of creating a tuple.

8 years agomodsupport: replace int with Py_ssize_t
Victor Stinner [Thu, 8 Dec 2016 23:27:22 +0000 (00:27 +0100)]
modsupport: replace int with Py_ssize_t

Issue #28915: Py_ssize_t type is better for indexes. The compiler might emit
more efficient code for i++. Py_ssize_t is the type of a PyTuple index for
example.

Replace also "int endchar" with "char endchar".

8 years agomodsupport: replace int with Py_ssize_t
Victor Stinner [Thu, 8 Dec 2016 23:24:47 +0000 (00:24 +0100)]
modsupport: replace int with Py_ssize_t

Issue #28915.

8 years agoAdd _PyObject_CallFunctionVa() helper
Victor Stinner [Thu, 8 Dec 2016 23:22:56 +0000 (00:22 +0100)]
Add _PyObject_CallFunctionVa() helper

Issue #28915: Add _PyObject_CallFunctionVa() helper to factorize code of
functions:

* PyObject_CallFunction()
* _PyObject_CallFunction_SizeT()
* callmethod()

8 years agoAdd _PyObject_FastCallVa() helper
Victor Stinner [Thu, 8 Dec 2016 23:21:55 +0000 (00:21 +0100)]
Add _PyObject_FastCallVa() helper

Issue #28915: Add _PyObject_FastCallVa() helper to factorize code of functions:

* PyObject_CallFunctionObjArgs()
* PyObject_CallMethodObjArgs()
* _PyObject_CallMethodIdObjArgs()

Inline objargs_mkstack() into _PyObject_FastCallVa(), remove
objargs_mkstack().

8 years agoIssue #28896: Deprecate WindowsRegistryFinder
Steve Dower [Thu, 8 Dec 2016 17:01:39 +0000 (09:01 -0800)]
Issue #28896: Deprecate WindowsRegistryFinder

8 years agoNull merge 3.6
Victor Stinner [Thu, 8 Dec 2016 16:17:17 +0000 (17:17 +0100)]
Null merge 3.6

8 years agoIssue #26941: Merge 3.6.
Xavier de Gaye [Thu, 8 Dec 2016 11:21:53 +0000 (12:21 +0100)]
Issue #26941: Merge 3.6.

8 years agoIssue #26941: Fix test_threading that hangs on the Android armv7 qemu emulator.
Xavier de Gaye [Thu, 8 Dec 2016 11:21:00 +0000 (12:21 +0100)]
Issue #26941: Fix test_threading that hangs on the Android armv7 qemu emulator.

8 years agoIssue #26940: Merge 3.6.
Xavier de Gaye [Thu, 8 Dec 2016 10:27:27 +0000 (11:27 +0100)]
Issue #26940: Merge 3.6.

8 years agoIssue #26940: Fix test_importlib that hangs on the Android armv7 qemu emulator.
Xavier de Gaye [Thu, 8 Dec 2016 10:26:18 +0000 (11:26 +0100)]
Issue #26940: Fix test_importlib that hangs on the Android armv7 qemu emulator.

8 years agoIssue #26939: Merge 3.6.
Xavier de Gaye [Thu, 8 Dec 2016 10:09:54 +0000 (11:09 +0100)]
Issue #26939: Merge 3.6.

8 years agoIssue #26939: Add the support.setswitchinterval() function to fix
Xavier de Gaye [Thu, 8 Dec 2016 10:06:56 +0000 (11:06 +0100)]
Issue #26939: Add the support.setswitchinterval() function to fix
test_functools hanging on the Android armv7 qemu emulator.

8 years agomerge 3.6 (#28898)
Benjamin Peterson [Thu, 8 Dec 2016 07:55:03 +0000 (23:55 -0800)]
merge 3.6 (#28898)

8 years agoguard HAVE_LONG_LONG definition to prevent redefinition (#28898)
Benjamin Peterson [Thu, 8 Dec 2016 07:54:28 +0000 (23:54 -0800)]
guard HAVE_LONG_LONG definition to prevent redefinition (#28898)

8 years agoIssue #28900: Update documentation sidebar for 3.6.0rc.
Ned Deily [Thu, 8 Dec 2016 04:38:30 +0000 (23:38 -0500)]
Issue #28900: Update documentation sidebar for 3.6.0rc.

8 years agoIssue #28900: Update documentation sidebar for 3.6.0rc.
Ned Deily [Thu, 8 Dec 2016 04:37:12 +0000 (23:37 -0500)]
Issue #28900: Update documentation sidebar for 3.6.0rc.

8 years agoIssue #28900: Update documentation sidebar for 3.6.0rc.
Ned Deily [Thu, 8 Dec 2016 04:34:49 +0000 (23:34 -0500)]
Issue #28900: Update documentation sidebar for 3.6.0rc.

8 years agoMerge 3.6 (issue #28635)
Yury Selivanov [Thu, 8 Dec 2016 00:20:10 +0000 (16:20 -0800)]
Merge 3.6 (issue #28635)

8 years agoIssue #28635: Drop the note that whatsnew is incomplete
Yury Selivanov [Thu, 8 Dec 2016 00:19:56 +0000 (16:19 -0800)]
Issue #28635: Drop the note that whatsnew is incomplete

8 years agoIssue #28896: Deprecate WindowsRegistryFinder
Steve Dower [Wed, 7 Dec 2016 21:02:27 +0000 (13:02 -0800)]
Issue #28896: Deprecate WindowsRegistryFinder

8 years agoIssue #28818: Simplify lookdict functions
INADA Naoki [Wed, 7 Dec 2016 11:41:42 +0000 (20:41 +0900)]
Issue #28818: Simplify lookdict functions

8 years agoMerge from 3.6.
Serhiy Storchaka [Wed, 7 Dec 2016 11:32:09 +0000 (13:32 +0200)]
Merge from 3.6.

8 years agoMerge from 3.5.
Serhiy Storchaka [Wed, 7 Dec 2016 11:31:47 +0000 (13:31 +0200)]
Merge from 3.5.

8 years agoChange order of io.UnsupportedOperation base classes.
Serhiy Storchaka [Wed, 7 Dec 2016 11:31:20 +0000 (13:31 +0200)]
Change order of io.UnsupportedOperation base classes.
This makes tests passing after changes by issue #5322.

8 years agonull merge from 3.6
INADA Naoki [Wed, 7 Dec 2016 09:38:15 +0000 (18:38 +0900)]
null merge from 3.6

8 years agoIssue #28731: Optimize _PyDict_NewPresized() to create correct size dict.
INADA Naoki [Wed, 7 Dec 2016 09:34:44 +0000 (18:34 +0900)]
Issue #28731: Optimize _PyDict_NewPresized() to create correct size dict.

Improve speed of dict literal with constant keys up to 30%.

8 years agoIssue #5322: Fixed setting __new__ to a PyCFunction inside Python code.
Serhiy Storchaka [Wed, 7 Dec 2016 09:27:55 +0000 (11:27 +0200)]
Issue #5322: Fixed setting __new__ to a PyCFunction inside Python code.
Original patch by Andreas Stührk.

8 years agoIssue #5322: Fixed setting __new__ to a PyCFunction inside Python code.
Serhiy Storchaka [Wed, 7 Dec 2016 09:26:49 +0000 (11:26 +0200)]
Issue #5322: Fixed setting __new__ to a PyCFunction inside Python code.
Original patch by Andreas Stührk.

8 years agoIssue #28847: A deprecation warning is now emitted if the index file is missed
Serhiy Storchaka [Wed, 7 Dec 2016 09:11:12 +0000 (11:11 +0200)]
Issue #28847: A deprecation warning is now emitted if the index file is missed
and recreated in the 'r' and 'w' modes (will be an error in future Python
releases).

8 years agoIssue #28847: dbm.dumb now supports reading read-only files and no longer
Serhiy Storchaka [Wed, 7 Dec 2016 09:02:18 +0000 (11:02 +0200)]
Issue #28847: dbm.dumb now supports reading read-only files and no longer
writes the index file when it is not changed.

8 years agoIssue #28847: dbm.dumb now supports reading read-only files and no longer
Serhiy Storchaka [Wed, 7 Dec 2016 09:00:06 +0000 (11:00 +0200)]
Issue #28847: dbm.dumb now supports reading read-only files and no longer
writes the index file when it is not changed.

8 years agoIssue #28847: dbm.dumb now supports reading read-only files and no longer
Serhiy Storchaka [Wed, 7 Dec 2016 08:56:39 +0000 (10:56 +0200)]
Issue #28847: dbm.dumb now supports reading read-only files and no longer
writes the index file when it is not changed.

8 years agonull merge from 3.6
Ned Deily [Wed, 7 Dec 2016 07:02:48 +0000 (02:02 -0500)]
null merge from 3.6

8 years agoPrepare for 3.6.1. Any further 3.6.0 release candidates and 3.6.0 final will be...
Ned Deily [Wed, 7 Dec 2016 06:59:27 +0000 (01:59 -0500)]
Prepare for 3.6.1.  Any further 3.6.0 release candidates and 3.6.0 final will be cherrypicked and merged here.

8 years agomerge tag from 3.6
Ned Deily [Wed, 7 Dec 2016 00:07:19 +0000 (19:07 -0500)]
merge tag from 3.6

8 years agoAdded tag v3.6.0rc1 for changeset 29a273eee9a5
Ned Deily [Wed, 7 Dec 2016 00:04:14 +0000 (19:04 -0500)]
Added tag v3.6.0rc1 for changeset 29a273eee9a5

8 years agoVersion bump for 3.6.0rc1 v3.6.0rc1
Ned Deily [Wed, 7 Dec 2016 00:02:30 +0000 (19:02 -0500)]
Version bump for 3.6.0rc1

8 years agoUpdate pydoc topics for 3.6.0rc1
Ned Deily [Tue, 6 Dec 2016 23:53:16 +0000 (18:53 -0500)]
Update pydoc topics for 3.6.0rc1

8 years ago_PyObject_FastCallKeywords() now calls directly tp_call
Victor Stinner [Tue, 6 Dec 2016 23:37:38 +0000 (00:37 +0100)]
_PyObject_FastCallKeywords() now calls directly tp_call

_PyObject_FastCallKeywords() doesn't call _PyObject_FastCallDict() anymore:
call directly tp_call.

8 years agoRegenerate configure with autoconf 2.69.
Ned Deily [Tue, 6 Dec 2016 22:33:19 +0000 (17:33 -0500)]
Regenerate configure with autoconf 2.69.

8 years agoRegenerate configure with autoconf 2.69.
Ned Deily [Tue, 6 Dec 2016 22:31:32 +0000 (17:31 -0500)]
Regenerate configure with autoconf 2.69.

8 years agoIssue #28835: merge from 3.6
Ned Deily [Tue, 6 Dec 2016 22:13:58 +0000 (17:13 -0500)]
Issue #28835: merge from 3.6

8 years agoIssue #28835: Tidy previous showwarning changes based on review comments.
Ned Deily [Tue, 6 Dec 2016 22:12:47 +0000 (17:12 -0500)]
Issue #28835: Tidy previous showwarning changes based on review comments.
Patch by Serhiy Storchaka.

8 years agoMerge from 3.6
Ned Deily [Tue, 6 Dec 2016 22:02:03 +0000 (17:02 -0500)]
Merge from 3.6

8 years agoUpdate the Mac installer README file for 3.6.0.
Ned Deily [Tue, 6 Dec 2016 22:00:44 +0000 (17:00 -0500)]
Update the Mac installer README file for 3.6.0.

8 years agoFix typo in a comment of abstract.c
Victor Stinner [Tue, 6 Dec 2016 17:49:15 +0000 (18:49 +0100)]
Fix typo in a comment of abstract.c

8 years agoUse _PyObject_CallNoArg()
Victor Stinner [Tue, 6 Dec 2016 17:46:19 +0000 (18:46 +0100)]
Use _PyObject_CallNoArg()

Replace:
    PyObject_CallFunctionObjArgs(callable, NULL)
with:
    _PyObject_CallNoArg(callable)

8 years agoUse _PyObject_CallNoArg()
Victor Stinner [Tue, 6 Dec 2016 17:45:50 +0000 (18:45 +0100)]
Use _PyObject_CallNoArg()

Replace:
    PyObject_CallObject(callable, NULL)
with:
    _PyObject_CallNoArg(callable)

8 years agoIssue #27030: Unknown escapes in re.sub() replacement template are allowed
Serhiy Storchaka [Tue, 6 Dec 2016 17:15:29 +0000 (19:15 +0200)]
Issue #27030: Unknown escapes in re.sub() replacement template are allowed
again.  But they still are deprecated and will be disabled in 3.7.

8 years agoIssue #28838: Fix weird indentation of abstract.h
Victor Stinner [Tue, 6 Dec 2016 15:55:39 +0000 (16:55 +0100)]
Issue #28838: Fix weird indentation of abstract.h

Remove most indentation to move code at the left.

8 years agoMerge documentation for issue #27030 from 3.6.
Serhiy Storchaka [Tue, 6 Dec 2016 17:25:19 +0000 (19:25 +0200)]
Merge documentation for issue #27030 from 3.6.

8 years agoUniformize argument names of "call" functions
Victor Stinner [Tue, 6 Dec 2016 15:27:24 +0000 (16:27 +0100)]
Uniformize argument names of "call" functions

Issue #28838: Rename parameters of the "calls" functions of the Python C API.

* Rename 'callable_object' and 'func' to 'callable': any Python callable object
  is accepted, not only Python functions
* Rename 'method' and 'nameid' to 'name' (method name)
* Rename 'o' to 'obj'
* Move, fix and update documentation of PyObject_CallXXX() functions
  in abstract.h
* Update also the documentaton of the C API (update parameter names)

8 years agoFixed misplaced comment.
Serhiy Storchaka [Tue, 6 Dec 2016 11:46:17 +0000 (13:46 +0200)]
Fixed misplaced comment.

8 years agoFixed misplaced comment.
Serhiy Storchaka [Tue, 6 Dec 2016 11:45:44 +0000 (13:45 +0200)]
Fixed misplaced comment.

8 years agoFixed misplaced comment.
Serhiy Storchaka [Tue, 6 Dec 2016 11:43:46 +0000 (13:43 +0200)]
Fixed misplaced comment.

8 years agoMerge 3.6
Victor Stinner [Tue, 6 Dec 2016 10:02:54 +0000 (11:02 +0100)]
Merge 3.6

8 years agowarnings: Fix the issue number
Victor Stinner [Tue, 6 Dec 2016 10:02:12 +0000 (11:02 +0100)]
warnings: Fix the issue number

The fix for catch_warnings() is the issue #28835 (not the issue #28089).

8 years agoMerge 3.6
Victor Stinner [Tue, 6 Dec 2016 09:59:54 +0000 (10:59 +0100)]
Merge 3.6

8 years agocatch_warnings() calls showwarning() if overriden
Victor Stinner [Tue, 6 Dec 2016 09:53:52 +0000 (10:53 +0100)]
catch_warnings() calls showwarning() if overriden

Issue #28089: Fix a regression introduced in warnings.catch_warnings(): call
warnings.showwarning() if it was overriden inside the context manager.

8 years agomerge 3.6
Benjamin Peterson [Tue, 6 Dec 2016 06:31:20 +0000 (22:31 -0800)]
merge 3.6

8 years agomerge 3.5
Benjamin Peterson [Tue, 6 Dec 2016 06:31:12 +0000 (22:31 -0800)]
merge 3.5

8 years agorm unused import
Benjamin Peterson [Tue, 6 Dec 2016 06:30:55 +0000 (22:30 -0800)]
rm unused import

8 years agoFixed merge error in Misc/NEWS for issue #23722.
Serhiy Storchaka [Mon, 5 Dec 2016 22:24:19 +0000 (00:24 +0200)]
Fixed merge error in Misc/NEWS for issue #23722.

8 years agoIssue #28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.
Serhiy Storchaka [Mon, 5 Dec 2016 22:20:26 +0000 (00:20 +0200)]
Issue #28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.

8 years agoIssue #28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.
Serhiy Storchaka [Mon, 5 Dec 2016 22:17:45 +0000 (00:17 +0200)]
Issue #28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.

8 years agoIssue #28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.
Serhiy Storchaka [Mon, 5 Dec 2016 22:13:34 +0000 (00:13 +0200)]
Issue #28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.

8 years agoUse directly _PyObject_GenericSetAttrWithDict()
Victor Stinner [Mon, 5 Dec 2016 17:23:27 +0000 (18:23 +0100)]
Use directly _PyObject_GenericSetAttrWithDict()

Modify type_setattro() to call directly _PyObject_GenericSetAttrWithDict()
instead of PyObject_GenericSetAttr().

PyObject_GenericSetAttr() is a thin wrapper to
_PyObject_GenericSetAttrWithDict().

8 years agoIssue #28152: Fix -Wunreachable-code warning on clang
Victor Stinner [Mon, 5 Dec 2016 17:00:42 +0000 (18:00 +0100)]
Issue #28152: Fix -Wunreachable-code warning on clang

Replace 0 with (0) to ignore a compiler warning about dead code on
"((int)(SEM_VALUE_MAX) < 0)": SEM_VALUE_MAX is not negative on Linux.

8 years agoIssue #28152: Fix -Wunreachable-code warning on clang
Victor Stinner [Mon, 5 Dec 2016 16:55:36 +0000 (17:55 +0100)]
Issue #28152: Fix -Wunreachable-code warning on clang

Replace C if() with precompiler #if to fix a warning on dead code when using
clang.

8 years agoIssue #28152: Fix -Wunreachable-code warnings on Clang
Victor Stinner [Mon, 5 Dec 2016 16:56:36 +0000 (17:56 +0100)]
Issue #28152: Fix -Wunreachable-code warnings on Clang

Don't declare dead code when the code is declared with Clang.

8 years agoIssue #28858: Remove _PyObject_CallArg1() macro
Victor Stinner [Mon, 5 Dec 2016 16:04:32 +0000 (17:04 +0100)]
Issue #28858: Remove _PyObject_CallArg1() macro

Replace
   _PyObject_CallArg1(func, arg)
with
   PyObject_CallFunctionObjArgs(func, arg, NULL)

Using the _PyObject_CallArg1() macro increases the usage of the C stack, which
was unexpected and unwanted. PyObject_CallFunctionObjArgs() doesn't have this
issue.