summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
AgeCommit message (Collapse)AuthorLines
2011-10-09Add API for static strings, primarily good for identifiers.Martin v. Löwis-12/+18
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
2011-09-20- Issue #13021: Missing decref on an error path. Thanks to Suman Saha forBarry Warsaw-1/+3
finding the bug and providing a patch.
2011-09-20- Issue #13021: Missing decref on an error path. Thanks to Suman Saha forBarry Warsaw-1/+3
finding the bug and providing a patch.
2011-07-04Issue #9642: Fix filesystem encoding initialization: use the ANSI code page onVictor Stinner-14/+14
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.
2011-05-26print_exception(): handle correctly PyObject_GetAttrString() failureVictor Stinner-1/+1
Bug found by the Clang Static Analyzer.
2011-05-15Merge #6498 fix from 3.2.Georg Brandl-1/+1
2011-05-15Merge #6498 fix from 3.1.Georg Brandl-1/+1
2011-05-15Closes #6498: fix several misspellings of "SystemExit" as "SystemError".Georg Brandl-1/+1
2011-05-07faulthandler: dump all threads by defaultVictor Stinner-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.
2011-05-04Issue #1856: Avoid crashes and lockups when daemon threads run while theAntoine Pitrou-4/+11
interpreter is shutting down; instead, these threads are now killed when they try to take the GIL.
2011-05-04Issue #1856: Avoid crashes and lockups when daemon threads run while theAntoine Pitrou-4/+11
interpreter is shutting down; instead, these threads are now killed when they try to take the GIL.
2011-04-27Issue #10914: Initialize correctly the filesystem codec when creating a newVictor Stinner-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.
2011-04-27Issue #10914: Initialize correctly the filesystem codec when creating a newVictor Stinner-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.
2011-04-27Issue #10914: Py_NewInterpreter() uses PyErr_PrintEx(0)Victor Stinner-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.
2011-04-27Issue #10914: Py_NewInterpreter() uses PyErr_PrintEx(0)Victor Stinner-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.
2011-04-05Issue #10785: Store the filename as Unicode in the Python parser.Victor Stinner-16/+24
2011-04-01Issue #11393: The fault handler handles also SIGABRTVictor Stinner-0/+1
2011-03-31Issue #11393: Add the new faulthandler moduleVictor Stinner-0/+21
2011-03-20Fix #11586: typo in initfsencoding()Victor Stinner-1/+1
Patch written by Ray Allen.
2011-03-20Fix #11586: typo in initfsencoding()Victor Stinner-1/+1
Patch written by Ray Allen.
2011-02-23Merged revisions 88530 via svnmerge fromVictor Stinner-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'). ........
2011-02-23Issue #11272: Fix input() and sys.stdin for Windows newlineVictor Stinner-1/+10
On Windows, input() strips '\r' (and not only '\n'), and sys.stdin uses universal newline (replace '\r\n' by '\n').
2011-01-04Issue #9566: use Py_ssize_t instead of intVictor Stinner-1/+2
2010-12-28Add sys.flags.quiet attribute for the new -q option, as noted missing by ↵Georg Brandl-0/+1
Eric in #1772833.
2010-12-04Add an "optimize" parameter to compile() to control the optimization level, ↵Georg Brandl-4/+12
and provide an interface to it in py_compile, compileall and PyZipFile.
2010-12-03Merge branches/pep-0384.Martin v. Löwis-2/+10
2010-11-30Remove redundant includes of headers that are already included by Python.h.Georg Brandl-4/+0
2010-11-20Issue #10255: Fix reference leak in Py_InitializeEx(). Patch by NeilAntoine Pitrou-0/+2
Schemenauer.
2010-11-10Issue #10372: Import the warnings module only after the IO library isAntoine Pitrou-7/+9
initialized, so as to avoid bootstrap issues with the '-W' option.
2010-10-30Merged revisions 85980 via svnmerge fromHirokazu Yamamoto-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. ........
2010-10-30Issue #10157: Fixed refleaks in pythonrun.c. Patch by Stefan Krah.Hirokazu Yamamoto-0/+3
2010-10-29Merged revisions 85817,85904 via svnmerge fromBenjamin Peterson-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) ........
2010-10-29decrement offset when it points to a newline (#10186 followup)Benjamin Peterson-1/+3
2010-10-24tighten loopBenjamin Peterson-4/+1
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-10-24remove broken code accounting an offset the size of the line #10186Benjamin Peterson-2/+0
2010-10-23Issue #10077: Fix logging of site module errors at startup.Victor Stinner-1/+4
2010-10-19Recorded merge of revisions 85569-85570 via svnmerge fromVictor Stinner-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). ........
2010-10-19initfsencoding(): get_codeset() failure is now a fatal errorVictor Stinner-13/+6
Don't fallback to utf-8 anymore to avoid mojibake. I never got any error from his function.
2010-10-17_PyImport_FixupExtension() and _PyImport_FindExtension() uses FS encodingVictor Stinner-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
2010-10-16Fix ast_error_finish() and err_input(): filename can be NULLVictor Stinner-1/+6
Fix my previous commit (r85569).
2010-10-16Issue #9713, #10114: Parser functions (eg. PyParser_ASTFromFile) expectsVictor Stinner-3/+9
filenames encoded to the filesystem encoding with surrogateescape error handler (to support undecodable bytes), instead of UTF-8 in strict mode.
2010-10-15Use locale encoding if Py_FileSystemDefaultEncoding is not setVictor Stinner-258/+0
* PyUnicode_EncodeFSDefault(), PyUnicode_DecodeFSDefaultAndSize() and PyUnicode_DecodeFSDefault() use the locale encoding instead of UTF-8 if Py_FileSystemDefaultEncoding is NULL * redecode_filenames() functions and _Py_code_object_list (issue #9630) are no more needed: remove them
2010-10-15redecode_filename(): don't need to initialize variablesVictor Stinner-1/+1
2010-10-13Issue #9992: Remove PYTHONFSENCODING environment variable.Victor Stinner-16/+6
2010-09-29Issue #9630: Redecode filenames when setting the filesystem encodingVictor Stinner-0/+258
Redecode the filenames of: - all modules: __file__ and __path__ attributes - all code objects: co_filename attribute - sys.path - sys.meta_path - sys.executable - sys.path_importer_cache (keys) Keep weak references to all code objects until initfsencoding() is called, to be able to redecode co_filename attribute of all code objects.
2010-09-20Issue #9901: Destroying the GIL in Py_Finalize() can fail if some otherAntoine Pitrou-5/+8
threads are still running. Instead, reinitialize the GIL on a second call to Py_Initialize().
2010-09-13Issue #9828: Destroy the GIL in Py_Finalize(), so that it gets properlyAntoine Pitrou-0/+4
re-created on a subsequent call to Py_Initialize(). The problem (a crash) wouldn't appear in 3.1 or 2.7 where the GIL's structure is more trivial.
2010-08-18Issue #8622: Add PYTHONFSENCODING environment variable to override theVictor Stinner-22/+43
filesystem encoding. initfsencoding() displays also a better error message if get_codeset() failed.
2010-08-17Issue #8063: Call _PyGILState_Init() earlier in Py_InitializeEx().Victor Stinner-5/+5