summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Issue #26729: Fixed __text_signature__ for sorted().Serhiy Storchaka2017-01-231-1/+1
|\ | | | | | | Patch by Erik Welch.
| * Issue #26729: Fixed __text_signature__ for sorted().Serhiy Storchaka2017-01-231-1/+1
| |\ | | | | | | | | | Patch by Erik Welch.
| | * Issue #26729: Fixed __text_signature__ for sorted().Serhiy Storchaka2017-01-231-1/+1
| | | | | | | | | | | | Patch by Erik Welch.
| | * Issue #29157: Prefer getrandom() over getentropy()Victor Stinner2017-01-091-200/+294
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE whereverSerhiy Storchaka2017-01-235-54/+27
| | | | | | | | | | | | possible. Patch is writen with Coccinelle.
* | | Issue #29331: Simplified argument parsing in sorted() and list.sort().Serhiy Storchaka2017-01-211-9/+5
| | |
* | | Issue #29327: Fixed a crash when pass the iterable keyword argument to sorted().Serhiy Storchaka2017-01-201-1/+2
|\ \ \ | |/ /
| * | Issue #29327: Fixed a crash when pass the iterable keyword argument to sorted().Serhiy Storchaka2017-01-201-1/+2
| | |
| * | Issue #29157: Prefer getrandom() over getentropy()Victor Stinner2017-01-061-87/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | Issue #29296: convert print() to METH_FASTCALLINADA Naoki2017-01-191-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Replace PyArg_ParseTupleAndKeywords() with _PyArg_ParseStackAndKeywords() which is more efficient to parse keywords, since it decodes only keywords (char*) from UTF-8 once, instead of decoding at each call. * METH_FASTCALL avoids the creation of a temporary tuple to pass positional arguments. Patch written by INADA Naoki, pushed by Victor Stinner.
* | | Rephrase !PyErr_Occurred() comment: may=>canVictor Stinner2017-01-181-2/+2
| | | | | | | | | | | | Issue #29259.
* | | sorted() uses METH_FASTCALLVictor Stinner2017-01-171-11/+9
| | |
* | | next() uses FASTCALLVictor Stinner2017-01-171-3/+9
| | |
* | | getattr() uses METH_FASTCALLVictor Stinner2017-01-171-3/+8
| | |
* | | Issue #29029: Speed up processing positional arguments inSerhiy Storchaka2017-01-171-101/+89
| | | | | | | | | | | | PyArg_ParseTupleAndKeywords(), _PyArg_ParseTupleAndKeywordsFast() and like.
* | | Run Argument Clinic: METH_VARARGS=>METH_FASTCALLVictor Stinner2017-01-172-38/+86
| | | | | | | | | | | | | | | | | | | | | | | | Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling convention for functions using "boring" positional arguments. Manually fix _elementtree: _elementtree_XMLParser_doctype() must remain consistent with the clinic code.
* | | Add _PyArg_UnpackStack() function helperVictor Stinner2017-01-171-18/+55
| | | | | | | | | | | | Issue #29286.
* | | Run Argument Clinic: METH_VARARGS=>METH_FASTCALLVictor Stinner2017-01-173-9/+17
| | | | | | | | | | | | | | | Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling convention for functions using only positional arguments.
* | | Add _PyArg_NoStackKeywords() helper functionVictor Stinner2017-01-171-4/+21
| | | | | | | | | | | | | | | Issue #29286. Similar to _PyArg_NoKeywords(), but expects a tuple of keyword names, instead of a dict.
* | | Add _PyArg_ParseStack() helper functionVictor Stinner2017-01-171-21/+69
| | | | | | | | | | | | | | | Issue #29286. Function similar to PyArg_ParseTuple(), but uses a C array of PyObject* to pass arguments. Don't support the compatibility mode.
* | | Rename _PyArg_ParseStack to _PyArg_ParseStackAndKeywordsVictor Stinner2017-01-173-5/+5
| | | | | | | | | | | | Issue #29286.
* | | Rename keywords to kwargs in getargs.cVictor Stinner2017-01-161-31/+31
| | | | | | | | | | | | Issue #29029. Patch written by Serhiy Storchaka.
* | | Cleanup getargs.cVictor Stinner2017-01-161-49/+17
| | | | | | | | | | | | | | | | | | | | | Factorize argument checks in: * vgetargskeywordsfast() * vgetargskeywordsfast_impl()
* | | __build_class__() builtin uses METH_FASTCALLVictor Stinner2017-01-161-15/+9
| | |
* | | Issue #26110: Add document for LOAD_METHOD and CALL_METHOD opcode.INADA Naoki2017-01-161-40/+32
| | | | | | | | | | | | Changed stack layout bit for "easy to explain."
* | | _PyEval_EvalCodeWithName(): remove redundant checkVictor Stinner2017-01-111-1/+2
| | | | | | | | | | | | Replace the runtime check with an assertion (just in case).
* | | Inline call_function()Victor Stinner2017-01-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | Issue #29157: enhance py_getrandom() documentationVictor Stinner2017-01-061-13/+20
| | |
* | | py_getentropy() now supports ENOSYS, EPERM & EINTRVictor Stinner2017-01-061-3/+39
| | | | | | | | | | | | Issue #29157.
* | | Issue #29157: getrandom() is now preferred over getentropy()Victor Stinner2017-01-061-44/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | Issue #29157: Simplify dev_urandom()Victor Stinner2017-01-061-29/+87
| | | | | | | | | | | | | | | | | | pyurandom() is now responsible to call getentropy() or getrandom(). Enhance also dev_urandom() and pyurandom() documentation.
* | | Issue #29157: dev_urandom() now calls py_getentropy()Victor Stinner2017-01-061-20/+16
| | | | | | | | | | | | | | | Prepare the fallback to support getentropy() failure and falls back on reading from /dev/urandom.
* | | Optimize _PyFunction_FastCallDict() when kwargs is {}Victor Stinner2017-01-031-3/+5
| | | | | | | | | | | | | | | Issue #28839: Optimize _PyFunction_FastCallDict() when kwargs is an empty dictionary, avoid the creation of an useless empty tuple.
* | | merge 3.6 (#29057)Benjamin Peterson2017-01-021-1/+1
|\ \ \ | |/ /
| * | merge 3.5 (#29057)Benjamin Peterson2017-01-021-1/+1
| |\ \ | | |/
| | * only include sys/random.h if it seems like it might have something useful ↵Benjamin Peterson2017-01-021-1/+1
| | | | | | | | | | | | (#29057)
* | | merge 3.6Benjamin Peterson2017-01-021-1/+1
|\ \ \ | |/ /
| * | merge 3.5Benjamin Peterson2017-01-021-1/+1
| |\ \ | | |/
| | * merge 3.4Benjamin Peterson2017-01-021-1/+1
| | |\
| | | * merge 3.3Benjamin Peterson2017-01-021-1/+1
| | | |\
| | | | * ring in 2017 for PythonBenjamin Peterson2017-01-021-1/+1
| | | | |
* | | | | Issue #29049: Remove unnecessary Py_DECREFINADA Naoki2016-12-261-1/+1
| | | | |
* | | | | Issue #29049: Fix refleak introduced by f5eb0c4f5d37.INADA Naoki2016-12-261-1/+4
| | | | |
* | | | | Issue #29049: Call _PyObject_GC_TRACK() lazily when calling Python function.INADA Naoki2016-12-241-10/+21
| | | | | | | | | | | | | | | | | | | | Calling function is up to 5% faster.
* | | | | merge 3.6 (#28932)Benjamin Peterson2016-12-201-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | merge 3.5 (#28932)Benjamin Peterson2016-12-201-1/+1
| |\ \ \ \ | | |/ / /
| | * | | add a specific configure check for sys/random.h (closes #28932)Benjamin Peterson2016-12-201-1/+1
| | | | |
* | | | | Issue #25677: Merge SyntaxError caret positioning from 3.6Martin Panter2016-12-192-5/+2
|\ \ \ \ \ | |/ / / /
| * | | | Issue #25677: Merge SyntaxError caret positioning from 3.5Martin Panter2016-12-192-5/+2
| |\ \ \ \ | | |/ / /
| | * | | Issue #25677: Correct syntax error caret for indented blocks.Martin Panter2016-12-112-5/+2
| | | | | | | | | | | | | | | | | | | | Based on patch by Michael Layzell.