]> granicus.if.org Git - python/log
python
8 years agoDisable _PyStack_AsTuple() inlining
Victor Stinner [Wed, 11 Jan 2017 00:07:03 +0000 (01:07 +0100)]
Disable _PyStack_AsTuple() inlining

Issue #29234: Inlining _PyStack_AsTuple() into callers increases their stack
consumption, Disable inlining to optimize the stack consumption.

Add _Py_NO_INLINE: use __attribute__((noinline)) of GCC and Clang.

It reduces the stack consumption, bytes per call, before => after:

test_python_call: 1040 => 976 (-64 B)
test_python_getitem: 976 => 912 (-64 B)
test_python_iterator: 1120 => 1056 (-64 B)

=> total: 3136 => 2944 (- 192 B)

8 years agoInline call_function()
Victor Stinner [Tue, 10 Jan 2017 23:54:57 +0000 (00:54 +0100)]
Inline call_function()

Issue #29227: Inline call_function() into _PyEval_EvalFrameDefault() using
Py_LOCAL_INLINE to reduce the stack consumption.

It reduces the stack consumption, bytes per call, before => after:

test_python_call: 1152 => 1040 (-112 B)
test_python_getitem: 1008 => 976 (-32 B)
test_python_iterator: 1232 => 1120 (-112 B)

=> total: 3392 => 3136 (- 256 B)

8 years agocall_method() now uses _PyObject_FastCall()
Victor Stinner [Tue, 10 Jan 2017 23:07:40 +0000 (00:07 +0100)]
call_method() now uses _PyObject_FastCall()

Issue #29233: Replace the inefficient _PyObject_VaCallFunctionObjArgs() with
_PyObject_FastCall() in call_method() and call_maybe().

Only a few functions call call_method() and call it with a fixed number of
arguments. Avoid the complex and expensive _PyObject_VaCallFunctionObjArgs()
function, replace it with an array allocated on the stack with the exact number
of argumlents.

It reduces the stack consumption, bytes per call, before => after:

test_python_call: 1168 => 1152 (-16 B)
test_python_getitem: 1344 => 1008 (-336 B)
test_python_iterator: 1568 => 1232 (-336 B)

Remove the _PyObject_VaCallFunctionObjArgs() function which became useless.
Rename it to object_vacall() and make it private.

8 years agoIssue #29217: Merge 3.6.
Xiang Zhang [Tue, 10 Jan 2017 03:30:44 +0000 (11:30 +0800)]
Issue #29217: Merge 3.6.

8 years agoIssue #29217: Merge 3.5.
Xiang Zhang [Tue, 10 Jan 2017 03:30:02 +0000 (11:30 +0800)]
Issue #29217: Merge 3.5.

8 years agoIssue #29217: Fix the wrong type description of UUID.variant.
Xiang Zhang [Tue, 10 Jan 2017 03:29:27 +0000 (11:29 +0800)]
Issue #29217: Fix the wrong type description of UUID.variant.

8 years agoIssue #29145: Merge 3.6.
Xiang Zhang [Tue, 10 Jan 2017 02:56:38 +0000 (10:56 +0800)]
Issue #29145: Merge 3.6.

8 years agoIssue #29145: Merge 3.5.
Xiang Zhang [Tue, 10 Jan 2017 02:54:19 +0000 (10:54 +0800)]
Issue #29145: Merge 3.5.

8 years agoIssue #29145: Fix overflow checks in str.replace() and str.join().
Xiang Zhang [Tue, 10 Jan 2017 02:52:00 +0000 (10:52 +0800)]
Issue #29145: Fix overflow checks in str.replace() and str.join().

Based on patch by Martin Panter.

8 years agoCloses #29177: Merged fix from 3.6.
Vinay Sajip [Mon, 9 Jan 2017 16:55:24 +0000 (16:55 +0000)]
Closes #29177: Merged fix from 3.6.

