summaryrefslogtreecommitdiff
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Closes issue 27921: Disallow backslashes anywhere in f-strings. This is a ↵Eric V. Smith2016-09-031-0/+10
| | | | temporary restriction. In 3.6 beta 2, the plan is to again allow backslashes in the string parts of f-strings, but disallow them in the expression parts.
* MergeRaymond Hettinger2016-09-031-1/+1
|\
| * Issue 27936: Fix inconsistent round() behavior between float and intRaymond Hettinger2016-09-031-1/+1
| |
* | MergeRaymond Hettinger2016-08-3139-6639/+8949
|\ \ | |/ |/|
| * Issue #27895: Spelling fixes (Contributed by Ville Skytt?).Raymond Hettinger2016-08-303-8/+8
| |
| * Issue #27818: Speed up parsing width and precision in format() strings forSerhiy Storchaka2016-08-291-9/+16
| | | | | | | | numbers. Patch by Stefan Behnel.
| * MergeRaymond Hettinger2016-08-2538-6622/+8925
| |\
| | * Issue #27830: Revert, remove _PyFunction_FastCallKeywords()Victor Stinner2016-08-251-6/+6
| | |
| | * Add _PyObject_FastCallKeywords()Victor Stinner2016-08-251-9/+14
| | | | | | | | | | | | | | | | | | Issue #27830: Similar to _PyObject_FastCallDict(), but keyword arguments are also passed in the same C array than positional arguments, rather than being passed as a Python dict.
| | * Use Py_ssize_t type for number of argumentsVictor Stinner2016-08-252-84/+115
| | | | | | | | | | | | | | | Issue #27848: use Py_ssize_t rather than C int for the number of function positional and keyword arguments.
| | * Issue #27809: map_next() uses fast callVictor Stinner2016-08-241-15/+31
| | | | | | | | | | | | | | | Use a small stack allocated in the C stack for up to 5 iterator functions, otherwise allocates a stack on the heap memory.
| | * Backed out changeset 70f88b097f60 (map_next)Victor Stinner2016-08-241-31/+15
| | |
| | * Issue #27809: map_next() uses fast callVictor Stinner2016-08-231-15/+31
| | | | | | | | | | | | | | | Use a small stack allocated in the C stack for up to 5 iterator functions, otherwise allocates a stack on the heap memory.
| | * Issue #27809: builtin___build_class__() uses fast callVictor Stinner2016-08-231-6/+2
| | |
| | * PyEval_CallObjectWithKeywords() doesn't inc/decrefVictor Stinner2016-08-231-7/+1
| | | | | | | | | | | | | | | | | | Issue #27809: PyEval_CallObjectWithKeywords() doesn't increment temporary the reference counter of the args tuple (positional arguments). The caller already holds a strong reference to it.
| | * Issue #27809: PyErr_SetImportError() uses fast callVictor Stinner2016-08-231-14/+8
| | |
| | * Add _PyErr_CreateException()Victor Stinner2016-08-221-30/+29
| | | | | | | | | | | | | | | Issue #27809: Helper function optimized to create an exception: use fastcall whenever possible.
| | * Issue #27809: Use _PyObject_FastCallDict()Victor Stinner2016-08-221-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Modify: * init_subclass() * builtin___build_class__() Fix also a bug in init_subclass(): check for super() failure.
| | * PyEval_CallObjectWithKeywords() uses fast call with kwargsVictor Stinner2016-08-221-12/+4
| | | | | | | | | | | | | | | Issue #27809. _PyObject_FastCallDict() now supports keyword arguments, and so the args==NULL fast-path can also be used when kwargs is not NULL.
| | * Issue #27809: Use _PyObject_FastCallDict()Victor Stinner2016-08-221-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Modify: * builtin_sorted() * classmethoddescr_call() * methoddescr_call() * wrapperdescr_call()
| | * Issue #27809: Cleanup _PyEval_EvalCodeWithName()Victor Stinner2016-08-221-15/+13
| | | | | | | | | | | | | | | * Rename nm to name * PEP 7: add { ... } to if/else blocks
| | * _PyFunction_FastCallDict() supports keyword argsVictor Stinner2016-08-221-9/+41
| | | | | | | | | | | | | | | | | | | | | | | | Issue #27809: * Rename _PyFunction_FastCall() to _PyFunction_FastCallDict() * Rename _PyCFunction_FastCall() to _PyCFunction_FastCallDict() * _PyFunction_FastCallDict() now supports keyword arguments
| | * Rename _PyObject_FastCall() to _PyObject_FastCallDict()Victor Stinner2016-08-223-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Issue #27809: * Rename _PyObject_FastCall() function to _PyObject_FastCallDict() * Add _PyObject_FastCall(), _PyObject_CallNoArg() and _PyObject_CallArg1() macros calling _PyObject_FastCallDict()
| | * Issue #27587: Merge from 3.5Berker Peksag2016-08-2237-6448/+8707
| | |\
| | | * Optimize call to Python function without argumentVictor Stinner2016-08-221-11/+31
| | | | | | | | | | | | | | | | | | | | | | | | Issue #27128. When a Python function is called with no arguments, but all parameters have a default value: use default values as arguments for the fast path.
| | | * Fix reference leak in tb_printinternal()Victor Stinner2016-08-201-0/+2
| | | | | | | | | | | | | | | | Issue #26823.
| | | * sys_pyfile_write_unicode() now uses fast callVictor Stinner2016-08-201-7/+2
| | | | | | | | | | | | | | | | Issue #27128.
| | | * call_trampoline() now uses fast callVictor Stinner2016-08-201-19/+10
| | | | | | | | | | | | | | | | Issue #27128.
| | | * PyErr_PrintEx() now uses fast callVictor Stinner2016-08-201-3/+7
| | | | | | | | | | | | | | | | Issue #27128.
| | | * import_name() now uses fast callVictor Stinner2016-08-201-13/+9
| | | | | | | | | | | | | | | | | | | | Issue #27128: import_name() now calls _PyObject_FastCall() to avoid the creation of a temporary tuple.
| | | * Fix PyObject_Call() parameter namesVictor Stinner2016-08-191-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | Issue #27128: arg=>args, kw=>kwargs. Same change for PyEval_CallObjectWithKeywords().
| | | * PyEval_CallObjectWithKeywords() uses fast callVictor Stinner2016-08-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Issue #27128: Modify PyEval_CallObjectWithKeywords() to use _PyObject_FastCall() when args==NULL and kw==NULL. It avoids the creation of a temporary empty tuple for positional arguments.
| | | * Add _PyObject_FastCall()Victor Stinner2016-08-191-46/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #27128: Add _PyObject_FastCall(), a new calling convention avoiding a temporary tuple to pass positional parameters in most cases, but create a temporary tuple if needed (ex: for the tp_call slot). The API is prepared to support keyword parameters, but the full implementation will come later (_PyFunction_FastCall() doesn't support keyword parameters yet). Add also: * _PyStack_AsTuple() helper function: convert a "stack" of parameters to a tuple. * _PyCFunction_FastCall(): fast call implementation for C functions * _PyFunction_FastCall(): fast call implementation for Python functions
| | | * Merge 3.5 (fix raise)Victor Stinner2016-08-1837-6363/+8542
| | | |\
| | | | * Issue #27594: Prevent assertion error when running test_ast with coverageNed Deily2016-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | enabled: ensure code object has a valid first line number. Patch suggested by Ivan Levkivskyi.
| | | | * Use Py_ssize_t in _PyEval_EvalCodeWithName()Victor Stinner2016-08-161-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #27128, #18295: replace int type with Py_ssize_t for index variables used for positional arguments. It should help to avoid integer overflow and help to emit better machine code for "i++" (no trap needed for overflow). Make also the total_args variable constant.
| | | | * Issue #27128: Cleanup _PyEval_EvalCodeWithName()Victor Stinner2016-08-161-11/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add comments * Add empty lines for readability * PEP 7 style for if block * Remove useless assert(globals != NULL); (globals is tested a few lines before)
| | | | * Issue #27776: dev_urandom(raise=0) now closes the file descriptor on errorVictor Stinner2016-08-161-0/+1
| | | | |
| | | | * Issue #27776: Cleanup random.cVictor Stinner2016-08-161-121/+110
| | | | | | | | | | | | | | | | | | | | | | | | | Merge dev_urandom_python() and dev_urandom_noraise() functions to reduce code duplication.
| | | | * Issue #27776: _PyRandom_Init() doesn't call PyErr_CheckSignals() anymoreVictor Stinner2016-08-161-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify py_getrandom() to not call PyErr_CheckSignals() if raise is zero. _PyRandom_Init() is called very early in the Python initialization, so it's safer to not call PyErr_CheckSignals().
| | | | * Issue #27776: Cleanup random.cVictor Stinner2016-08-161-55/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add pyurandom() helper function to factorize the code * don't call Py_FatalError() in helper functions, but only in _PyRandom_Init() if pyurandom() failed, to uniformize the code
| | | | * Issue #26823: Abbreviate recursive tracebacksNick Coghlan2016-08-151-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Large sections of repeated lines in tracebacks are now abbreviated as "[Previous line repeated {count} more times]" by both the traceback module and the builtin traceback rendering. Patch by Emanuel Barry.
| | | | * Issue #27574: Decreased an overhead of parsing keyword arguments in functionsSerhiy Storchaka2016-08-143-15/+442
| | | | | | | | | | | | | | | | | | | | implemented with using Argument Clinic.
| | | | * Re-linewrap commentsRaymond Hettinger2016-08-071-13/+8
| | | | |
| | | | * Merge spelling and grammar fixes from 3.5Martin Panter2016-08-051-1/+1
| | | | |\
| | | | * | Issue #22557: Now importing already imported modules is up to 2.5 times faster.Serhiy Storchaka2016-08-024-246/+235
| | | | | |
| | | | * | Issue #17596: MINGW: add wincrypt.h in Python/random.cMartin Panter2016-07-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Based on patch by Roumen Petrov.
| | | | * | Issue #16191: Merge comment fixes from 3.5Martin Panter2016-07-1837-5991/+7682
| | | | |\ \
| | | | | * \ Issue #27419: Added temporary workaround for subinterpreters.Serhiy Storchaka2016-07-1737-5991/+7682
| | | | | |\ \
| | | | | | * \ Issue #27419: Standard __import__() no longer look up "__import__" in globalsSerhiy Storchaka2016-07-171-8/+4
| | | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | or builtins for importing submodules or "from import". Fixed a crash if raise a warning about unabling to resolve package from __spec__ or __package__.