summaryrefslogtreecommitdiff
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* 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-171-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-111-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-011-1/+1
|\
| * merge 3.5 (#29057)Benjamin Peterson2017-01-011-1/+1
| |\
| | * only include sys/random.h if it seems like it might have something useful ↵Benjamin Peterson2017-01-011-1/+1
| | | | | | | | | | | | (#29057)
* | | merge 3.6Benjamin Peterson2017-01-011-1/+1
|\ \ \ | |/ /
| * | merge 3.5Benjamin Peterson2017-01-011-1/+1
| |\ \ | | |/
| | * merge 3.4Benjamin Peterson2017-01-011-1/+1
| | |\
| | | * merge 3.3Benjamin Peterson2017-01-011-1/+1
| | | |\
| | | | * ring in 2017 for PythonBenjamin Peterson2017-01-011-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-191-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | merge 3.5 (#28932)Benjamin Peterson2016-12-191-1/+1
| |\ \ \ \ | | |/ / /
| | * | | add a specific configure check for sys/random.h (closes #28932)Benjamin Peterson2016-12-191-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.
* | | | | Issue #18896: Python function can now have more than 255 parameters.Serhiy Storchaka2016-12-162-6/+1
| | | | | | | | | | | | | | | | | | | | collections.namedtuple() now supports tuples with more than 255 elements.
* | | | | Issue #28959: Added private macro PyDict_GET_SIZE for retrieving the size of ↵Serhiy Storchaka2016-12-163-22/+14
| | | | | | | | | | | | | | | | | | | | dict.
* | | | | Merge 3.6.Xavier de Gaye2016-12-151-5/+5
|\ \ \ \ \ | |/ / / /
| * | | | Issue #26919: On Android, operating system data is now always encoded/decodedXavier de Gaye2016-12-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | to/from UTF-8, instead of the locale encoding to avoid inconsistencies with os.fsencode() and os.fsdecode() which are already using UTF-8.
* | | | | Add _PY_FASTCALL_SMALL_STACK constantVictor Stinner2016-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Issue #26110: Add LOAD_METHOD/CALL_METHOD opcodes.Yury Selivanov2016-12-135-481/+615
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | | | | Issue #28896: Disable WindowsRegistryFinder by default.Steve Dower2016-12-121-56/+53
|\ \ \ \ \ | |/ / / /
| * | | | Issue #28896: Disable WindowsRegistryFinder by default.Steve Dower2016-12-121-56/+53
| | | | |
* | | | | Issue #28739: f-string expressions no longer accepted as docstrings andSerhiy Storchaka2016-12-112-7/+7
|\ \ \ \ \ | |/ / / / | | | | | | | | | | by ast.literal_eval() even if they do not include subexpressions.
| * | | | Issue #28739: f-string expressions no longer accepted as docstrings andSerhiy Storchaka2016-12-112-7/+7
| | | | | | | | | | | | | | | | | | | | by ast.literal_eval() even if they do not include subexpressions.