Commit Graph

98378 Commits

Author SHA1 Message Date
Victor Stinner 2a1b676d1f _PyObject_FastCallKeywords() now checks the result
Issue ##27830, Issue #29259.
2017-01-18 11:27:22 +01:00
Victor Stinner c52572319c Optimize methoddescr_call(): avoid temporary PyCFunction
Issue #29259, #29263. methoddescr_call() creates a PyCFunction object, call it
and the destroy it. Add a new _PyMethodDef_RawFastCallDict() method to avoid
the temporary PyCFunction object.
2017-01-18 10:38:09 +01:00
Victor Stinner 35ecebe165 Remove unused func parameter of _PyStack_UnpackDict()
Issue #29259.
2017-01-18 10:31:46 +01:00
Guido van Rossum 52f29591bc Issue #28556: merge 5 more typing changes from upstream (#340, #344, #348, #349, #350) (3.6->3.7) 2017-01-17 20:43:31 -08:00
Guido van Rossum 043a8bc72a Issue #28556: merge 5 more typing changes from upstream (#340, #344, #348, #349, #350) (3.5->3.6) 2017-01-17 20:43:30 -08:00
Guido van Rossum 83ec302e52 Issue #28556: merge 5 more typing changes from upstream (#340, #344, #348, #349, #350) 2017-01-17 20:43:28 -08:00
Gregory P. Smith 8128d5a491 Address a minor Coverity warning re: unchecked PyArg_ParseTuple calls
in socket.sendto().  A PyErr_Occurred() check was happening later, but
it is better to just use the return value and not call PyErr_Occurred().
2017-01-17 16:54:56 -08:00
Larry Hastings 5d37d63903 Merge from 3.5. 2017-01-17 01:05:10 -08:00
Larry Hastings e741e4f88e Merge from 3.4. 2017-01-17 01:01:19 -08:00
Larry Hastings 09e4ce5a95 Merge 3.5.3 release head with main 3.5 branch. 2017-01-17 00:56:40 -08:00
Larry Hastings c620f200d6 Post-release updates for 3.5.3. 2017-01-17 00:49:32 -08:00
Larry Hastings a52b0a474e Post-release updates for 3.4.6. 2017-01-17 00:49:13 -08:00
Raymond Hettinger e12c313f5e merge 2017-01-16 22:43:43 -08:00
Raymond Hettinger 80490525e0 Issue #29011: Fix an important omission by adding Deque to the typing module. 2017-01-16 22:42:37 -08:00
Victor Stinner aeaf294608 _hashopenssl uses METH_FASTCALL 2017-01-17 04:20:26 +01:00
Victor Stinner 5a60ecaa7a sorted() uses METH_FASTCALL 2017-01-17 15:17:49 +01:00
Victor Stinner fda6d0acf0 next() uses FASTCALL 2017-01-17 04:09:14 +01:00
Victor Stinner 84b388bb80 getattr() uses METH_FASTCALL 2017-01-17 03:52:27 +01:00
Serhiy Storchaka f672fc7dc1 Null merge 2017-01-17 12:47:18 +02:00
Larry Hastings ea32cb16d7 Merge from 3.6. 2017-01-17 01:06:09 -08:00
Serhiy Storchaka 1741441649 Issue #29029: Speed up processing positional arguments in
PyArg_ParseTupleAndKeywords(), _PyArg_ParseTupleAndKeywordsFast() and like.
2017-01-17 10:07:25 +02:00
Raymond Hettinger f6b96c7bb5 merge 2017-01-16 22:44:14 -08:00
Victor Stinner b05cbac052 Convert some OrderedDict methods to Argument Clinic
Issue #29289. Convert methods:

* fromkeys() class method
* setdefault()
* popitem()
* move_to_end()
2017-01-17 03:46:13 +01:00
Victor Stinner 0c4a828cad Run Argument Clinic: METH_VARARGS=>METH_FASTCALL
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.
2017-01-17 02:21:47 +01:00
Victor Stinner 093119e4eb Argument Clinic: Use METH_FASTCALL for boring positionals
Issue #29286. Use METH_FASTCALL calling convention instead of METH_VARARGS to
parse "boring" position arguments. METH_FASTCALL is faster since it avoids the
creation of a temporary tuple to pass positional arguments.

