Commit Graph

6168 Commits

Author SHA1 Message Date
Benjamin Peterson
7fc8a10577 add missing NULL check 2014-04-14 19:57:52 -04:00
Benjamin Peterson
5c863bf938 when an exception is raised in fdopen, never close the fd (changing on my mind on #21191) 2014-04-14 19:45:46 -04:00
Benjamin Peterson
3e5d87bb86 disallow a negative idx parameter 2014-04-14 11:43:09 -04:00
Benjamin Peterson
6c939cb6f6 in scan_once, prevent the reading of arbitrary memory when passed a negative index
Bug reported by Guido Vranken.
2014-04-13 22:10:38 -04:00
Benjamin Peterson
02ab7a84ef make sure fdopen always closes the fd in error cases (closes #21191) 2014-04-09 15:40:18 -04:00
Benjamin Peterson
d42f60ed81 fix overflow detection of strop.expandtabs 2014-03-30 20:09:44 -04:00
Ned Deily
b693e9fc5b Issue #6676: Ensure a meaningful exception is raised when attempting
to parse more than one XML document per pyexpat xmlparser instance.
(Original patches by Hirokazu Yamamoto and Amaury Forgeot d'Arc, with
suggested wording by David Gutteridge)
2014-03-27 16:38:32 -07:00
Benjamin Peterson
e3af6f0a88 fix ctypes test alignment assumptions (closes #20946)
Patch by Andreas Schwab.
2014-03-16 10:07:26 +01:00
Georg Brandl
6d07641fce #13530: port to 2.7 branch (document what os.lseek returns). 2014-03-11 10:28:56 +01:00
Serhiy Storchaka
e50fe4c9eb Issue #20283: RE pattern methods now accept the string keyword parameters
as documented.  The pattern and source keyword parameters are left as
deprecated aliases.
2014-03-06 12:24:29 +02:00
Benjamin Peterson
384e9cb3a1 finish backing out #19081 2014-02-16 14:46:57 -05:00
Benjamin Peterson
e9aab0fb98 backout #19081 to fix #20621 2014-02-16 14:20:14 -05:00
Serhiy Storchaka
1d19f97eed Issue #17671: Fixed a crash when use non-initialized io.BufferedRWPair.
Based on patch by Stephen Tu.
2014-02-12 10:52:07 +02:00
Benjamin Peterson
2748c5c106 avoid name clash with posix_close (closes #20594) 2014-02-11 10:16:16 -05:00
Serhiy Storchaka
98a9722e4a Issue #20437: Fixed 43 potential bugs when deleting objects references. 2014-02-09 13:14:04 +02:00
Ned Deily
ddc697f212 Issue #20374: delete spurious empty line 2014-02-05 17:01:41 -08:00
Ned Deily
b0fd12d96c Issue #20374: Avoid compiler warnings when compiling readline with libedit. 2014-02-05 16:52:26 -08:00
Serhiy Storchaka
ccffb25c54 Issue #20368: The null character now correctly passed from Tcl to Python (in
unicode strings only).  Improved error handling in variables-related commands.
2014-02-03 21:23:46 +02:00
Gregory P. Smith
aaef0e7821 Remove inaccurate comment and a the related recently added
Py_VerboseFlag print that can never be triggered.

prefix[0] is always equal to 0 at this point in the code.
2014-01-27 22:43:25 -08:00
Gregory P. Smith
027ab39014 Issue #19081: Remove the zipimporter.files reference as the zip TOC
caches are module global in the zip_directory_cache. When it is
updated due to a changed zip file, all zipimporter instances need to
see the same updates TOC cache.  This fixes the bug for the overlooked
submodule import case from the earlier round of changes.  Includes
tests that would fail otherwise.

It also refactors zipimporter_init in the process to make it a bit
easier to read and understand.  Less reuse of the same variable for
multiple purposes and the local path buffer is malloc'ed instead
of consuming a large MAXPATHLEN+2 chunk stack space.
2014-01-27 00:15:10 -08:00
Benjamin Peterson
0ac0eadf8d new plan: just remove typecasts (closes #20374) 2014-01-24 11:44:16 -05:00
Benjamin Peterson
ce75105e10 use new readline function types (closes #20374) 2014-01-24 00:32:12 -05:00
Serhiy Storchaka
e0ed2d75c8 Issue #19936: Added executable bits or shebang lines to Python scripts which
requires them.  Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface.
2014-01-16 18:59:17 +02:00
Benjamin Peterson
9e79889184 remove overly strict assertion (closes #20251) 2014-01-14 00:21:49 -05:00
Benjamin Peterson
06e486c2d3 correct defaultdict signature in docstring (closes #20250)
Patch from Andrew Barnert.
2014-01-13 23:56:05 -05:00