| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
(#748)
|
| |
|
| |
|
|
|
|
|
| |
if attributes "encoding" or "errors" of sys.stdin or sys.stdout
are not set or are not strings.
|
| |
|
|
|
| |
Based on patch by Vajrasky Kok.
|
| |
|
| |
|
|
|
|
| |
bpo-29619: os.stat() and os.DirEntry.inodeo() now convert inode
(st_ino) using unsigned integers.
|
|
|
|
| |
PyBool_FromLong(0)/PyBool_FromLong(1). (#567)
|
|
|
|
|
|
|
|
|
|
| |
When LOAD_METHOD is used for calling C mehtod, PyMethodDescrObject
was passed to profilefunc from 5566bbb.
But lsprof traces only PyCFunctionObject. Additionally, there can be
some third party extension which assumes passed arg is
PyCFunctionObject without calling PyCFunction_Check().
So make PyCFunctionObject from PyMethodDescrObject when
tstate->c_profilefunc is set.
|
|
|
|
|
|
|
| |
sys.version and the platform module python_build(),
python_branch(), and python_revision() functions now use
git information rather than hg when building from a repo.
Based on original patches by Brett Cannon and Steve Dower.
|
| |
|
|
|
| |
Patch by Matthias Bussonnier.
|
|
|
|
|
|
|
|
|
|
|
| |
positional arguments (GH-249)
bpo-29463 added optional "docstring" field to 4 AST types.
While it is optional, it breaks backward compatibility because AST constructor
requires number of positional argument is same to number of fields.
AST types accepts empty arguments, and incomplete keyword arguments.
But it's not big problem because field can be filled after creation, and checked when compiling.
So stop requiring complete set of fields for positional arguments too.
|
|
|
|
|
|
|
|
| |
operations (#51)
When you use `'%s' % SubClassOfStr()`, where `SubClassOfStr.__rmod__` exists, the reverse operation is ignored as normally such string formatting operations use the `PyUnicode_Format()` fast path. This patch tests for subclasses of `str` first and picks the slow path in that case.
Patch by Martijn Pieters.
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-29463: Add docstring field to some AST nodes.
ClassDef, ModuleDef, FunctionDef, and AsyncFunctionDef has docstring
field for now. It was first statement of there body.
* fix document. thanks travis!
* doc fixes
|
|
|
|
| |
bpo-29546: Improve from-import error message with location
|
| |
|
|
|
|
|
|
| |
bltinmodule.c: Added in b744ba1 and no longer necessary since d64e8a7
posixmodule.c: Added in d1cd4d4 and no longer necessary since efb00c0
pythonrun.c: Added in 73d538b and no longer necessary since d600951
sysmodule.c: Added in 5467d4c and no longer necessary since a2c17c5
|
| |
|
|
|
|
|
|
|
|
|
| |
* Move all functions to call objects in a new Objects/call.c file.
* Rename fast_function() to _PyFunction_FastCallKeywords().
* Copy null_error() from Objects/abstract.c
* Inline type_error() in call.c to not have to copy it, it was only
called once.
* Export _PyEval_EvalCodeWithName() since it is now called
from call.c.
|
|
|
|
|
| |
Sorry, I didn't want to push this change before the review :-( I was pushing a
change into the 2.7 branch.
|
|
|
|
|
|
|
|
|
|
| |
* Move all functions to call objects in a new Objects/call.c file.
* Rename fast_function() to _PyFunction_FastCallKeywords().
* Copy null_error() from Objects/abstract.c
* Inline type_error() in call.c to not have to copy it, it was only
called once.
* Export _PyEval_EvalCodeWithName() since it is now called
from call.c.
|
|
|
|
| |
_PyArg_NoPositional() now are macros.
|
| |
|
|
|
|
| |
Calling builtin method is at most 10% faster.
|
|
|
|
| |
Rename also "l" argument to "nargs".
|
|
|
|
|
| |
Issue #29318: Caller and callee functions must not share the dictionary:
kwargs must be copied.
|
| |
|
|\
| |
| |
| | |
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.
|