8 years agoFixes #29177: Improved resilience of logging tests which use socket servers.
Vinay Sajip [Mon, 9 Jan 2017 16:54:12 +0000 (16:54 +0000)]
Fixes #29177: Improved resilience of logging tests which use socket servers.

Thanks to Xavier de Gaye for the report and patch improvements.

8 years agoCloses #29133: merged update from 3.6.
Vinay Sajip [Mon, 9 Jan 2017 16:48:23 +0000 (16:48 +0000)]
Closes #29133: merged update from 3.6.

Thanks to Evan_ for the report and Marco Buttu for the patch.

8 years agoFixes #29133: clarified shlex documentation.
Vinay Sajip [Mon, 9 Jan 2017 16:46:04 +0000 (16:46 +0000)]
Fixes #29133: clarified shlex documentation.

8 years agoAdd test for ea064ff3c10f
Raymond Hettinger [Mon, 9 Jan 2017 15:50:19 +0000 (07:50 -0800)]
Add test for ea064ff3c10f

8 years agoBacked out changeset ea064ff3c10f
Raymond Hettinger [Mon, 9 Jan 2017 15:39:46 +0000 (07:39 -0800)]
Backed out changeset ea064ff3c10f

8 years agoWhile a speedup of 1% is measurable, contexts aren't created that often,
Stefan Krah [Mon, 9 Jan 2017 12:53:32 +0000 (13:53 +0100)]
While a speedup of 1% is measurable, contexts aren't created that often,
so let's defer this until 3.7, 3.8, ... all have this new function.

8 years agoMerge 3.6.
Stefan Krah [Mon, 9 Jan 2017 12:12:09 +0000 (13:12 +0100)]
Merge 3.6.

8 years agoMerge 3.5.
Stefan Krah [Mon, 9 Jan 2017 12:11:51 +0000 (13:11 +0100)]
Merge 3.5.

8 years agoIssue #28701: Revert part of 5bdc8e1a50c8 for the following reasons:
Stefan Krah [Mon, 9 Jan 2017 12:11:27 +0000 (13:11 +0100)]
Issue #28701: Revert part of 5bdc8e1a50c8 for the following reasons:

  - There was no real problem to begin with.

  - The hypothetical problem has been fixed by 5bdc8e1a50c8.

8 years agoMerge 3.6
Victor Stinner [Mon, 9 Jan 2017 10:21:37 +0000 (11:21 +0100)]
Merge 3.6

8 years agoNull merge 3.5
Victor Stinner [Mon, 9 Jan 2017 10:21:26 +0000 (11:21 +0100)]
Null merge 3.5

Python/random.c is more then in the 3.6 branch.

8 years agoIssue #29157: Prefer getrandom() over getentropy()
Victor Stinner [Mon, 9 Jan 2017 10:18:53 +0000 (11:18 +0100)]
Issue #29157: Prefer getrandom() over getentropy()

Copy and then adapt Python/random.c from default branch. Difference between 3.5
and default branches:

* Python 3.5 only uses getrandom() in non-blocking mode: flags=GRND_NONBLOCK
* If getrandom() fails with EAGAIN: py_getrandom() immediately fails and
  remembers that getrandom() doesn't work.
* Python 3.5 has no _PyOS_URandomNonblock() function: _PyOS_URandom()
  works in non-blocking mode on Python 3.5

8 years agoIssue #29190: Fixed possible errors in comparing strings in the pickle module.
Serhiy Storchaka [Mon, 9 Jan 2017 08:10:07 +0000 (10:10 +0200)]
Issue #29190: Fixed possible errors in comparing strings in the pickle module.

8 years agoIssue #29190: Fixed possible errors in comparing strings in the pickle module.
Serhiy Storchaka [Mon, 9 Jan 2017 08:09:43 +0000 (10:09 +0200)]
Issue #29190: Fixed possible errors in comparing strings in the pickle module.

8 years agoIssue #29190: Fixed possible errors in comparing strings in the pickle module.
Serhiy Storchaka [Mon, 9 Jan 2017 08:04:34 +0000 (10:04 +0200)]
Issue #29190: Fixed possible errors in comparing strings in the pickle module.

