- 25 Aug, 2016 5 commits
-
-
Vinay Sajip authored
-
Vinay Sajip authored
-
Terry Jan Reedy authored
-
Terry Jan Reedy authored
-
Terry Jan Reedy authored
-
- 24 Aug, 2016 24 commits
-
-
Victor Stinner authored
Issue #27841: Add _PyObject_Call_Prepend() helper function to prepend an argument to existing arguments to call a function. This helper uses fast calls. Modify method_call() and slot_tp_new() to use _PyObject_Call_Prepend().
-
Victor Stinner authored
Pass stack, not unrelated and uninitialized args!
-
Victor Stinner authored
_Pickle_FastCall() is now fast again! The optimization was introduced in Python 3.2, removed in Python 3.4 and reintroduced in Python 3.6 (thanks to the new generic fastcall functions).
-
Victor Stinner authored
_PyObject_FastCallDict() only requires _Py_CheckFunctionResult() for the slow-path. Other cases already check for the result.
-
Victor Stinner authored
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.
-
Alexander Belopolsky authored
-
Berker Peksag authored
Noticed by Xiang Zhang.
-
Victor Stinner authored
Issue #27848: use Py_ssize_t rather than C int for the number of function positional and keyword arguments.
-
Terry Jan Reedy authored
-
Terry Jan Reedy authored
-
Berker Peksag authored
-
Berker Peksag authored
-
Berker Peksag authored
-
Berker Peksag authored
Patch by Jaysinh Shukla and Stéphane Wirtel.
-
Vinay Sajip authored
-
Martin Panter authored
-
Martin Panter authored
When the body object is a file, its size is no longer determined with fstat(), since that can report the wrong result (e.g. reading from a pipe). Instead, determine the size using seek(), or fall back to chunked encoding for unseekable files. Also, change the logic for detecting text files to check for TextIOBase inheritance, rather than inspecting the “mode” attribute, which may not exist (e.g. BytesIO and StringIO). The Content-Length for text files is no longer determined ahead of time, because the original logic could have been wrong depending on the codec and newline translation settings. Patch by Demian Brecht and Rolf Krahl, with a few tweaks by me.
-
Steven D'Aprano authored
-
Steven D'Aprano authored
Although nth roots of negative numbers are real for odd n, the statistics module doesn't make use of this. Remove support for negative roots from the private _nth_root function, which simplifies the test suite.
-
Steven D'Aprano authored
-
Steven D'Aprano authored
-
R David Murray authored
Patch by Christian Heimes, reviewed by Martin Panter.
-
R David Murray authored
-
R David Murray authored
Patch by SilengGhost.
-
- 23 Aug, 2016 11 commits
-
-
Victor Stinner authored
Use a small stack allocated in the C stack for up to 5 iterator functions, otherwise allocates a stack on the heap memory.
-
Victor Stinner authored
Issue #27809: * PyObject_CallMethodObjArgs(), _PyObject_CallMethodIdObjArgs() and PyObject_CallFunctionObjArgs() now use fast call to avoid the creation of a temporary tuple * Rename objargs_mktuple() to objargs_mkstack() * objargs_mkstack() now stores objects in a C array using borrowed references, instead of storing arguments into a tuple objargs_mkstack() uses a small buffer allocated on the C stack for 5 arguments or less, or allocates a buffer in the heap memory. Note: this change is different than the change 0e4f26083bbb, I fixed the test to decide if the small stack can be used or not. sizeof(PyObject**) was also replaced with sizeof(stack[0]) since the sizeof() was wrong (but gave the same result).
-
Victor Stinner authored
-
Victor Stinner authored
-
Victor Stinner authored
Issue #27809: * PyObject_CallMethodObjArgs(), _PyObject_CallMethodIdObjArgs() and PyObject_CallFunctionObjArgs() now use fast call to avoid the creation of a temporary tuple * Rename objargs_mktuple() to objargs_mkstack() * objargs_mkstack() now stores objects in a C array using borrowed references, instead of storing arguments into a tuple objargs_mkstack() uses a small buffer allocated on the C stack for 5 arguments or less, or allocates a buffer in the heap memory.
-
-
Guido van Rossum authored
-
Victor Stinner authored
Use a small stack allocated in the C stack for up to 5 iterator functions, otherwise allocates a stack on the heap memory.
-
Mark Dickinson authored
-
Alexander Belopolsky authored
-
Zachary Ware authored
-