Commit graph

4908 commits

Author SHA1 Message Date
Serhiy Storchaka
13e602ea0f Issue #26168: Fixed possible refleaks in failing Py_BuildValue() with the "N"
format unit.
2016-05-20 22:31:14 +03:00
Victor Stinner
3116cc44af Fix os.set_inheritable() on Android
Issue #27057: Fix os.set_inheritable() on Android, ioctl() is blocked by
SELinux and fails with EACCESS. The function now falls back to fcntl().

Patch written by Michał Bednarski.
2016-05-19 16:46:18 +02:00
Benjamin Peterson
ed64d6b4a5 regen importlib bytecode 2016-05-16 22:54:05 -07:00
Benjamin Peterson
ad887cf7d1 fix possible refleak in MAKE_FUNCTION (closes #26991)
Patch by Xiang Zhang.
2016-05-16 22:52:40 -07:00
Martin Panter
4c35964b76 Corrections for a/an in code comments and documentation 2016-05-08 13:53:41 +00:00
Serhiy Storchaka
df071730bb Regenerate Argument Clinic code for issue #26874. 2016-05-01 20:33:24 +03:00
Berker Peksag
ec766d3c15 Issue #23960: Cleanup args and kwargs on error in PyErr_SetImportError
Patch by Ofer Schwarz.
2016-05-01 09:06:36 +03:00
Zachary Ware
7f227d9087 Issue #26874: Simplify the divmod docstring 2016-04-28 14:39:50 -05:00
Zachary Ware
4d4160af6a Issue #26874: Fix divmod docstring 2016-04-28 14:24:55 -05:00
Serhiy Storchaka
6a7b3a77b4 Issue #26778: Fixed "a/an/and" typos in code comment and documentation. 2016-04-17 08:32:47 +03:00
Martin Panter
6245cb3c01 Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc
This affects documentation, code comments, and a debugging messages.
2016-04-15 02:14:19 +00:00
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.
2016-04-12 22:28:49 +02:00
Serhiy Storchaka
57a01d3a0e Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
in places where Py_DECREF was used.
2016-04-10 18:05:40 +03:00
Serhiy Storchaka
fc43511867 Issue #25339: PYTHONIOENCODING now has priority over locale in setting the
error handler for stdin and stdout.
2016-04-10 14:34:13 +03:00
Serhiy Storchaka
48842714b9 Issue #22570: Renamed Py_SETREF to Py_XSETREF. 2016-04-06 09:45:48 +03:00
Benjamin Peterson
75e3630c60 2016 will be another year of writing copyrighted code 2016-01-01 10:23:45 -06:00
Benjamin Peterson
e8c2a957c8 merge 3.3 2016-01-01 10:24:21 -06: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
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.
2015-11-02 03:37:02 +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
Martin Panter
9955a373a8 Various minor typos in documentation and comments 2015-10-07 10:26:23 +00:00
Serhiy Storchaka
f731bc09fa Issue #25280: Import trace messages emitted in verbose (-v) mode are no
longer formatted twice.
2015-10-01 11:08:50 +03:00
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.
2015-10-01 09:59:32 +02:00
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.
2015-09-04 17:27:49 +02:00
Berker Peksag
0bd5fb0112 Issue #24728: Fix building without threads.
Patch by Louis Dassy.
2015-07-27 16:46:11 +03:00
Serhiy Storchaka
5fa22fc088 Added the const qualifier for char* argument of Py_EnterRecursiveCall(). 2015-06-21 16:26:28 +03:00
Serhiy Storchaka
73c95f1949 Issue #24436: Added const qualifiers for char* arguments of _PyTraceback_Add.
Patch by Michael Ensslin.
2015-06-21 15:59:46 +03:00
Serhiy Storchaka
d741a88049 Fixed indentation of Python examples in C comments. 2015-06-11 00:06:39 +03:00
Yury Selivanov
614bfcc953 Issue 24366: Indent code (thanks to li4ick for reporting). 2015-06-02 18:53:46 -04:00
Benjamin Peterson
deff2b76ec be more robust against the filters list changing under us (closes #24096) 2015-05-03 11:23:37 -04:00
Christian Heimes
418fd74f87 Issue #23998: PyImport_ReInitLock() now checks for lock allocation error 2015-04-19 21:08:42 +02:00
Yury Selivanov
e12685757f Issue 24366: Merge 3.3 2015-06-02 18:54:09 -04:00
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.
2015-05-30 17:45:22 +03:00
Serhiy Storchaka
ca7fecb038 Issue #24102: Fixed exception type checking in standard error handlers. 2015-05-18 16:08:52 +03:00
Benjamin Peterson
9e77f72fb2 shorten capsule name macro; it doesn't need to be so long 2015-05-07 18:41:47 -04:00
Benjamin Peterson
8c59816b70 merge 3.3 (#24096) 2015-05-03 11:28:46 -04:00
Benjamin Peterson
9bdd61338d remove dead *-import checking code (closes #24049) 2015-04-24 12:02:29 -04:00
Christian Heimes
e0ac2beb4f Issue #23998: PyImport_ReInitLock() now checks for lock allocation error 2015-04-19 21:12:14 +02:00
Serhiy Storchaka
d6e53dab86 Fixed error message for the "u#" format code. 2015-04-19 21:11:30 +03:00
Benjamin Peterson
72c2a0f60a merge 3.2 (closes #23165) 2015-01-04 16:03:59 -06:00
Benjamin Peterson
f18bf6fd2d add some overflow checks before multiplying (closes #23165) 2015-01-04 16:03:17 -06:00
Benjamin Peterson
7919acb920 merge 3.2 2014-12-31 18:10:13 -06:00
Benjamin Peterson
47e782a67a update for copyright for 2015 2014-12-31 18:09:36 -06:00
Georg Brandl
edc3cbaaba Copyright year update, add version to licenses. 2014-10-04 14:16:59 +02:00
Serhiy Storchaka
4b1681832b Issue #22518: Fixed integer overflow issues in "backslashreplace",
"xmlcharrefreplace", and "surrogatepass" error handlers.
2014-10-04 14:15:49 +03:00
Serhiy Storchaka
f41f8f9974 Issue #22977: Fixed formatting Windows error messages on Wine.
Patch by Martin Panter.
2015-04-02 09:47:27 +03:00
Victor Stinner
9aa1331c6f Issue #22585: os.urandom() now releases the GIL when the getentropy() is used
(OpenBSD 5.6+).
2015-03-30 11:18:30 +02:00
Victor Stinner
81f241ab2e Issue #23571: If io.TextIOWrapper constructor fails in _Py_DisplaySourceLine(),
close the binary file to fix a resource warning.
2015-03-25 02:25:25 +01:00
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.
2015-03-25 01:54:46 +01:00
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.
2015-03-24 13:44:35 +01:00