8 years agoIssue #29142: Merge 3.6.
Xiang Zhang [Mon, 9 Jan 2017 03:52:10 +0000 (11:52 +0800)]
Issue #29142: Merge 3.6.

8 years agoIssue #29142: Merge 3.5.
Xiang Zhang [Mon, 9 Jan 2017 03:50:02 +0000 (11:50 +0800)]
Issue #29142: Merge 3.5.

8 years agoIssue #29142: Fix suffixes in no_proxy handling in urllib.
Xiang Zhang [Mon, 9 Jan 2017 03:47:55 +0000 (11:47 +0800)]
Issue #29142: Fix suffixes in no_proxy handling in urllib.

In urllib.request, suffixes in no_proxy environment variable with
leading dots could match related hostnames again (e.g. .b.c matches a.b.c).
Patch by Milan Oberkirch.

8 years agoSync-up lru_cache() C code with space saving feature in the Python version.
Raymond Hettinger [Mon, 9 Jan 2017 03:34:28 +0000 (19:34 -0800)]
Sync-up lru_cache() C code with space saving feature in the Python version.

8 years agomerge
Raymond Hettinger [Mon, 9 Jan 2017 02:22:41 +0000 (18:22 -0800)]
merge

8 years agoSync-up with 3.7 by backporting minor lru_cache code beautification
Raymond Hettinger [Mon, 9 Jan 2017 02:22:24 +0000 (18:22 -0800)]
Sync-up with 3.7 by backporting minor lru_cache code beautification

8 years agoComplete the merge for issue #29203
Raymond Hettinger [Mon, 9 Jan 2017 02:04:30 +0000 (18:04 -0800)]
Complete the merge for issue #29203

8 years agomerge
Raymond Hettinger [Mon, 9 Jan 2017 01:29:21 +0000 (17:29 -0800)]
merge

8 years agoIssue #29203: functools.lru_cache() now respects PEP 468
Raymond Hettinger [Mon, 9 Jan 2017 01:28:20 +0000 (17:28 -0800)]
Issue #29203:  functools.lru_cache() now respects PEP 468

8 years agoIssue #29034: Merge 3.6.
Xiang Zhang [Sun, 8 Jan 2017 15:30:05 +0000 (23:30 +0800)]
Issue #29034: Merge 3.6.

8 years agoIssue #29034: Fix memory leak and use-after-free in path_converter.
Xiang Zhang [Sun, 8 Jan 2017 15:26:57 +0000 (23:26 +0800)]
Issue #29034: Fix memory leak and use-after-free in path_converter.

8 years agomerge
Raymond Hettinger [Sun, 8 Jan 2017 08:37:32 +0000 (00:37 -0800)]
merge

8 years agoAdd OrderedDict test for PEP 468 (guaranteed ordered of kwargs)
Raymond Hettinger [Sun, 8 Jan 2017 08:37:13 +0000 (00:37 -0800)]
Add OrderedDict test for PEP 468 (guaranteed ordered of kwargs)

8 years agomerge
Raymond Hettinger [Sun, 8 Jan 2017 06:05:28 +0000 (22:05 -0800)]
merge

8 years agoUpdate OrderedDict docs to reflect acceptance of PEP 468
Raymond Hettinger [Sun, 8 Jan 2017 06:05:12 +0000 (22:05 -0800)]
Update OrderedDict docs to reflect acceptance of PEP 468

8 years agoIssue #29200: Fix test to use self.assertEqual instead of py.test style tests
Raymond Hettinger [Sun, 8 Jan 2017 04:53:09 +0000 (20:53 -0800)]
Issue #29200: Fix test to use self.assertEqual instead of py.test style tests

8 years agoIssue #29200: Add test for lru cache only calling __hash__ once
Raymond Hettinger [Sun, 8 Jan 2017 04:44:48 +0000 (20:44 -0800)]
Issue #29200: Add test for lru cache only calling __hash__ once

