Commit Graph

598 Commits

Author SHA1 Message Date
Victor Stinner 463b86a881 Issue #27809: Use _PyObject_FastCallDict()
Modify:

* init_subclass()
* builtin___build_class__()

Fix also a bug in init_subclass(): check for super() failure.
2016-08-22 23:33:13 +02:00
Victor Stinner 2990fa11bc Issue #27809: Use _PyObject_FastCallDict()
Modify:

* builtin_sorted()
* classmethoddescr_call()
* methoddescr_call()
* wrapperdescr_call()
2016-08-22 23:21:55 +02:00
Serhiy Storchaka 2954f83999 - Issue #27332: Fixed the type of the first argument of module-level functions
generated by Argument Clinic.  Patch by Petr Viktorin.
2016-07-07 18:20:03 +03:00
Serhiy Storchaka 1a2b24f02d Issue #27332: Fixed the type of the first argument of module-level functions
generated by Argument Clinic.  Patch by Petr Viktorin.
2016-07-07 17:35:15 +03:00
Serhiy Storchaka cfdfbb4d3c Issue #27342: Replaced some Py_XDECREFs with Py_DECREFs.
Patch by Xiang Zhang.
2016-06-18 09:44:03 +03:00
Serhiy Storchaka 24182a3aaa Restored parameter name "self" since gdb needs exact specific parameter names. 2016-05-05 16:21:35 +03:00
Serhiy Storchaka 7a9579c0ce Got rid of redundand "self" parameter declarations.
Argument Clinic is now able to infer all needed information.
2016-05-02 13:45:20 +03:00
Serhiy Storchaka 2e310b4c38 Regenerate Argument Clinic code for issue #26874. 2016-05-01 20:34:00 +03:00
Serhiy Storchaka df071730bb Regenerate Argument Clinic code for issue #26874. 2016-05-01 20:33:24 +03:00
Zachary Ware 5031a67821 Closes #26874: Merge with 3.5 2016-04-28 14:40:08 -05:00
Zachary Ware 7f227d9087 Issue #26874: Simplify the divmod docstring 2016-04-28 14:39:50 -05:00
Zachary Ware 54559b6511 Closes #26874: Merge with 3.5 2016-04-28 14:25:32 -05:00
Zachary Ware 4d4160af6a Issue #26874: Fix divmod docstring 2016-04-28 14:24:55 -05:00
Serhiy Storchaka 21a663ea28 Issue #26057: Got rid of nonneeded use of PyUnicode_FromObject(). 2016-04-13 15:37:23 +03:00
Martin Panter 9513ba3b8f Issue #24802: Merge null termination fixes from 3.5 2015-11-07 03:15:32 +00:00
Martin Panter 61d6e4ae9d Issue #24802: Merge null termination fixes from 3.4 into 3.5 2015-11-07 02:56:11 +00:00
Martin Panter eeb896c411 Issue #24802: Copy bytes-like objects to null-terminated buffers if necessary
This avoids possible buffer overreads when int(), float(), compile(), exec()
and eval() are passed bytes-like objects. Similar code is removed from the
complex() constructor, where it was not reachable.

