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.
10 years ago
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.
10 years ago
Serhiy Storchaka
8b2e8b6cce
Specify default values of semantic booleans in Argument Clinic generated signatures as booleans.
11 years ago
Serhiy Storchaka
7e810a6e3d
Use converter names instead of format units in Argument Clinic descriptions
in builtin and _crypt modules.
11 years ago
Larry Hastings
89964c48d1
Issue #23944 : Argument Clinic now wraps long impl prototypes at column 78.
11 years ago
Serhiy Storchaka
1009bf18b3
Issue #23501 : Argumen Clinic now generates code into separate files by default.
11 years ago
Victor Stinner
0c39b1b970
Initialize variables to prevent GCC warnings
11 years ago
Serhiy Storchaka
4fdb68491e
Issue #22896 : Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
and PyObject_AsWriteBuffer().
11 years ago
Serhiy Storchaka
d8a1447c99
Issue #22215 : Now ValueError is raised instead of TypeError when str or bytes
argument contains not permitted null character or byte.
11 years ago
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.
12 years ago
Victor Stinner
98ea54c35c
Issue #22156 : Fix "comparison between signed and unsigned integers" compiler
warnings in the Python/ subdirectory.
12 years ago
Zachary Ware
9b33872812
Issue #22146 : Fix typo in __build_class__ error message
12 years ago
Terry Jan Reedy
f2fb73f675
Issue #19362 : Tweek len() doc and docstring to expand the indicated range of
arguments. Original patch by Gareth Rees.
12 years ago
Raymond Hettinger
2a54582d72
Issue 20620: Update the min()/max() docs for the new default argument.
Patch provided by Berker Peksag.
12 years ago
Benjamin Peterson
5edbb7b7a4
correct len signature in docstring ( closes #21294 )
12 years ago
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.
12 years ago
Benjamin Peterson
933142a8f2
document that compile() can take bytes ( closes #19910 )
12 years ago
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.
12 years ago
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.
12 years ago
Victor Stinner
eaa2883d15
Issue #19512 : builtin print() function uses an identifier instead of literal
string "flush" to call the flush method
12 years ago
Victor Stinner
ae9f161b43
Issue #19512 : __build_class() builtin now uses an identifier for the "metaclass" string
12 years ago
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.
12 years ago
Victor Stinner
b44562b6b9
Issue #19512 : eval() and exec() now use an identifier for "__builtins__" string
12 years ago
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.
12 years ago
Serhiy Storchaka
c679227e31
Issue #1772673 : The type of `char*` arguments now changed to `const char*`.
12 years ago
Serhiy Storchaka
9594942716
Issue #18783 : Removed existing mentions of Python long type in docstrings,
error messages and comments.
13 years ago
Victor Stinner
14e461d5b9
Close #11619 : The parser and the import machinery do not encode Unicode
filenames anymore on Windows.
13 years ago
Christian Heimes
704e2d374f
Issue #18560 : Fix potential NULL pointer dereference in sum()
13 years ago
Victor Stinner
1e53bbaced
Issue #18408 : handle PySys_GetObject() failure, raise a RuntimeError
13 years ago
R David Murray
87ead1138d
#18424 : PEP8ify the tense of the sum docstring.
13 years ago
Raymond Hettinger
4d6018fe45
Issue 18111: Add a default argument to min() and max()
13 years ago
Benjamin Peterson
e8e14591eb
rather than passing locals to the class body, just execute the class body in the proper environment
13 years ago
Benjamin Peterson
214a7d2674
properly lookup the __round__ special method ( closes #17722 )
13 years ago
Serhiy Storchaka
278d03bd66
Revert a premature patch for issue #14010 (changeset aaaf36026511).
13 years ago
Serhiy Storchaka
e8f706eda7
Issue #14010 : Fix a crash when iterating or deleting deeply nested filters
(builting and in itertools module, i.e. map(), itertools.chain(), etc).
13 years ago
Richard Oudkerk
614c578dec
Issue #17619 : Make input() check for Ctrl-C correctly on Windows.
13 years ago
Ezio Melotti
b19ed57d8d
#17178 : update any()/all() docstrings to document their behavior with empty iterables. Patch by Ankur Ankan.
13 years ago
Ezio Melotti
94bf697b01
#17178 : update any()/all() docstrings to document their behavior with empty iterables. Patch by Ankur Ankan.
13 years ago
Philip Jenvey
f76f0eea5c
compile doesn't accept code objects
13 years ago
Ezio Melotti
3c76aa6b23
Remove unused variabile "plain" in builtin_exec.
13 years ago
Benjamin Peterson
42124a727d
initialize map/filter/zip in _PyBuiltin_Init rather than the catch-all function
13 years ago
Chris Jerdonek
ad4b000179
Issue #14783 : Backport changes from 3.2.
13 years ago
Stefan Krah
a8857af37b
Issue #15741 : Fix potential NULL dereference. Found by Coverity.
14 years ago
Stefan Krah
07795df683
Issue #15741 : Fix potential NULL dereference. Found by Coverity.
14 years ago
Antoine Pitrou
6f430e4963
Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly.
Patch by Serhiy Storchaka.
14 years ago
Antoine Pitrou
c5bef75c77
Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly.
Patch by Serhiy Storchaka.
14 years ago
Senthil Kumaran
e9175bd0af
Fix issue #15607 : Update the print builtin function docstring with the new flush keyword.
Patch contributed by Daniel Ellis.
14 years ago
Brett Cannon
cb4996afe4
Issue #15471 : Don't use mutable object as default values for the
parameters of importlib.__import__().
14 years ago
Brett Cannon
722d3aec2e
Issue #15508 : Fix the docstring for __import__ to not mention negative
'level' values and set its document default value to 0.
Thanks to Arfrever Frehtes Taifersar Arahesis for filing the bug.
14 years ago
R David Murray
59488d233b
Closes #9254 : backport __import__ docstring/doc mentions of importlib.
Patch by Éric Araujo.
14 years ago