8 years agoIssue #28815: Merge test tweak from 3.6
Martin Panter [Sun, 8 Jan 2017 01:06:48 +0000 (01:06 +0000)]
Issue #28815: Merge test tweak from 3.6

8 years agoIssue #28815: Merge test tweak from 3.5
Martin Panter [Sun, 8 Jan 2017 01:06:18 +0000 (01:06 +0000)]
Issue #28815: Merge test tweak from 3.5

8 years agoIssue #28815: Use new exception subclasses
Martin Panter [Sun, 8 Jan 2017 00:46:25 +0000 (00:46 +0000)]
Issue #28815: Use new exception subclasses

8 years agoMerge 3.6.
Stefan Krah [Sun, 8 Jan 2017 00:36:46 +0000 (01:36 +0100)]
Merge 3.6.

8 years agoAdd comment why the change in d83884b3a427 wasn't necessary.
Stefan Krah [Sun, 8 Jan 2017 00:36:00 +0000 (01:36 +0100)]
Add comment why the change in d83884b3a427 wasn't necessary.

8 years agoMerge 3.6.
Stefan Krah [Sun, 8 Jan 2017 00:11:50 +0000 (01:11 +0100)]
Merge 3.6.

8 years agoRevert part of 3cb3e224b692 in code that I maintain.
Stefan Krah [Sun, 8 Jan 2017 00:11:27 +0000 (01:11 +0100)]
Revert part of 3cb3e224b692 in code that I maintain.

8 years agoRevert part of dbf72357cb4a that is in a rarely used path and causes
Stefan Krah [Sat, 7 Jan 2017 23:08:53 +0000 (00:08 +0100)]
Revert part of dbf72357cb4a that is in a rarely used path and causes
maintenance issues (cost/benefit).

8 years agoRevert (unauthorized) parts of 54a89144ee1d which are not in a speed-sensitive
Stefan Krah [Sat, 7 Jan 2017 23:02:15 +0000 (00:02 +0100)]
Revert (unauthorized) parts of 54a89144ee1d which are not in a speed-sensitive
path in order to avoid maintenance issues.

8 years agoRevert (unauthorized) parts of b9eb35435178 which are not in a speed-sensitive
Stefan Krah [Sat, 7 Jan 2017 22:20:27 +0000 (23:20 +0100)]
Revert (unauthorized) parts of b9eb35435178 which are not in a speed-sensitive
path and cause maintenance issues (3.6 <-> 3.7, private test suite).

8 years agoIssue #16026: Merge from 3.6
Berker Peksag [Sat, 7 Jan 2017 06:33:28 +0000 (09:33 +0300)]
Issue #16026: Merge from 3.6

8 years agoIssue #16026: Fix parameter names of DictReader and DictWriter
Berker Peksag [Sat, 7 Jan 2017 06:32:56 +0000 (09:32 +0300)]
Issue #16026: Fix parameter names of DictReader and DictWriter

CPython and PyPy use f as the name of the first parameter of
DictReader and DictWriter classes.

Patch by James Salt and Greg Bengeult.

8 years agoNull merge 3.6
Victor Stinner [Fri, 6 Jan 2017 23:08:29 +0000 (00:08 +0100)]
Null merge 3.6

8 years agoIssue #29157: Prefer getrandom() over getentropy()
Victor Stinner [Fri, 6 Jan 2017 23:07:45 +0000 (00:07 +0100)]
Issue #29157: Prefer getrandom() over getentropy()

* dev_urandom() now calls py_getentropy(). Prepare the fallback to support
  getentropy() failure and falls back on reading from /dev/urandom.
* Simplify dev_urandom(). pyurandom() is now responsible to call getentropy()
  or getrandom(). Enhance also dev_urandom() and pyurandom() documentation.
