summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* bpo-6532: Make the thread id an unsigned integer. (#781)Serhiy Storchaka2017-03-238-45/+47
| | | | | | | | | | | * bpo-6532: Make the thread id an unsigned integer. From C API side the type of results of PyThread_start_new_thread() and PyThread_get_thread_ident(), the id parameter of PyThreadState_SetAsyncExc(), and the thread_id field of PyThreadState changed from "long" to "unsigned long". * Restore a check in thread_get_ident().
* bpo-29859: Fix error messages from return codes for pthread_* calls (GH-741)Daniel Birnstiel2017-03-211-11/+13
|
* bpo-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. ↵Serhiy Storchaka2017-03-211-1/+1
| | | | (#748)
* bpo-29849: fix a memory leak in import_from (GH-712)Xiang Zhang2017-03-211-10/+17
|
* bpo-29748: Added the slice index converter in Argument Clinic. (#549)Serhiy Storchaka2017-03-191-0/+7
|
* bpo-8256: Fixed possible failing or crashing input() (#517)Serhiy Storchaka2017-03-121-5/+16
| | | | | if attributes "encoding" or "errors" of sys.stdin or sys.stdout are not set or are not strings.
* bpo-24037: Add Argument Clinic converter `bool(accept={int})`. (#485)Serhiy Storchaka2017-03-121-2/+2
|
* bpo-20185: Convert the marshal module to Argument Clinic. (#541)Serhiy Storchaka2017-03-122-67/+229
| | | Based on patch by Vajrasky Kok.
* bpo-29746: Update marshal docs to Python 3. (#547)Serhiy Storchaka2017-03-121-14/+12
|
* bpo-29770: remove outdated PYO related info (GH-590)Xiang Zhang2017-03-111-1/+1
|
* bpo-29619: Convert st_ino using unsigned integer (#557)Victor Stinner2017-03-091-2/+2
| | | | bpo-29619: os.stat() and os.DirEntry.inodeo() now convert inode (st_ino) using unsigned integers.
* Use Py_RETURN_FALSE/Py_RETURN_TRUE rather than ↵Serhiy Storchaka2017-03-081-1/+1
| | | | PyBool_FromLong(0)/PyBool_FromLong(1). (#567)
* bpo-29676: fix lsprof can't profile C method call. (GH523)INADA Naoki2017-03-071-1/+14
| | | | | | | | | | 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.
* bpo-27593: Get SCM build info from git instead of hg. (#446)Ned Deily2017-03-041-3/+3
| | | | | | | 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.
* bpo-28893: Set __cause__ for errors in async iteration protocol (#407)Yury Selivanov2017-03-031-3/+3
|
* bpo-29655: Fixed possible reference leaks in `import *`. (#301)Matthias Bussonnier2017-02-261-1/+4
| | | Patch by Matthias Bussonnier.
* bpo-29622: Make AST constructor to accept less than enough number of ↵INADA Naoki2017-02-231-19/+17
| | | | | | | | | | | 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.
* bpo-28598: Support __rmod__ for RHS subclasses of str in % string formatting ↵Martijn Pieters2017-02-231-3/+9
| | | | | | | | 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. (#46)INADA Naoki2017-02-226-2945/+3012
| | | | | | | | | | | * 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 (#103)Matthias Bussonnier2017-02-221-4/+21
| | | | bpo-29546: Improve from-import error message with location
* bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX (#202)Matthieu Dartiailh2017-02-211-1/+1
|
* bpo-29556: Remove unused #include <langinfo.h> (#98)Yen Chi Hsuan2017-02-153-12/+0
| | | | | | 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
* bpo-29546: Set 'path' on ImportError for ``from ... import ...`` (GH-91)Matthias Bussonnier2017-02-151-2/+10
|
* bpo-29524: Add Objects/call.c file (#12)Victor Stinner2017-02-122-290/+3
| | | | | | | | | * 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.
* Backed out changeset f23fa1f7b68fVictor Stinner2017-02-102-3/+290
| | | | | Sorry, I didn't want to push this change before the review :-( I was pushing a change into the 2.7 branch.
* Issue #29465: Add Objects/call.c fileVictor Stinner2017-02-102-290/+3
| | | | | | | | | | * 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.
* Issue #29460: _PyArg_NoKeywords(), _PyArg_NoStackKeywords() andSerhiy Storchaka2017-02-061-0/+4
| | | | _PyArg_NoPositional() now are macros.
* Removed redundant Argument Clinic directives.Serhiy Storchaka2017-02-041-5/+0
|
* Issue #29263: LOAD_METHOD support for C methodsINADA Naoki2017-02-021-6/+6
| | | | Calling builtin method is at most 10% faster.
* Issue #29286: Rename private PyArg_UnpackStack_impl() to unpack_stack()Victor Stinner2017-02-011-12/+12
| | | | Rename also "l" argument to "nargs".
* Document that _PyFunction_FastCallDict() must copy kwargsVictor Stinner2017-02-011-0/+2
| | | | | Issue #29318: Caller and callee functions must not share the dictionary: kwargs must be copied.
* Issue #29369: Use Py_IDENTIFIER in Python-ast.cINADA Naoki2017-01-251-6/+12
|
* 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.