Commit Graph

3041 Commits

Author SHA1 Message Date
Antoine Pitrou
a4d36a9572 Fix misindents in compile.c (for Benjamin).
Of course, whoever used the wrong indentation rules needs to be spanked.
2010-06-22 21:42:05 +00:00
Benjamin Peterson
5b9ce31c39 bump revision 2010-06-22 19:49:47 +00:00
Benjamin Peterson
c6660cf4d6 different spellings are just unacceptable 2010-06-11 21:40:37 +00:00
Benjamin Peterson
1056ca264f fix code formatting 2010-06-09 19:45:04 +00:00
Victor Stinner
c49dfcc8dc Issue #3798: Write sys.exit() message to sys.stderr to use stderr encoding and
error handler, instead of writing to the C stderr file in utf-8
2010-05-25 22:30:32 +00:00
Antoine Pitrou
6a2656094d Issue #5753: A new C API function, :cfunc:PySys_SetArgvEx, allows
embedders of the interpreter to set sys.argv without also modifying
sys.path.  This helps fix `CVE-2008-5983
<http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
2010-05-21 17:12:38 +00:00
Brett Cannon
eb3cd301ae Turned out that if you used explicit relative import syntax
(e.g. from .os import sep) and it failed, import would still try the implicit
relative import semantics of an absolute import (from os import sep). That's
not right, so when level is negative, only do explicit relative import
semantics.

Fixes issue #7902. Thanks to Meador Inge for the patch.
2010-05-20 18:37:55 +00:00
Victor Stinner
3bea1ede7d Use 4-spaces for indentation (instead of tabs) in pgen outputs
Regenerate (reindent) Python/graminit.c
2010-05-15 22:55:28 +00:00
Antoine Pitrou
c83ea137d7 Untabify C files. Will watch buildbots. 2010-05-09 14:46:46 +00:00
Jean-Paul Calderone
e54ddf1ed2 Skip signal handler re-installation if it is not necessary. Issue 8354. 2010-05-08 20:06:02 +00:00
Brett Cannon
f4f0bf850b Revert a change where an expression is not needed now, but could be in the future. 2010-05-05 23:11:08 +00:00
Brett Cannon
5335e77810 Remove an unneeded variable assignment.
Found using Clang's static analyzer.
2010-05-05 20:53:20 +00:00
Brett Cannon
0b64be2389 Explicitly add stdio.h and string.h to make strtod.c work standalone.
Found using Clang's static analyzer.
2010-05-05 20:50:03 +00:00
Brett Cannon
c33e82d23c Change to a Py_XDECREF and fix some whitespace.
Found using Clang's static analyzer.
2010-05-05 20:38:52 +00:00
Brett Cannon
1771ecf879 Remove an unnecessary variable assignment.
Found using Clang's static analyzer.
2010-05-05 20:35:24 +00:00
Brett Cannon
fa84d923ec Remove two unneeded branches to an 'if' statement by applying De Morgan's Law
and creating a single 'if' statement along with a NULL default value for a
variable.

Also clean up a bunch of whitespace.

Found using Clang's static analyzer.
2010-05-05 20:30:30 +00:00
Brett Cannon
2ee5183852 Remove an unneeded variable increment.
Found using Clang's static analyzer.
2010-05-05 20:27:49 +00:00
Brett Cannon
8b9c04941b Remove an unneeded variable and fix a little whitespace.
Found using Clang's static analyzer.
2010-05-05 20:26:58 +00:00
Brett Cannon
b166afc17c Fix whitespace. 2010-05-05 20:25:47 +00:00
Brett Cannon
417439e6cd Partially revert the over-reaching r80813. 2010-05-05 20:24:30 +00:00
Brett Cannon
0b03f10afb Remove three unneeded variable assignments.
Found using Clang's static analyzer.
2010-05-05 20:20:19 +00:00
Mark Dickinson
ef9b4abfea Fix trailing whitespace. 2010-05-04 16:19:06 +00:00
Mark Dickinson
a8d2668818 Issue #1533: fix inconsistency in range function argument processing:
any non-float non-integer argument is now converted to an integer (if
possible) using its __int__ method.  Previously, only small arguments
were treated this way; larger arguments (those whose __int__ was
outside the range of a C long) would produce a TypeError.

Patch by Alexander Belopolsky (with minor modifications).
2010-05-04 16:18:25 +00:00
Brett Cannon
1994969c15 When DeprecationWarning was silenced by default, it also silenced any use of -Q
by default as well. This change fixes that by treating -Q like -3 when it comes
to DeprecationWarning; using it causes the silencing to not occur.

Fixes issue #7319.
2010-04-25 22:33:36 +00:00
Antoine Pitrou
18e63fbe64 Issue #7332: Remove the 16KB stack-based buffer in
PyMarshal_ReadLastObjectFromFile, which doesn't bring any noticeable
benefit compared to the dynamic memory allocation fallback.  Patch by
Charles-François Natali.
2010-04-21 22:53:29 +00:00