* getrandom() is now preferred over getentropy(). The glibc 2.24 now implements
  getentropy() on Linux using the getrandom() syscall.  But getentropy()
  doesn't support non-blocking mode. Since getrandom() is tried first, it's not
  more needed to explicitly exclude getentropy() on Solaris. Replace:
  "if defined(HAVE_GETENTROPY) && !defined(sun)"
  with "if defined(HAVE_GETENTROPY)"
* Enhance py_getrandom() documentation. py_getentropy() now supports ENOSYS,
  EPERM & EINTR

8 years agoMerge 3.6
Victor Stinner [Fri, 6 Jan 2017 17:16:07 +0000 (18:16 +0100)]
Merge 3.6

8 years agoFix unittest.mock._Call: don't ignore name
Victor Stinner [Fri, 6 Jan 2017 17:15:51 +0000 (18:15 +0100)]
Fix unittest.mock._Call: don't ignore name

Issue #28961: Fix unittest.mock._Call helper: don't ignore the name parameter
anymore.

Patch written by Jiajun Huang.

8 years agoIssue #29157: enhance py_getrandom() documentation
Victor Stinner [Fri, 6 Jan 2017 10:39:15 +0000 (11:39 +0100)]
Issue #29157: enhance py_getrandom() documentation

8 years agopy_getentropy() now supports ENOSYS, EPERM & EINTR
Victor Stinner [Fri, 6 Jan 2017 10:33:18 +0000 (11:33 +0100)]
py_getentropy() now supports ENOSYS, EPERM & EINTR

Issue #29157.

8 years agoIssue #29157: getrandom() is now preferred over getentropy()
Victor Stinner [Fri, 6 Jan 2017 10:26:01 +0000 (11:26 +0100)]
Issue #29157: getrandom() is now preferred over getentropy()

The glibc now implements getentropy() on Linux using the getrandom() syscall.
But getentropy() doesn't support non-blocking mode.

Since getrandom() is tried first, it's not more needed to explicitly exclude
getentropy() on Solaris. Replace:

    if defined(HAVE_GETENTROPY) && !defined(sun)

with

    if defined(HAVE_GETENTROPY)

8 years agoIssue #29157: Simplify dev_urandom()
Victor Stinner [Fri, 6 Jan 2017 10:17:52 +0000 (11:17 +0100)]
Issue #29157: Simplify dev_urandom()

pyurandom() is now responsible to call getentropy() or getrandom().

Enhance also dev_urandom() and pyurandom() documentation.

8 years agoIssue #29157: dev_urandom() now calls py_getentropy()
Victor Stinner [Fri, 6 Jan 2017 10:16:20 +0000 (11:16 +0100)]
Issue #29157: dev_urandom() now calls py_getentropy()

Prepare the fallback to support getentropy() failure and falls back on reading
from /dev/urandom.

8 years agoMerge 3.6
Victor Stinner [Fri, 6 Jan 2017 09:49:32 +0000 (10:49 +0100)]
Merge 3.6

8 years agoFix subprocess.Popen.__del__() fox Python shutdown
Victor Stinner [Fri, 6 Jan 2017 09:44:44 +0000 (10:44 +0100)]
Fix subprocess.Popen.__del__() fox Python shutdown

Issue #29174, #26741: subprocess.Popen.__del__() now keeps a strong reference
to warnings.warn() function.

8 years agotest_curses - substitute self.skip() with self.skipTest()
Xavier de Gaye [Fri, 6 Jan 2017 08:52:19 +0000 (09:52 +0100)]
test_curses - substitute self.skip() with self.skipTest()

8 years agotest_curses - substitute self.skip() with self.skipTest()
Xavier de Gaye [Fri, 6 Jan 2017 08:51:22 +0000 (09:51 +0100)]
test_curses - substitute self.skip() with self.skipTest()

8 years agotest_curses - substitute self.skip() with self.skipTest()
Xavier de Gaye [Fri, 6 Jan 2017 08:50:27 +0000 (09:50 +0100)]
test_curses - substitute self.skip() with self.skipTest()