Patch by John Leitch, Serhiy Storchaka and Martin Panter.
2015-11-07 02:32:21 +00:00
Martin Panter 5344da5c0d Issue #24402: Merge input() fix from 3.5 2015-10-10 02:09:41 +00:00
Martin Panter e02f8fc44d Issue #24402: Merge input() fix from 3.4 into 3.5 2015-10-10 01:55:23 +00:00
Martin Panter c9a6ab56cf Issue #24402: Fix input() when stdout.fileno() fails; diagnosed by Eryksun
Also factored out some test cases into a new PtyTests class.
2015-10-10 01:25:38 +00:00
Raymond Hettinger bd5f0e8c1c Hoist constant expression out of the inner loop. 2015-10-09 01:34:08 -04:00
Raymond Hettinger 5098b58381 Make comparison more consistent 2015-10-09 00:42:47 -04:00
Raymond Hettinger 501b4a7398 Use PyTuple_GET_SIZE like the adjacent code does. 2015-08-18 08:07:16 -07:00
Raymond Hettinger f109414094 Inline PyIter_Next() matching the other itertools code. 2015-08-18 00:20:20 -07:00
Serhiy Storchaka 8b2e8b6cce Specify default values of semantic booleans in Argument Clinic generated signatures as booleans. 2015-05-30 11:30:39 +03:00
Serhiy Storchaka 7e810a6e3d Use converter names instead of format units in Argument Clinic descriptions
in builtin and _crypt modules.
2015-05-30 11:09:35 +03:00
Larry Hastings 89964c48d1 Issue #23944: Argument Clinic now wraps long impl prototypes at column 78. 2015-04-14 18:07:59 -04:00
Serhiy Storchaka 1009bf18b3 Issue #23501: Argumen Clinic now generates code into separate files by default. 2015-04-03 23:53:51 +03:00
Victor Stinner 0c39b1b970 Initialize variables to prevent GCC warnings 2015-03-18 15:02:06 +01:00
Serhiy Storchaka 3dd3e26680 Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
and PyObject_AsWriteBuffer().
2015-02-03 01:25:42 +02:00
Serhiy Storchaka 4fdb68491e Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
and PyObject_AsWriteBuffer().
2015-02-03 01:21:08 +02:00
Serhiy Storchaka d8a1447c99 Issue #22215: Now ValueError is raised instead of TypeError when str or bytes
argument contains not permitted null character or byte.
2014-09-06 20:07:17 +03:00
Nick Coghlan f9e227e5a9 Issue #20184: Add signature introspection for 30 of the builtins
Also adds a test to test_inspect to track progress on builtin
introspection support, to ensure it doesn't regress in the future.
2014-08-17 14:01:19 +10:00
Victor Stinner 98ea54c35c Issue #22156: Fix "comparison between signed and unsigned integers" compiler
warnings in the Python/ subdirectory.
2014-08-15 23:30:40 +02:00
Zachary Ware 9b33872812 Issue #22146: Fix typo in __build_class__ error message 2014-08-05 14:01:10 -05:00
Terry Jan Reedy f2fb73f675 Issue #19362: Tweek len() doc and docstring to expand the indicated range of
arguments. Original patch by Gareth Rees.
2014-06-16 03:05:37 -04:00
Raymond Hettinger 2a54582d72 Issue 20620: Update the min()/max() docs for the new default argument.
Patch provided by Berker Peksag.
2014-05-19 22:20:52 +01:00
Benjamin Peterson 5edbb7b7a4 correct len signature in docstring (closes #21294) 2014-04-18 01:03:59 -04:00
Larry Hastings 5c66189e88 Issue #20189: Four additional builtin types (PyTypeObject,
PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
have been modified to provide introspection information for builtins.
Also: many additional Lib, test suite, and Argument Clinic fixes.
2014-01-24 06:17:25 -08:00
Benjamin Peterson d45a46b60d merge 3.3 (#19910) 2013-12-06 20:12:51 -05:00
Benjamin Peterson 933142a8f2 document that compile() can take bytes (closes #19910) 2013-12-06 20:12:39 -05:00
Zachary Ware a4b7a7548c Issue #3158: doctest can now find doctests in functions and methods
written in C.

As a part of this, a few doctests have been added to the builtins module
(on hex(), oct(), and bin()), a doctest has been fixed (hopefully on all
platforms) on float, and test_builtins now runs doctests in builtins.
2013-11-24 01:19:09 -06:00
Victor Stinner bd303c165b Issue #19512, #19515: remove shared identifiers, move identifiers where they
are used.

Move also _Py_IDENTIFIER() defintions to the top in modified files to remove
identifiers duplicated in the same file.
2013-11-07 23:07:29 +01:00
Victor Stinner eaa2883d15 Issue #19512: builtin print() function uses an identifier instead of literal
string "flush" to call the flush method
2013-11-07 00:01:51 +01:00
Victor Stinner ae9f161b43 Issue #19512: __build_class() builtin now uses an identifier for the "metaclass" string 2013-11-06 22:46:51 +01:00
Victor Stinner 090543736f Issue #19512: add some common identifiers to only create common strings once,
instead of creating temporary Unicode string objects

Add also more identifiers in pythonrun.c to avoid temporary Unicode string
objets for the interactive interpreter.
2013-11-06 22:41:44 +01:00
Victor Stinner b44562b6b9 Issue #19512: eval() and exec() now use an identifier for "__builtins__" string 2013-11-06 19:03:11 +01:00
Victor Stinner 41bb43a71e Issue #18408: Add a new PyFrame_FastToLocalsWithError() function to handle
exceptions when merging fast locals into f_locals of a frame.
PyEval_GetLocals() now raises an exception and return NULL on failure.
2013-10-29 01:19:37 +01:00
Serhiy Storchaka c679227e31 Issue #1772673: The type of `char*` arguments now changed to `const char*`. 2013-10-19 21:03:34 +03:00
Serhiy Storchaka 46e1ce214b Issue #18783: Removed existing mentions of Python long type in docstrings,
error messages and comments.
2013-08-27 20:17:03 +03:00