summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
AgeCommit message (Collapse)AuthorLines
2019-04-09bpo-30134: fix BytesWarning doc, docstring and message (GH-12739)Inada Naoki-1/+1
2018-09-10bpo-25083: Python can sometimes create incorrect .pyc files (GH-8449)tzickel-0/+3
Python 2 never checked for I/O error when reading .py files and thus could mistake an I/O error for EOF and create incorrect .pyc files. This adds an check for this and aborts on an error.
2018-07-31[2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479)Serhiy Storchaka-1/+1
2018-07-11bpo-34080: Fix a memory leak in the compiler. (GH-8222)Miss Islington (bot)-1/+1
(cherry picked from commit 993030aac576710a46b3dd0b4864f819d4a94145) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2017-10-17[2.7] bpo-31692: Add PYTHONSHOWALLOCCOUNT env var (GH-3927)Victor Stinner-1/+3
bpo-31692, bpo-19527: * Add a new PYTHONSHOWALLOCCOUNT environment variable, similar to the Python 3 "-X showalloccount" option * When Python is compiled with COUNT_ALLOCS, the new PYTHONSHOWALLOCCOUNT environment variable now has to be set to dump allocation counts into stderr on shutdown. Moreover, allocations statistics are now dumped into stderr rather than stdout. * Add @test.support.requires_type_collecting decorator: skip test if COUNT_ALLOCS is defined * Fix tests for COUNT_ALLOCS: decorate some methods with @requires_type_collecting * test_sys.test_objecttypes(): update object type when COUNT_ALLOCS is defined
2017-10-17bpo-31733: Add PYTHONSHOWREFCOUNT env var (GH-3932)Victor Stinner-10/+17
Add a new PYTHONSHOWREFCOUNT environment variable. In debug mode, Python now only print the total reference count if PYTHONSHOWREFCOUNT is set.
2017-02-02Issue #14376: sys.exit now accepts longs as well as ints. Thanks Gareth Rees.Mark Dickinson-1/+1
2016-05-26Issue #27076: Doc, comment and test function name spelling fixesMartin Panter-1/+1
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
2016-02-28Issue #22836: Keep exception reports sensible despite errorsMartin Panter-1/+7
2015-05-30Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),Serhiy Storchaka-22/+21
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly.
2014-11-21Issue #21963: backout issue #1856 patch (avoid crashes and lockups whenAntoine Pitrou-8/+1
daemon threads run while the interpreter is shutting down; instead, these threads are now killed when they try to take the GIL), as it seems to break some existing code.
2014-08-28PEP 466: backport persistent urandom fd (closes #21305)Benjamin Peterson-0/+1
Patch from Alex Gaynor.
2014-06-16avoid crashes and lockups from daemon threads during interpreter shutdown ↵Benjamin Peterson-1/+8
(#1856)
2013-10-22Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in theChristian Heimes-0/+5
Python executable and not removed by the linker's optimizer.
2012-11-07Issue #15001: fix segfault on "del sys.modules['__main__']"Hynek Schlawack-5/+5
Patch by Victor Stinner.
2012-04-03fix parse_syntax_error to clean up its resourcesBenjamin Peterson-19/+31
2012-02-21Fix crash at startup with -W options.Antoine Pitrou-1/+0
2012-02-20merge 2.6 with hash randomization fixBenjamin Peterson-0/+8
2012-02-20- Issue #13703: oCERT-2011-003: add -R command-line option and PYTHONHASHSEEDBarry Warsaw-0/+8
environment variable, to provide an opt-in way to protect against denial of service attacks due to hash collisions within the dict and set types. Patch by David Malcolm, based on work by Victor Stinner.
2011-05-15Port #6498 fix: fix several misspellings of "SystemExit" as "SystemError".Georg Brandl-1/+1
2010-10-29Merged revisions 85904 via svnmerge fromBenjamin Peterson-0/+2
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85904 | benjamin.peterson | 2010-10-28 22:28:14 -0500 (Thu, 28 Oct 2010) | 1 line decrement offset when it points to a newline (#10186 followup) ........
2010-10-24Merged revisions 85814 via svnmerge fromBenjamin Peterson-2/+0
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85814 | benjamin.peterson | 2010-10-23 21:52:05 -0500 (Sat, 23 Oct 2010) | 1 line remove broken code accounting an offset the size of the line #10186 ........
2010-08-08sys.stderr and sys.excepthook can be None at interpreter shutdown,Antoine Pitrou-2/+2
in which case display the appropriate error message. (part of #5319)
2010-05-25Merged revisions 81537 via svnmerge fromVictor Stinner-1/+7
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81537 | victor.stinner | 2010-05-26 00:30:32 +0200 (mer., 26 mai 2010) | 3 lines 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-25Issue #3798: Write sys.exit() message to sys.stderr to use stderr encoding andVictor Stinner-1/+7
error handler, instead of writing to the C stderr file in utf-8
2010-05-09Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou-1274/+1274
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
2010-05-09Untabify C files. Will watch buildbots.Antoine Pitrou-1265/+1265
2010-05-08Merged revisions 81007 via svnmerge fromJean-Paul Calderone-0/+4
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81007 | jean-paul.calderone | 2010-05-08 16:06:02 -0400 (Sat, 08 May 2010) | 1 line Skip signal handler re-installation if it is not necessary. Issue 8354. ........
2010-05-08Skip signal handler re-installation if it is not necessary. Issue 8354.Jean-Paul Calderone-0/+4
2010-05-05Change to a Py_XDECREF and fix some whitespace.Brett Cannon-8/+8
Found using Clang's static analyzer.
2010-03-21Partial backport of r78826: leave import site error handler unchanged (printVictor Stinner-4/+12
the error and continue). Merged revisions 78826-78827 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78826 | victor.stinner | 2010-03-10 23:30:19 +0100 (mer., 10 mars 2010) | 5 lines 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. ........ r78827 | victor.stinner | 2010-03-10 23:45:04 +0100 (mer., 10 mars 2010) | 4 lines ooops, fix error message in execusercustomize() Copy/paste failure :-) ........
2010-03-10Issue #3137: Don't ignore errors at startup, especially a keyboard interruptVictor Stinner-16/+16
(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.
2009-10-27Merged revisions 75570,75574,75624 via svnmerge fromAntoine Pitrou-0/+30
svn+ssh://pythondev@svn.python.org/python/trunk ........ r75570 | antoine.pitrou | 2009-10-20 23:29:37 +0200 (mar., 20 oct. 2009) | 6 lines 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. ........ r75574 | antoine.pitrou | 2009-10-20 23:59:25 +0200 (mar., 20 oct. 2009) | 4 lines Test wouldn't work in debug mode. We probably need a function in test_support to handle this. ........ r75624 | antoine.pitrou | 2009-10-23 14:01:13 +0200 (ven., 23 oct. 2009) | 3 lines Fix Windows buildbot failure ........
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-04Merged revisions 71152 via svnmerge fromMatthias Klose-2/+3
svn+ssh://pythondev@svn.python.org/python/trunk ........ r71152 | matthias.klose | 2009-04-04 16:18:13 +0200 (Sa, 04 Apr 2009) | 3 lines - Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access with short file names. ........
2009-04-04- Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access withMatthias Klose-2/+3
short file names.
2009-03-31Merged revisions 70908 via svnmerge fromJesse Noller-0/+2
svn+ssh://pythondev@svn.python.org/python/trunk ........ r70908 | jesse.noller | 2009-03-31 17:20:35 -0500 (Tue, 31 Mar 2009) | 1 line Issue 5619: Pass MS CRT debug flags into subprocesses ........
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-03Merged revisions ↵Georg Brandl-3/+19
68133-68134,68141-68142,68145-68146,68148-68149,68159-68162,68166,68171-68174,68179,68195-68196,68210,68214-68215,68217-68222 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68133 | antoine.pitrou | 2009-01-01 16:38:03 +0100 (Thu, 01 Jan 2009) | 1 line fill in actual issue number in tests ........ r68134 | hirokazu.yamamoto | 2009-01-01 16:45:39 +0100 (Thu, 01 Jan 2009) | 2 lines Issue #4797: IOError.filename was not set when _fileio.FileIO failed to open file with `str' filename on Windows. ........ r68141 | benjamin.peterson | 2009-01-01 17:43:12 +0100 (Thu, 01 Jan 2009) | 1 line fix highlighting ........ r68142 | benjamin.peterson | 2009-01-01 18:29:49 +0100 (Thu, 01 Jan 2009) | 2 lines welcome to 2009, Python! ........ r68145 | amaury.forgeotdarc | 2009-01-02 01:03:54 +0100 (Fri, 02 Jan 2009) | 5 lines #4801 _collections module fails to build on cygwin. _PyObject_GC_TRACK is the macro version of PyObject_GC_Track, and according to documentation it should not be used for extension modules. ........ r68146 | ronald.oussoren | 2009-01-02 11:44:46 +0100 (Fri, 02 Jan 2009) | 2 lines Fix for issue4472: "configure --enable-shared doesn't work on OSX" ........ r68148 | ronald.oussoren | 2009-01-02 11:48:31 +0100 (Fri, 02 Jan 2009) | 2 lines Forgot to add a NEWS item in my previous checkin ........ r68149 | ronald.oussoren | 2009-01-02 11:50:48 +0100 (Fri, 02 Jan 2009) | 2 lines Fix for issue4780 ........ r68159 | ronald.oussoren | 2009-01-02 15:48:17 +0100 (Fri, 02 Jan 2009) | 2 lines Fix for issue 1627952 ........ r68160 | ronald.oussoren | 2009-01-02 15:52:09 +0100 (Fri, 02 Jan 2009) | 2 lines Fix for issue r1737832 ........ r68161 | ronald.oussoren | 2009-01-02 16:00:05 +0100 (Fri, 02 Jan 2009) | 3 lines Fix for issue 1149804 ........ r68162 | ronald.oussoren | 2009-01-02 16:06:00 +0100 (Fri, 02 Jan 2009) | 3 lines Fix for issue 4472 is incompatible with Cygwin, this patch should fix that. ........ r68166 | benjamin.peterson | 2009-01-02 19:26:23 +0100 (Fri, 02 Jan 2009) | 1 line document PyMemberDef ........ r68171 | georg.brandl | 2009-01-02 21:25:14 +0100 (Fri, 02 Jan 2009) | 3 lines #4811: fix markup glitches (mostly remains of the conversion), found by Gabriel Genellina. ........ r68172 | martin.v.loewis | 2009-01-02 21:32:55 +0100 (Fri, 02 Jan 2009) | 2 lines Issue #4075: Use OutputDebugStringW in Py_FatalError. ........ r68173 | martin.v.loewis | 2009-01-02 21:40:14 +0100 (Fri, 02 Jan 2009) | 2 lines Issue #4051: Prevent conflict of UNICODE macros in cPickle. ........ r68174 | benjamin.peterson | 2009-01-02 21:47:27 +0100 (Fri, 02 Jan 2009) | 1 line fix compilation on non-Windows platforms ........ r68179 | raymond.hettinger | 2009-01-02 22:26:45 +0100 (Fri, 02 Jan 2009) | 1 line Issue #4615. Document how to use itertools for de-duping. ........ r68195 | georg.brandl | 2009-01-03 14:45:15 +0100 (Sat, 03 Jan 2009) | 2 lines Remove useless string literal. ........ r68196 | georg.brandl | 2009-01-03 15:29:53 +0100 (Sat, 03 Jan 2009) | 2 lines Fix indentation. ........ r68210 | georg.brandl | 2009-01-03 20:10:12 +0100 (Sat, 03 Jan 2009) | 2 lines Set eol-style correctly for mp_distributing.py. ........ r68214 | georg.brandl | 2009-01-03 20:44:48 +0100 (Sat, 03 Jan 2009) | 2 lines Make indentation consistent. ........ r68215 | georg.brandl | 2009-01-03 21:15:14 +0100 (Sat, 03 Jan 2009) | 2 lines Fix role name. ........ r68217 | georg.brandl | 2009-01-03 21:30:15 +0100 (Sat, 03 Jan 2009) | 2 lines Add rstlint, a little tool to find subtle markup problems and inconsistencies in the Doc sources. ........ r68218 | georg.brandl | 2009-01-03 21:38:59 +0100 (Sat, 03 Jan 2009) | 2 lines Recognize usage of the default role. ........ r68219 | georg.brandl | 2009-01-03 21:47:01 +0100 (Sat, 03 Jan 2009) | 2 lines Fix uses of the default role. ........ r68220 | georg.brandl | 2009-01-03 21:55:06 +0100 (Sat, 03 Jan 2009) | 2 lines Remove trailing whitespace. ........ r68221 | georg.brandl | 2009-01-03 22:04:55 +0100 (Sat, 03 Jan 2009) | 2 lines Remove tabs from the documentation. ........ r68222 | georg.brandl | 2009-01-03 22:11:58 +0100 (Sat, 03 Jan 2009) | 2 lines Disable the line length checker by default. ........
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-22Merged revisions 67343 via svnmerge fromAmaury Forgeot d'Arc-1/+1
svn+ssh://pythondev@svn.python.org/python/trunk ........ r67343 | amaury.forgeotdarc | 2008-11-22 21:01:18 +0100 (sam., 22 nov. 2008) | 5 lines #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#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-31Merged revisions 67066 via svnmerge fromBenjamin Peterson-6/+12
svn+ssh://pythondev@svn.python.org/python/trunk ........ r67066 | benjamin.peterson | 2008-10-30 21:16:05 -0500 (Thu, 30 Oct 2008) | 5 lines 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-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.