8 years agoMerge 3.6
INADA Naoki [Fri, 6 Jan 2017 08:44:43 +0000 (17:44 +0900)]
Merge 3.6

8 years agoIssue #29159: Fix regression in bytes(x) when x.__index__() raises Exception.
INADA Naoki [Fri, 6 Jan 2017 08:32:01 +0000 (17:32 +0900)]
Issue #29159: Fix regression in bytes(x) when x.__index__() raises Exception.

8 years agoMerge 3.6
Victor Stinner [Thu, 5 Jan 2017 21:59:11 +0000 (22:59 +0100)]
Merge 3.6

8 years agoIssue #27961: Define HAVE_LONG_LONG as 1.
Victor Stinner [Thu, 5 Jan 2017 21:58:53 +0000 (22:58 +0100)]
Issue #27961: Define HAVE_LONG_LONG as 1.

Fix backward compatibility issue, HAVE_LONG_LONG was defined but empty, whereas
it is defined as 1 in Python 3.5.

8 years agoMerge with 3.6
Terry Jan Reedy [Thu, 5 Jan 2017 04:18:01 +0000 (23:18 -0500)]
Merge with 3.6

8 years agoIssue #29162: Don't depend on 'from tkinter import *' importing sys.
Terry Jan Reedy [Thu, 5 Jan 2017 04:17:47 +0000 (23:17 -0500)]
Issue #29162: Don't depend on 'from tkinter import *' importing sys.
Fix error in format string.

8 years agoIssue #26851: Merge 3.6.
Xavier de Gaye [Wed, 4 Jan 2017 20:53:53 +0000 (21:53 +0100)]
Issue #26851: Merge 3.6.

8 years agoIssue #26851: Set Android compilation and link flags.
Xavier de Gaye [Wed, 4 Jan 2017 20:51:16 +0000 (21:51 +0100)]
Issue #26851: Set Android compilation and link flags.

8 years agoIssue #29156: Remove superfluous pow test.
Serhiy Storchaka [Wed, 4 Jan 2017 16:53:28 +0000 (18:53 +0200)]
Issue #29156: Remove superfluous pow test.
test_powlong is the same as test_powint.
Patch by Lukas Schwaighofer.

8 years agoIssue #29156: Remove superfluous pow test.
Serhiy Storchaka [Wed, 4 Jan 2017 16:53:00 +0000 (18:53 +0200)]
Issue #29156: Remove superfluous pow test.
test_powlong is the same as test_powint.
Patch by Lukas Schwaighofer.

8 years agoIssue #29156: Remove superfluous pow test.
Serhiy Storchaka [Wed, 4 Jan 2017 16:52:40 +0000 (18:52 +0200)]
Issue #29156: Remove superfluous pow test.
test_powlong is the same as test_powint.
Patch by Lukas Schwaighofer.

8 years agoMerge 3.6
Victor Stinner [Wed, 4 Jan 2017 11:02:30 +0000 (12:02 +0100)]
Merge 3.6

8 years agoIssue #24773: fix datetime.time constructor docstring
Victor Stinner [Wed, 4 Jan 2017 11:01:16 +0000 (12:01 +0100)]
Issue #24773: fix datetime.time constructor docstring

The default value of fold is zero, not True. Fix the docstring of the Python
implementation.

8 years agoMerge 3.6
Victor Stinner [Tue, 3 Jan 2017 22:47:39 +0000 (23:47 +0100)]
Merge 3.6

8 years agoIssue #29140: Fix hash(datetime.time)
Victor Stinner [Tue, 3 Jan 2017 22:47:12 +0000 (23:47 +0100)]
Issue #29140: Fix hash(datetime.time)

Fix time_hash() function: replace DATE_xxx() macros with TIME_xxx() macros.
Before, the hash function used a wrong value for microseconds if fold is set
(equal to 1).

8 years agoFixed possible reference leaks in the _json module.
Serhiy Storchaka [Tue, 3 Jan 2017 09:20:15 +0000 (11:20 +0200)]
Fixed possible reference leaks in the _json module.