Replace PyArg_UnpackTuple() with _PyArg_UnpackStack()+_PyArg_NoStackKeywords().
2017-01-17 02:35:41 +01:00
Victor Stinner fe54dd8a08 Add _PyArg_UnpackStack() function helper
Issue #29286.
2017-01-17 02:33:55 +01:00
Victor Stinner 259f0e4437 Run Argument Clinic: METH_VARARGS=>METH_FASTCALL
Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling
convention for functions using only positional arguments.
2017-01-17 01:35:17 +01:00
Victor Stinner 0c8c3893ae Argument Clinic: Use METH_FASTCALL for positionals
Issue #29286. Use METH_FASTCALL calling convention instead of METH_VARARGS to
parse position arguments. METH_FASTCALL is faster since it avoids the creation
of a temporary tuple to pass positional arguments.
2017-01-17 01:42:54 +01:00
Victor Stinner 998c20962c _PyStack_UnpackDict() now returns -1 on error
Issue #29286. Change _PyStack_UnpackDict() prototype to be able to notify of
failure when args is NULL.
2017-01-17 01:57:29 +01:00
Victor Stinner 29d39cc8f5 Add _PyArg_NoStackKeywords() helper function
Issue #29286. Similar to _PyArg_NoKeywords(), but expects a tuple of keyword
names, instead of a dict.
2017-01-17 01:40:01 +01:00
Victor Stinner 6518a93cb1 Add _PyArg_ParseStack() helper function
Issue #29286. Function similar to PyArg_ParseTuple(), but uses a C array of
PyObject* to pass arguments. Don't support the compatibility mode.
2017-01-17 01:29:49 +01:00
Victor Stinner 3e1fad6913 Rename _PyArg_ParseStack to _PyArg_ParseStackAndKeywords
Issue #29286.
2017-01-17 01:29:01 +01:00
Victor Stinner c0083fc47d Rename keywords to kwargs in getargs.c
Issue #29029. Patch written by Serhiy Storchaka.
2017-01-17 00:37:42 +01:00
Victor Stinner d526cfe546 type_prepare() now uses fast call (METH_FASTCALL) 2017-01-16 23:52:00 +01:00
Victor Stinner 80ab22fa2c Cleanup getargs.c
Factorize argument checks in:

* vgetargskeywordsfast()
* vgetargskeywordsfast_impl()
2017-01-16 23:16:47 +01:00
Victor Stinner 773dc6dd06 __build_class__() builtin uses METH_FASTCALL 2017-01-16 23:46:26 +01:00
Victor Stinner 69de71b255 Add _PyStack_AsTupleSlice() helper 2017-01-16 23:50:53 +01:00
Victor Stinner 7fc252adfb Optimize _PyCFunction_FastCallKeywords()
Issue #29259: Write fast path in _PyCFunction_FastCallKeywords() for
METH_FASTCALL, avoid the creation of a temporary dictionary for keyword
arguments.

Cleanup also _PyCFunction_FastCallDict():

* Don't dereference func before checking that it's not NULL
* Move code to raise the "no keyword argument" exception into a new
  no_keyword_error label.

Update python-gdb.py for the change.
2017-01-16 17:18:53 +01:00
INADA Naoki 15f94596b6 Issue #20180: forgot to update AC output. 2017-01-16 21:49:13 +09:00
INADA Naoki 3ae2056512 Issue #20180: convert unicode methods to AC. 2017-01-16 20:41:20 +09:00
INADA Naoki 015bce64b3 Issue #26110: Add document for LOAD_METHOD and CALL_METHOD opcode.
Changed stack layout bit for "easy to explain."
2017-01-16 17:23:30 +09:00
Larry Hastings db413f2df5 Added tag v3.4.6 for changeset b662f4776921 2017-01-16 00:20:40 -08:00
Larry Hastings 56e9ee07f4 Added tag v3.5.3 for changeset 1880cb95a742 2017-01-16 00:20:31 -08:00
Larry Hastings 7f10edebf0 Version bump for Python 3.4.6. 2017-01-16 00:19:54 -08:00
Larry Hastings 51ba5b7d0c Version bump for Python 3.5.3. 2017-01-16 00:19:36 -08:00
Benjamin Peterson 510df6f272 merge 3.6 2017-01-16 00:05:54 -08:00
Benjamin Peterson 741c45adab merge 3.5 2017-01-16 00:05:47 -08:00
Benjamin Peterson a105dd3dc0 generate spaces instead of tabs into config.c 2017-01-16 00:05:12 -08:00
Vinay Sajip fc4b438163 Closes #29132: Merged fix from 3.6. 2017-01-15 10:07:56 +00:00
Vinay Sajip 61eda7260a Fixed #29132: Updated shlex to work better with punctuation chars in POSIX mode.
Thanks to Evan_ for the report and patch.
2017-01-15 10:06:52 +00:00