Martin Panter
4c35964b76
Corrections for a/an in code comments and documentation
10 years ago
Serhiy Storchaka
df071730bb
Regenerate Argument Clinic code for issue #26874 .
10 years ago
Berker Peksag
ec766d3c15
Issue #23960 : Cleanup args and kwargs on error in PyErr_SetImportError
Patch by Ofer Schwarz.
10 years ago
Zachary Ware
7f227d9087
Issue #26874 : Simplify the divmod docstring
10 years ago
Zachary Ware
4d4160af6a
Issue #26874 : Fix divmod docstring
10 years ago
Serhiy Storchaka
6a7b3a77b4
Issue #26778 : Fixed "a/an/and" typos in code comment and documentation.
10 years ago
Martin Panter
6245cb3c01
Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc
This affects documentation, code comments, and a debugging messages.
10 years ago
Victor Stinner
9d24271d86
Fix os.urandom() on Solaris 11.3
Issue #26735 : Fix os.urandom() on Solaris 11.3 and newer when reading more than
1,024 bytes: call getrandom() multiple times with a limit of 1024 bytes per
call.
10 years ago
Serhiy Storchaka
57a01d3a0e
Issue #26200 : Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
in places where Py_DECREF was used.
10 years ago
Serhiy Storchaka
fc43511867
Issue #25339 : PYTHONIOENCODING now has priority over locale in setting the
error handler for stdin and stdout.
10 years ago
Serhiy Storchaka
48842714b9
Issue #22570 : Renamed Py_SETREF to Py_XSETREF.
10 years ago
Benjamin Peterson
75e3630c60
2016 will be another year of writing copyrighted code
10 years ago
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
7462b64911
Issue #25523 : Correct "a" article to "an" article
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
or edited some other way to fix the grammar.
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
Martin Panter
9955a373a8
Various minor typos in documentation and comments
10 years ago
Serhiy Storchaka
f731bc09fa
Issue #25280 : Import trace messages emitted in verbose (-v) mode are no
longer formatted twice.
10 years ago
Victor Stinner
78cc2e8968
Issue #25003 : os.urandom() doesn't use getentropy() on Solaris because
getentropy() is blocking, whereas os.urandom() should not block. getentropy()
is supported since Solaris 11.3.
10 years ago
Victor Stinner
6fb5bae252
Fix race condition in create_stdio()
Issue #24891 : Fix a race condition at Python startup if the file descriptor
of stdin (0), stdout (1) or stderr (2) is closed while Python is creating
sys.stdin, sys.stdout and sys.stderr objects. These attributes are now set
to None if the creation of the object failed, instead of raising an OSError
exception. Initial patch written by Marco Paolini.
10 years ago
Berker Peksag
0bd5fb0112
Issue #24728 : Fix building without threads.
Patch by Louis Dassy.
11 years ago
Serhiy Storchaka
5fa22fc088
Added the const qualifier for char* argument of Py_EnterRecursiveCall().
11 years ago
Serhiy Storchaka
73c95f1949
Issue #24436 : Added const qualifiers for char* arguments of _PyTraceback_Add.
Patch by Michael Ensslin.
11 years ago
Serhiy Storchaka
d741a88049
Fixed indentation of Python examples in C comments.
11 years ago
Yury Selivanov
614bfcc953
Issue 24366: Indent code (thanks to li4ick for reporting).
11 years ago
Benjamin Peterson
deff2b76ec
be more robust against the filters list changing under us ( closes #24096 )
11 years ago
Christian Heimes
418fd74f87
Issue #23998 : PyImport_ReInitLock() now checks for lock allocation error
11 years ago
Serhiy Storchaka
fa494fd883
Issue #24115 : Update uses of PyObject_IsTrue(), PyObject_Not(),
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
to check for and handle errors correctly.
11 years ago
Serhiy Storchaka
ca7fecb038
Issue #24102 : Fixed exception type checking in standard error handlers.
11 years ago
Benjamin Peterson
9e77f72fb2
shorten capsule name macro; it doesn't need to be so long
11 years ago
Benjamin Peterson
9bdd61338d
remove dead *-import checking code ( closes #24049 )
11 years ago
Serhiy Storchaka
d6e53dab86
Fixed error message for the "u#" format code.
11 years ago
Serhiy Storchaka
f41f8f9974
Issue #22977 : Fixed formatting Windows error messages on Wine.
Patch by Martin Panter.
11 years ago
Victor Stinner
9aa1331c6f
Issue #22585 : os.urandom() now releases the GIL when the getentropy() is used
(OpenBSD 5.6+).
11 years ago
Victor Stinner
81f241ab2e
Issue #23571 : If io.TextIOWrapper constructor fails in _Py_DisplaySourceLine(),
close the binary file to fix a resource warning.
11 years ago
Victor Stinner
84092ac370
Issue #23571 : Fix reentrant call to Py_FatalError()
Flushing sys.stdout and sys.stderr in Py_FatalError() can call again
Py_FatalError(). Add a reentrant flag to detect this case and just abort at the
second call.
11 years ago
Victor Stinner
ec4f9592f5
Issue #23571 : Py_FatalError() now tries to flush sys.stdout and sys.stderr
It should help to see exceptions when stderr if buffered: PyErr_Display() calls
sys.stderr.write(), it doesn't write into stderr file descriptor directly.
11 years ago
Victor Stinner
0e98a76b65
Issue #23571 : Enhance Py_FatalError()
* Display the current Python stack if an exception was raised but the exception
has no traceback
* Disable faulthandler if an exception was raised (before it was only disabled
if no exception was raised)
* To display the current Python stack, call PyGILState_GetThisThreadState()
which works even if the GIL was released
11 years ago
Steve Dower
41e7244c06
Fixes incorrect use of GetLastError where errno should be used.
11 years ago
Serhiy Storchaka
c775ad615a
Issue #23192 : Fixed generator lambdas. Patch by Bruno Cauet.
11 years ago
Serhiy Storchaka
1a1ff29659
Issue #23446 : Use PyMem_New instead of PyMem_Malloc to avoid possible integer
overflows. Added few missed PyErr_NoMemory().
11 years ago
Benjamin Peterson
2476b98acf
avoid reading unallocated memory when argc == 0 ( closes #22633 )
11 years ago
Serhiy Storchaka
4fdb68491e
Issue #22896 : Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
and PyObject_AsWriteBuffer().
11 years ago
Benjamin Peterson
7a66fc22ad
revert lineno and col_offset changes from #16795 ( closes #21295 )
11 years ago
Victor Stinner
26f7b8acdc
Issue #23353 : Fix the exception handling of generators in PyEval_EvalFrameEx().
At entry, save or swap the exception state even if PyEval_EvalFrameEx() is
called with throwflag=0. At exit, the exception state is now always restored or
swapped, not only if why is WHY_YIELD or WHY_RETURN. Patch co-written with
Antoine Pitrou.
11 years ago
Serhiy Storchaka
000daaee57
Fixed memory leak in marshal.
11 years ago
Serhiy Storchaka
d3faf43f9b
Issue #23181 : More "codepoint" -> "code point".
11 years ago
Benjamin Peterson
f18bf6fd2d
add some overflow checks before multiplying ( closes #23165 )
11 years ago
Benjamin Peterson
47e782a67a
update for copyright for 2015
11 years ago
Victor Stinner
fe02e39029
Issue #22585 : On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(),
instead of reading /dev/urandom, to get pseudo-random bytes.
11 years ago
Benjamin Peterson
3cda0ed062
pop the loop block even for infinite while loops ( closes #23048 )
11 years ago