8 years agoFixed possible reference leaks in the _json module.
Serhiy Storchaka [Tue, 3 Jan 2017 09:19:48 +0000 (11:19 +0200)]
Fixed possible reference leaks in the _json module.

8 years agoFixed possible reference leaks in the _json module.
Serhiy Storchaka [Tue, 3 Jan 2017 09:17:44 +0000 (11:17 +0200)]
Fixed possible reference leaks in the _json module.

8 years agoNull-merge from 3.6. Last one--phew!
Larry Hastings [Tue, 3 Jan 2017 02:40:11 +0000 (18:40 -0800)]
Null-merge from 3.6.  Last one--phew!

8 years agoNull-merge from 3.5.
Larry Hastings [Tue, 3 Jan 2017 02:39:09 +0000 (18:39 -0800)]
Null-merge from 3.5.

8 years agoForward-merge from 3.4.
Larry Hastings [Tue, 3 Jan 2017 02:36:52 +0000 (18:36 -0800)]
Forward-merge from 3.4.

8 years agoMerge Python 3.5.3rc1 release changes back into the main branch.
Larry Hastings [Tue, 3 Jan 2017 02:32:30 +0000 (18:32 -0800)]
Merge Python 3.5.3rc1 release changes back into the main branch.

8 years agoPost-release fixups for Python 3.5.3rc1.
Larry Hastings [Tue, 3 Jan 2017 02:31:25 +0000 (18:31 -0800)]
Post-release fixups for Python 3.5.3rc1.

8 years agoMerge Python 3.4.6rc1 changes back into main branch.
Larry Hastings [Tue, 3 Jan 2017 02:30:26 +0000 (18:30 -0800)]
Merge Python 3.4.6rc1 changes back into main branch.

8 years agoPost-release fixups for Python 3.4.6rc1.
Larry Hastings [Tue, 3 Jan 2017 02:29:26 +0000 (18:29 -0800)]
Post-release fixups for Python 3.4.6rc1.

8 years agoOptimize _PyFunction_FastCallDict() when kwargs is {}
Victor Stinner [Tue, 3 Jan 2017 01:01:42 +0000 (02:01 +0100)]
Optimize _PyFunction_FastCallDict() when kwargs is {}

Issue #28839: Optimize _PyFunction_FastCallDict() when kwargs is an empty
dictionary, avoid the creation of an useless empty tuple.

8 years agoIssue #28839: Optimize function_call()
Victor Stinner [Tue, 3 Jan 2017 00:58:17 +0000 (01:58 +0100)]
Issue #28839: Optimize function_call()

function_call() now simply calls _PyFunction_FastCallDict().

_PyFunction_FastCallDict() is more efficient: it contains fast paths for the
common case (optimized code object and no keyword argument).

8 years agoIssue #15812: Merge from 3.6
Berker Peksag [Tue, 3 Jan 2017 00:48:55 +0000 (03:48 +0300)]
Issue #15812: Merge from 3.6

8 years agoIssue #15812: Merge from 3.5
Berker Peksag [Tue, 3 Jan 2017 00:48:34 +0000 (03:48 +0300)]
Issue #15812: Merge from 3.5

8 years agoIssue #15812: Delete redundant max(start, 0)
Berker Peksag [Tue, 3 Jan 2017 00:48:04 +0000 (03:48 +0300)]
Issue #15812: Delete redundant max(start, 0)

Noticed by Serhiy Storchaka.

8 years agoIssue #29035: Simplify a regex in libregrtest
Victor Stinner [Tue, 3 Jan 2017 00:38:58 +0000 (01:38 +0100)]
Issue #29035: Simplify a regex in libregrtest

regrtest: simplify the regex used to match test names for the --fromfile
command line option.

8 years agoIssue #29012: Merge from 3.6
Berker Peksag [Tue, 3 Jan 2017 00:36:15 +0000 (03:36 +0300)]
Issue #29012: Merge from 3.6