summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
AgeCommit message (Collapse)AuthorLines
2009-10-20Issue #1722344: threading._shutdown() is now called in Py_Finalize(), whichAntoine Pitrou-0/+30
fixes the problem of some exceptions being thrown at shutdown when the interpreter is killed. Patch by Adam Olsen.
2009-04-04- Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access withMatthias Klose-2/+3
short file names.
2009-03-31Issue 5619: Pass MS CRT debug flags into subprocessesJesse Noller-0/+2
2009-03-20Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.Mark Dickinson-0/+3
Backport of r70459.
2009-01-02fix compilation on non-Windows platformsBenjamin Peterson-0/+2
2009-01-02Issue #4075: Use OutputDebugStringW in Py_FatalError.Martin v. Löwis-3/+17
2008-11-22#3996: On Windows, PyOS_CheckStack is supposed to protect the interpreter fromAmaury Forgeot d'Arc-1/+1
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-10-31make sure the parser flags and passed onto the compilerBenjamin Peterson-6/+12
This fixes "from __future__ import unicode_literals" in an exec statment See #4225
2008-08-24Fix:Neal Norwitz-2/+2
* 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-07-19#3378: in case of no memory, don't leak even more memory. :)Georg Brandl-6/+7
2008-07-05Fix tabs.Georg Brandl-12/+12
2008-06-09This reverts r63675 based on the discussion in this thread:Gregory P. Smith-14/+14
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-01Typo: encoding -> codeset.Martin v. Löwis-1/+1
2008-06-01Move sys_stream and sys_isatty out of the have-langinfo block.Martin v. Löwis-1/+1
2008-06-01New environment variable PYTHONIOENCODING.Martin v. Löwis-28/+73
2008-05-26Renamed PyString to PyBytesChristian Heimes-14/+14
2008-05-26First step of the C API rename:Christian Heimes-2/+2
renamed Include/bytesobject.h to Include/bytearrayobject.h renamed Include/stringobject.h to Include/bytesobject.h added Include/stringobject.h with aliases
2008-05-11#2816: clarify error messages for EOF while scanning strings.Georg Brandl-2/+2
2008-05-06Implemented PEP 370Christian Heimes-0/+1
2008-04-12Re-implement the 'warnings' module in C. This allows for usage of theBrett Cannon-59/+14
'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-03-26C89 compliance: Microsoft compilers want variable declarations at the topAmaury Forgeot d'Arc-4/+2
2008-03-26Initialize PyCompilerFlags cf_flags with 0Christian Heimes-0/+2
2008-03-26Patch #2477: Added from __future__ import unicode_literalsChristian Heimes-7/+23
The new PyParser_*Ex() functions are based on Neal's suggestion and initial patch. The new __future__ feature makes all '' and r'' unicode strings. b'' and br'' stay (byte) strings.
2008-03-26Merged revisions ↵Christian Heimes-1/+26
61750,61752,61754,61756,61760,61763,61768,61772,61775,61805,61809,61812,61819,61917,61920,61930,61933-61934 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/trunk-bytearray ........ r61750 | christian.heimes | 2008-03-22 20:47:44 +0100 (Sat, 22 Mar 2008) | 1 line Copied files from py3k w/o modifications ........ r61752 | christian.heimes | 2008-03-22 20:53:20 +0100 (Sat, 22 Mar 2008) | 7 lines Take One * Added initialization code, warnings, flags etc. to the appropriate places * Added new buffer interface to string type * Modified tests * Modified Makefile.pre.in to compile the new files * Added bytesobject.c to Python.h ........ r61754 | christian.heimes | 2008-03-22 21:22:19 +0100 (Sat, 22 Mar 2008) | 2 lines Disabled bytearray.extend for now since it causes an infinite recursion Fixed serveral unit tests ........ r61756 | christian.heimes | 2008-03-22 21:43:38 +0100 (Sat, 22 Mar 2008) | 5 lines Added PyBytes support to several places: str + bytearray ord(bytearray) bytearray(str, encoding) ........ r61760 | christian.heimes | 2008-03-22 21:56:32 +0100 (Sat, 22 Mar 2008) | 1 line Fixed more unit tests related to type('') is not unicode ........ r61763 | christian.heimes | 2008-03-22 22:20:28 +0100 (Sat, 22 Mar 2008) | 2 lines Fixed more unit tests Fixed bytearray.extend ........ r61768 | christian.heimes | 2008-03-22 22:40:50 +0100 (Sat, 22 Mar 2008) | 1 line Implemented old buffer interface for bytearray ........ r61772 | christian.heimes | 2008-03-22 23:24:52 +0100 (Sat, 22 Mar 2008) | 1 line Added backport of the io module ........ r61775 | christian.heimes | 2008-03-23 03:50:49 +0100 (Sun, 23 Mar 2008) | 1 line Fix str assignement to bytearray. Assignment of a str of size 1 is interpreted as a single byte ........ r61805 | christian.heimes | 2008-03-23 19:33:48 +0100 (Sun, 23 Mar 2008) | 3 lines Fixed more tests Fixed bytearray() comparsion with unicode() Fixed iterator assignment of bytearray ........ r61809 | christian.heimes | 2008-03-23 21:02:21 +0100 (Sun, 23 Mar 2008) | 2 lines str(bytesarray()) now returns the bytes and not the representation of the bytearray object Enabled and fixed more unit tests ........ r61812 | christian.heimes | 2008-03-23 21:53:08 +0100 (Sun, 23 Mar 2008) | 3 lines Clear error PyNumber_AsSsize_t() fails Use CHARMASK for ob_svall access disabled a test with memoryview again ........ r61819 | christian.heimes | 2008-03-23 23:05:57 +0100 (Sun, 23 Mar 2008) | 1 line Untested updates to the PCBuild directory ........ r61917 | christian.heimes | 2008-03-26 00:57:06 +0100 (Wed, 26 Mar 2008) | 1 line The type system of Python 2.6 has subtle differences to 3.0's. I've removed the Py_TPFLAGS_BASETYPE flags from bytearray for now. bytearray can't be subclasses until the issues with bytearray subclasses are fixed. ........ r61920 | christian.heimes | 2008-03-26 01:44:08 +0100 (Wed, 26 Mar 2008) | 2 lines Disabled last failing test I don't understand what the test is testing and how it suppose to work. Ka-Ping, please check it out. ........ r61930 | christian.heimes | 2008-03-26 12:46:18 +0100 (Wed, 26 Mar 2008) | 1 line Re-enabled bytes warning code ........ r61933 | christian.heimes | 2008-03-26 13:20:46 +0100 (Wed, 26 Mar 2008) | 1 line Fixed a bug in the new buffer protocol. The buffer slots weren't copied into a subclass. ........ r61934 | christian.heimes | 2008-03-26 13:25:09 +0100 (Wed, 26 Mar 2008) | 1 line Re-enabled bytearray subclassing - all tests are passing. ........
2008-03-18Backport of the print function, using a __future__ import.Eric Smith-4/+5
This work is substantially Anthony Baxter's, from issue 1633807. I just freshened it, made a few minor tweaks, and added the test cases. I also created issue 2412, which is to check for 2to3's behavior with the print function. I also added myself to ACKS.
2008-02-18Perform correct handling of stack overflow for windows: Catch the correct ↵Kristján Valur Jónsson-2/+8
exception code and reset the overflow condition when handled.
2008-02-08Deallocate content of the dict free list on interpreter shutdownChristian Heimes-0/+1
2008-01-27Added clear cache methods to clear the internal type lookup cache for ref ↵Christian Heimes-0/+3
leak test runs.
2008-01-07Patch #602345 by Neal Norwitz and me: add -B option and ↵Georg Brandl-0/+3
PYTHONDONTWRITEBYTECODE envvar to skip writing bytecode.
2007-11-29Issue #1402: PyInterpreterState_Clear() may still invoke user codeAmaury Forgeot d'Arc-5/+5
(in deallocation of running threads, for example), so the PyGILState_Release() function must still be functional. On the other hand, _PyGILState_Fini() only frees memory, and can be called later. Backport candidate, but only after some experts comment on it.
2007-04-25Make pythoncore compile cleanly with VisualStudio 2005. Used an explicit ↵Kristján Valur Jónsson-0/+1
typecast to get a 64 bit integer, and undefined the Yield macro that conflicts with winbase.h
2007-03-12Bug #742342: make Python stop segfaulting on infinitely-recursive reload()s. ↵Collin Winter-0/+4
Fixed by patch #922167. Will backport.
2007-03-12Bug #1678647: write a newline after printing an exception in anyGeorg Brandl-2/+2
case, even when converting the value to a string failed.
2007-03-07Patch #703779: unset __file__ in __main__ after running a file. ThisGeorg Brandl-3/+11
makes the filenames the warning module prints much more sensible when a PYTHONSTARTUP file is used.
2007-03-07Variant of patch #697613: don't exit the interpreter on a SystemExitGeorg Brandl-0/+6
exception if the -i command line option or PYTHONINSPECT environment variable is given, but break into the interactive interpreter just like on other exceptions or normal program exit. (backport)
2007-03-06Bug #1674503: close the file opened by execfile() in an error condition.Georg Brandl-2/+2
2007-01-23SF patch #1630975: Fix crash when replacing sys.stdout in sitecustomizeThomas Wouters-3/+6
When running the interpreter in an environment that would cause it to set stdout/stderr/stdin's encoding, having a sitecustomize that would replace them with something other than PyFile objects would crash the interpreter. Fix it by simply ignoring the encoding-setting for non-files. This could do with a test, but I can think of no maintainable and portable way to test this bug, short of adding a sitecustomize.py to the buildsystem and have it always run with it (hmmm....)
2006-09-06with and as are now keywords. There are some generated files I can't recreate.Neal Norwitz-0/+7
2006-08-21Handle a few more error conditions.Neal Norwitz-0/+5
Klocwork 301 and 302. Will backport.
2006-08-12PyModule_GetDict() can fail, produce fatal errors if this happens on startup.Neal Norwitz-0/+4
Klocwork #298-299.
2006-08-12Whoops, how did that get in there. :-) Revert all the parts of 51227 that ↵Neal Norwitz-3/+0
were not supposed to go it. Only Modules/_ctypes/cfields.c was supposed to be changed
2006-08-12Check returned pointer is valid.Neal Norwitz-0/+3
Klocwork #233
2006-07-22Fix more memory allocation issues found with failmalloc.Neal Norwitz-6/+17
2006-07-21Handle more memory allocation failures without crashing.Neal Norwitz-4/+13
2006-07-17Reported by Klocwork #151.Neal Norwitz-2/+13
v2 can be NULL if exception2 is NULL. I don't think that condition can happen, but I'm not sure it can't either. Now the code will protect against either being NULL.
2006-06-10Patch #1495999: Part two of Windows CE changes.Martin v. Löwis-0/+2
- update header checks, using autoconf - provide dummies for getenv, environ, and GetVersion - adjust MSC_VER check in socketmodule.c
2006-05-28PyErr_Display(), PyErr_WriteUnraisable(): Coverity found a cut-and-pasteTim Peters-13/+15
bug in both: `className` was referenced before being checked for NULL.
2006-05-27Conversion of exceptions over from faked-up classes to new-style C types.Richard Jones-4/+8
2006-04-18Change those parts of the Python-api that were functions in 2.4, andThomas Heller-4/+96
are now macros to exported functions again. Fixes [ 1465834 ] bdist_wininst preinstall script support is broken in 2.5a1.
2006-04-18Remove types from type_list if they have no objectsMartin v. Löwis-2/+9
and unlist_types_without_objects is set. Give dump_counts a FILE* argument.