Commit Graph

294 Commits

Author SHA1 Message Date
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
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
c33e82d23c Change to a Py_XDECREF and fix some whitespace.
Found using Clang's static analyzer.
2010-05-05 20:38:52 +00:00
Victor Stinner
6664426d7c Issue #3137: Don't ignore errors at startup, especially a keyboard interrupt
(SIGINT). If an error occurs while importing the site module, the error is
printed and Python exits. Initialize the GIL before importing the site
module.
2010-03-10 22:30:19 +00:00
Antoine Pitrou
efb60c0ceb Issue #1722344: threading._shutdown() is now called in Py_Finalize(), which
fixes the problem of some exceptions being thrown at shutdown when the
interpreter is killed. Patch by Adam Olsen.
2009-10-20 21:29:37 +00:00
Matthias Klose
edb5e1e09e - Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access with
short file names.
2009-04-04 14:18:13 +00:00
Jesse Noller
42f9b4e5b4 Issue 5619: Pass MS CRT debug flags into subprocesses 2009-03-31 22:20:35 +00:00
Mark Dickinson
efc82f7e8e Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.
Backport of r70459.
2009-03-20 15:51:55 +00:00
Benjamin Peterson
796798b29c fix compilation on non-Windows platforms 2009-01-02 20:47:27 +00:00
Martin v. Löwis
5344c99734 Issue #4075: Use OutputDebugStringW in Py_FatalError. 2009-01-02 20:32:55 +00:00
Amaury Forgeot d'Arc
dc61901dd2 #3996: On Windows, PyOS_CheckStack is supposed to protect the interpreter from
stack overflow. But doing this, it always crashes when the stack is nearly full.

Reviewed by Martin von Loewis. Will backport to 2.6.
2008-11-22 20:01:18 +00:00
Benjamin Peterson
dcee09d920 make sure the parser flags and passed onto the compiler
This fixes "from __future__ import unicode_literals" in an exec statment
See #4225
2008-10-31 02:16:05 +00:00
Neal Norwitz
18aa388ca0 Fix:
* crashes on memory allocation failure found with failmalloc
 * memory leaks found with valgrind
 * compiler warnings in opt mode which would lead to invalid memory reads
 * problem using wrong name in decimal module reported by pychecker

Update the valgrind suppressions file with new leaks that are small/one-time
leaks we don't care about (ie, they are too hard to fix).

TBR=barry
TESTED=./python -E -tt ./Lib/test/regrtest.py -uall (both debug and opt modes)
  in opt mode:
  valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \
    ./python -E -tt ./Lib/test/regrtest.py -uall,-bsddb,-compiler \
                        -x test_logging test_ssl test_multiprocessing
  valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \
    ./python -E -tt ./Lib/test/regrtest.py test_multiprocessing
  for i in `seq 1 4000` ; do
    LD_PRELOAD=~/local/lib/libfailmalloc.so FAILMALLOC_INTERVAL=$i \
        ./python -c pass
  done

At least some of these fixes should probably be backported to 2.5.
2008-08-24 05:04:52 +00:00
Georg Brandl
1ad108db05 #3378: in case of no memory, don't leak even more memory. :) 2008-07-19 10:08:55 +00:00
Georg Brandl
3c0fd5616f Fix tabs. 2008-07-05 10:07:18 +00:00
Gregory P. Smith
dd96db63f6 This reverts r63675 based on the discussion in this thread:
http://mail.python.org/pipermail/python-dev/2008-June/079988.html

Python 2.6 should stick with PyString_* in its codebase.  The PyBytes_* names
in the spirit of 3.0 are available via a #define only.  See the email thread.
2008-06-09 04:58:54 +00:00
Martin v. Löwis
6495c8da8f Typo: encoding -> codeset. 2008-06-01 08:19:02 +00:00
Martin v. Löwis
b12d8579e3 Move sys_stream and sys_isatty out of the have-langinfo block. 2008-06-01 08:06:17 +00:00
Martin v. Löwis
99815892f6 New environment variable PYTHONIOENCODING. 2008-06-01 07:20:46 +00:00
Christian Heimes
593daf545b Renamed PyString to PyBytes 2008-05-26 12:51:38 +00:00
Christian Heimes
3497f94476 First step of the C API rename:
renamed Include/bytesobject.h to Include/bytearrayobject.h
renamed Include/stringobject.h to Include/bytesobject.h
added Include/stringobject.h with aliases
2008-05-26 12:29:14 +00:00
Georg Brandl
b52a74b517 #2816: clarify error messages for EOF while scanning strings. 2008-05-11 15:07:39 +00:00
Christian Heimes
af748c3ab8 Implemented PEP 370 2008-05-06 22:41:46 +00:00
Brett Cannon
e974689038 Re-implement the 'warnings' module in C. This allows for usage of the
'warnings' code in places where it was previously not possible (e.g., the
parser). It could also potentially lead to a speed-up in interpreter start-up
if the C version of the code (_warnings) is imported over the use of the
Python version in key places.

Closes issue #1631171.
2008-04-12 23:44:07 +00:00