| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Patch by Erik Welch.
|
| |\
| | |
| | |
| | | |
Patch by Erik Welch.
|
| | |
| | |
| | |
| | | |
Patch by Erik Welch.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | | |
possible. Patch is writen with Coccinelle.
|
| | | |
|
|\ \ \
| |/ / |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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.
|
| | |
| | |
| | |
| | | |
Issue #29259.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
PyArg_ParseTupleAndKeywords(), _PyArg_ParseTupleAndKeywordsFast() and like.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | | |
Issue #29286.
|
| | |
| | |
| | |
| | |
| | | |
Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling
convention for functions using only positional arguments.
|
| | |
| | |
| | |
| | |
| | | |
Issue #29286. Similar to _PyArg_NoKeywords(), but expects a tuple of keyword
names, instead of a dict.
|
| | |
| | |
| | |
| | |
| | | |
Issue #29286. Function similar to PyArg_ParseTuple(), but uses a C array of
PyObject* to pass arguments. Don't support the compatibility mode.
|
| | |
| | |
| | |
| | | |
Issue #29286.
|
| | |
| | |
| | |
| | | |
Issue #29029. Patch written by Serhiy Storchaka.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Factorize argument checks in:
* vgetargskeywordsfast()
* vgetargskeywordsfast_impl()
|
| | | |
|
| | |
| | |
| | |
| | | |
Changed stack layout bit for "easy to explain."
|
| | |
| | |
| | |
| | | |
Replace the runtime check with an assertion (just in case).
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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)
|
| | |
| | |
| | |
| | |
| | |
| | | |
pyurandom() is now responsible to call getentropy() or getrandom().
Enhance also dev_urandom() and pyurandom() documentation.
|
| | |
| | |
| | |
| | |
| | | |
Prepare the fallback to support getentropy() failure and falls back on reading
from /dev/urandom.
|
| | |
| | |
| | |
| | |
| | | |
Issue #28839: Optimize _PyFunction_FastCallDict() when kwargs is an empty
dictionary, avoid the creation of an useless empty tuple.
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | |
| | |
| | |
| | | |
(#29057)
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | |\ |
|
| | | |\ |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Calling function is up to 5% faster.
|
|\ \ \ \ \
| |/ / / / |
|
| |\ \ \ \
| | |/ / / |
|
| | | | | |
|
|\ \ \ \ \
| |/ / / / |
|
| |\ \ \ \
| | |/ / / |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Based on patch by Michael Layzell.
|