summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * | - Issue #13021: Missing decref on an error path. Thanks to Suman Saha forBarry Warsaw2011-09-201-1/+3
| | | | | | | | | | | | finding the bug and providing a patch.
* | | Issue #9642: Fix filesystem encoding initialization: use the ANSI code page onVictor Stinner2011-07-041-15/+15
| | | | | | | | | | | | | | | | | | Windows if the mbcs codec is not available, and fail with a fatal error if we cannot get the locale encoding (if nl_langinfo(CODESET) is not available) instead of using UTF-8.
* | | print_exception(): handle correctly PyObject_GetAttrString() failureVictor Stinner2011-05-261-1/+1
| | | | | | | | | | | | Bug found by the Clang Static Analyzer.
* | | Merge #6498 fix from 3.2.Georg Brandl2011-05-151-1/+1
|\ \ \ | |/ /
| * | Merge #6498 fix from 3.1.Georg Brandl2011-05-151-1/+1
| |\ \ | | |/
| | * Closes #6498: fix several misspellings of "SystemExit" as "SystemError".Georg Brandl2011-05-151-1/+1
| | |
| | * Merged revisions 85980 via svnmerge fromHirokazu Yamamoto2010-10-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85980 | hirokazu.yamamoto | 2010-10-31 00:08:15 +0900 | 1 line Issue #10157: Fixed refleaks in pythonrun.c. Patch by Stefan Krah. ........
| | * Merged revisions 85817,85904 via svnmerge fromBenjamin Peterson2010-10-291-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85817 | benjamin.peterson | 2010-10-23 22:41:46 -0500 (Sat, 23 Oct 2010) | 1 line tighten loop ........ 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) ........
| | * Merged revisions 85814 via svnmerge fromBenjamin Peterson2010-10-241-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 ........
| | * Issue #10077: Fix logging of site module errors at startup.Victor Stinner2010-10-231-1/+4
| | |
| | * Recorded merge of revisions 85569-85570 via svnmerge fromVictor Stinner2010-10-191-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85569 | victor.stinner | 2010-10-16 15:14:10 +0200 (sam., 16 oct. 2010) | 4 lines Issue #9713, #10114: Parser functions (eg. PyParser_ASTFromFile) expects filenames encoded to the filesystem encoding with surrogateescape error handler (to support undecodable bytes), instead of UTF-8 in strict mode. ........ r85570 | victor.stinner | 2010-10-16 15:42:53 +0200 (sam., 16 oct. 2010) | 4 lines Fix ast_error_finish() and err_input(): filename can be NULL Fix my previous commit (r85569). ........
| | * Merged revisions 83854 via svnmerge fromAntoine Pitrou2010-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83854 | antoine.pitrou | 2010-08-08 22:46:42 +0200 (dim., 08 août 2010) | 4 lines Issue #5319: Print an error if flushing stdout fails at interpreter shutdown. ........
| | * Merged revisions 82059,82061 via svnmerge fromVictor Stinner2010-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82059 | victor.stinner | 2010-06-18 01:08:50 +0200 (ven., 18 juin 2010) | 5 lines Issue #6543: Write the traceback in the terminal encoding instead of utf-8. Fix the encoding of the modules filename. Reindent also traceback.h, just because I hate tabs :-) ........ r82061 | victor.stinner | 2010-06-18 01:17:37 +0200 (ven., 18 juin 2010) | 2 lines Issue #6543: Mention the author of the patch, Amaury Forgeot d'Arc ........
| | * Merged revisions 81844 via svnmerge fromVictor Stinner2010-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r81844 | victor.stinner | 2010-06-08 23:00:13 +0200 (mar., 08 juin 2010) | 6 lines Py_FatalError(): don't sys sys.last_xxx variables Call PyErr_PrintEx(0) instead of PyErr_Print() to avoid a crash if Py_FatalError() is called in an early stage of Python initialization (if PySys is not yet initialized). ........
| | * Recorded merge of revisions 81364 via svnmerge fromVictor Stinner2010-05-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r81364 | victor.stinner | 2010-05-19 22:40:50 +0200 (mer., 19 mai 2010) | 3 lines Issue #8766: Initialize _warnings module before importing the first module. Fix a crash if an empty directory called "encodings" exists in sys.path. ........
| | * Merged revisions 81250-81253 via svnmerge fromVictor Stinner2010-05-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r81250 | victor.stinner | 2010-05-17 03:13:37 +0200 (lun., 17 mai 2010) | 2 lines Issue #6697: Fix a crash if code of "python -c code" contains surrogates ........ r81251 | victor.stinner | 2010-05-17 03:26:01 +0200 (lun., 17 mai 2010) | 3 lines PyObject_Dump() encodes unicode objects to utf8 with backslashreplace (instead of strict) error handler to escape surrogates ........ r81252 | victor.stinner | 2010-05-17 10:58:51 +0200 (lun., 17 mai 2010) | 6 lines handle_system_exit() flushs files to warranty the output order PyObject_Print() writes into the C object stderr, whereas PySys_WriteStderr() writes into the Python object sys.stderr. Each object has its own buffer, so call sys.stderr.flush() and fflush(stderr). ........ r81253 | victor.stinner | 2010-05-17 11:33:42 +0200 (lun., 17 mai 2010) | 6 lines Fix refleak in internal_print() introduced by myself in r81251 _PyUnicode_AsDefaultEncodedString() uses a magical PyUnicode attribute to automatically destroy PyUnicode_EncodeUTF8() result when the unicode string is destroyed. ........
| | * Merged revisions 81156 via svnmerge fromVictor Stinner2010-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r81156 | victor.stinner | 2010-05-14 02:59:09 +0200 (ven., 14 mai 2010) | 5 lines Issue #4653: fix typo in flush_std_files() Don't call sys.stderr.flush() if sys has no stderr attribute or if sys.stderr==None. ........
| | * Recorded merge of revisions 81032 via svnmerge fromAntoine Pitrou2010-05-091-1642/+1642
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines Recorded merge of revisions 81029 via svnmerge from 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. ........ ................
| | * Merged revisions 81016 via svnmerge fromJean-Paul Calderone2010-05-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81016 | jean-paul.calderone | 2010-05-08 23:18:57 -0400 (Sat, 08 May 2010) | 9 lines Merged revisions 81007 via svnmerge from 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. ........ ................
| | * Revert my change on initsite(): don't change import site error handler in 3.1,Victor Stinner2010-03-211-4/+14
| | | | | | | | | | | | as I did for 2.6. But fix the other bugs :-)
| | * Merged revisions 78872 via svnmerge fromVictor Stinner2010-03-211-16/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r78872 | victor.stinner | 2010-03-12 15:45:56 +0100 (ven., 12 mars 2010) | 12 lines Merged revisions 78826 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. ........ ................
| | * Merged revisions 76573 via svnmerge fromAntoine Pitrou2009-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r76573 | antoine.pitrou | 2009-11-28 17:12:28 +0100 (sam., 28 nov. 2009) | 3 lines Issue #4486: When an exception has an explicit cause, do not print its implicit context too. ........
| | * Merged revisions 75571,75576-75577 via svnmerge fromAntoine Pitrou2009-10-201-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r75571 | antoine.pitrou | 2009-10-20 23:52:47 +0200 (mar., 20 oct. 2009) | 11 lines Merged revisions 75570 via svnmerge from 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. ........ ................ r75576 | antoine.pitrou | 2009-10-21 00:02:29 +0200 (mer., 21 oct. 2009) | 10 lines Merged revisions 75574 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ 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. ........ ................ r75577 | antoine.pitrou | 2009-10-21 00:05:38 +0200 (mer., 21 oct. 2009) | 3 lines Another futile error in the previous commit :-( ................
* | | faulthandler: dump all threads by defaultVictor Stinner2011-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Set the default value of all_threads arguments to True * Py_FatalError() dumps all threads, instead of only the current thread Dump only the current thread is not reliable. In some cases, Python is unable to retrieve the state of the current thread and so is unable to dump the traceback. faulthandler keeps a reference to the interpreter and so is always able to dump the traceback of all threads.
* | | Issue #1856: Avoid crashes and lockups when daemon threads run while theAntoine Pitrou2011-05-041-4/+11
|\ \ \ | |/ / | | | | | | | | | interpreter is shutting down; instead, these threads are now killed when they try to take the GIL.
| * | Issue #1856: Avoid crashes and lockups when daemon threads run while theAntoine Pitrou2011-05-041-4/+11
| | | | | | | | | | | | | | | interpreter is shutting down; instead, these threads are now killed when they try to take the GIL.
| * | Issue #10914: Initialize correctly the filesystem codec when creating a newVictor Stinner2011-04-261-8/+15
| | | | | | | | | | | | | | | | | | | | | subinterpreter to fix a bootstrap issue with codecs implemented in Python, as the ISO-8859-15 codec. Add fscodec_initialized attribute to the PyInterpreterState structure.
| * | Issue #10914: Py_NewInterpreter() uses PyErr_PrintEx(0)Victor Stinner2011-04-261-1/+1
| | | | | | | | | | | | | | | ... instead of PyErr_Print() because we don't need to set sys attributes, the sys module is destroyed just after printing the error.
| * | Fix #11586: typo in initfsencoding()Victor Stinner2011-03-201-1/+1
| | | | | | | | | | | | Patch written by Ray Allen.
| * | Merged revisions 88530 via svnmerge fromVictor Stinner2011-02-231-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88530 | victor.stinner | 2011-02-23 13:07:37 +0100 (mer., 23 févr. 2011) | 4 lines Issue #11272: Fix input() and sys.stdin for Windows newline On Windows, input() strips '\r' (and not only '\n'), and sys.stdin uses universal newline (replace '\r\n' by '\n'). ........
* | | Issue #10914: Initialize correctly the filesystem codec when creating a newVictor Stinner2011-04-261-8/+15
| | | | | | | | | | | | | | | | | | | | | subinterpreter to fix a bootstrap issue with codecs implemented in Python, as the ISO-8859-15 codec. Add fscodec_initialized attribute to the PyInterpreterState structure.
* | | Issue #10914: Py_NewInterpreter() uses PyErr_PrintEx(0)Victor Stinner2011-04-261-1/+1
| | | | | | | | | | | | | | | ... instead of PyErr_Print() because we don't need to set sys attributes, the sys module is destroyed just after printing the error.
* | | Issue #10785: Store the filename as Unicode in the Python parser.Victor Stinner2011-04-041-16/+24
| | |
* | | Issue #11393: The fault handler handles also SIGABRTVictor Stinner2011-04-011-0/+1
| | |
* | | Issue #11393: Add the new faulthandler moduleVictor Stinner2011-03-301-0/+21
| | |
* | | Fix #11586: typo in initfsencoding()Victor Stinner2011-03-201-1/+1
| | | | | | | | | | | | Patch written by Ray Allen.
* | | Issue #11272: Fix input() and sys.stdin for Windows newlineVictor Stinner2011-02-231-1/+10
|/ / | | | | | | | | On Windows, input() strips '\r' (and not only '\n'), and sys.stdin uses universal newline (replace '\r\n' by '\n').
* | Issue #9566: use Py_ssize_t instead of intVictor Stinner2011-01-041-1/+2
| |
* | Add sys.flags.quiet attribute for the new -q option, as noted missing by ↵Georg Brandl2010-12-281-0/+1
| | | | | | | | Eric in #1772833.
* | Add an "optimize" parameter to compile() to control the optimization level, ↵Georg Brandl2010-12-041-4/+12
| | | | | | | | and provide an interface to it in py_compile, compileall and PyZipFile.
* | Merge branches/pep-0384.Martin v. Löwis2010-12-031-2/+10
| |
* | Remove redundant includes of headers that are already included by Python.h.Georg Brandl2010-11-301-4/+0
| |
* | Issue #10255: Fix reference leak in Py_InitializeEx(). Patch by NeilAntoine Pitrou2010-11-201-0/+2
| | | | | | | | Schemenauer.
* | Issue #10372: Import the warnings module only after the IO library isAntoine Pitrou2010-11-101-7/+9
| | | | | | | | initialized, so as to avoid bootstrap issues with the '-W' option.
* | Issue #10157: Fixed refleaks in pythonrun.c. Patch by Stefan Krah.Hirokazu Yamamoto2010-10-301-0/+3
| |
* | decrement offset when it points to a newline (#10186 followup)Benjamin Peterson2010-10-291-1/+3
| |
* | tighten loopBenjamin Peterson2010-10-241-4/+1
| |
* | remove broken code accounting an offset the size of the line #10186Benjamin Peterson2010-10-241-2/+0
| |
* | initfsencoding(): get_codeset() failure is now a fatal errorVictor Stinner2010-10-191-13/+6
| | | | | | | | | | Don't fallback to utf-8 anymore to avoid mojibake. I never got any error from his function.
* | _PyImport_FixupExtension() and _PyImport_FindExtension() uses FS encodingVictor Stinner2010-10-171-4/+4
| | | | | | | | | | | | | | * Rename _PyImport_FindExtension() to _PyImport_FindExtensionUnicode(): the filename becomes a Unicode object instead of byte string * Rename _PyImport_FixupExtension() to _PyImport_FixupExtensionUnicode(): the filename becomes a Unicode object instead of byte string