summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | | | | Issue #15001: fix segfault on "del sys.module['__main__']"Hynek Schlawack2012-11-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Victor Stinner.
* | | | | | | | | | | | Close #13119: use "\r\n" newline for sys.stdout/err on WindowsVictor Stinner2012-08-041-5/+8
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sys.stdout and sys.stderr are now using "\r\n" newline on Windows, as Python 2.
* | | | | | | | | | | Issue #15020: The program name used to search for Python's path is now ↵Antoine Pitrou2012-07-051-0/+4
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | "python3" under Unix, not "python".
* | | | | | | | | | fix parse_syntax_error to clean up its resourcesBenjamin Peterson2012-04-031-20/+31
| |_|_|_|_|_|_|_|/ |/| | | | | | | |
* | | | | | | | | Fix test failure in test_cmd_line by initializing the hash secret at the ↵Antoine Pitrou2012-02-211-1/+0
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | earliest point.
* | | | | | | | Merge from 3.1: Issue #13703: add a way to randomize the hash values of ↵Georg Brandl2012-02-201-119/+252
|\ \ \ \ \ \ \ \ | | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | basic types (str, bytes, datetime) in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated. The environment variable PYTHONHASHSEED and the new command line flag -R control this behavior.
| * | | | | | | Fix a memory leak when initializing the standard I/O streams.Antoine Pitrou2012-01-181-1/+2
| |/ / / / / /
| * | | | | | Issue #7111: Python can now be run without a stdin, stdout or stderr stream.Antoine Pitrou2011-11-281-15/+16
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | It was already the case with Python 2. However, the corresponding sys module entries are now set to None (instead of an unusable file object).
| * | | | | Issue #13444: When stdout has been closed explicitly, we should not attempt ↵Antoine Pitrou2011-11-261-2/+18
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | to flush it at shutdown and print an error. This also adds a test for issue #5319, whose resolution introduced the issue.
| * | | | - 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.
| * | | Merge #6498 fix from 3.1.Georg Brandl2011-05-151-1/+1
| |\ \ \ | | |/ / | |/| |
| * | | 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-271-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-271-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 #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
| * | Fix ast_error_finish() and err_input(): filename can be NULLVictor Stinner2010-10-161-1/+6
| | | | | | | | | | | | Fix my previous commit (r85569).
| * | Issue #9713, #10114: Parser functions (eg. PyParser_ASTFromFile) expectsVictor Stinner2010-10-161-3/+9
| | | | | | | | | | | | | | | filenames encoded to the filesystem encoding with surrogateescape error handler (to support undecodable bytes), instead of UTF-8 in strict mode.
| * | Use locale encoding if Py_FileSystemDefaultEncoding is not setVictor Stinner2010-10-151-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
| * | redecode_filename(): don't need to initialize variablesVictor Stinner2010-10-151-1/+1
| | |
| * | Issue #9992: Remove PYTHONFSENCODING environment variable.Victor Stinner2010-10-131-16/+6
| | |
| * | Issue #9630: Redecode filenames when setting the filesystem encodingVictor Stinner2010-09-291-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.
| * | Issue #9901: Destroying the GIL in Py_Finalize() can fail if some otherAntoine Pitrou2010-09-201-5/+8
| | | | | | | | | | | | | | | threads are still running. Instead, reinitialize the GIL on a second call to Py_Initialize().
| * | Issue #9828: Destroy the GIL in Py_Finalize(), so that it gets properlyAntoine Pitrou2010-09-131-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.
| * | Issue #8622: Add PYTHONFSENCODING environment variable to override theVictor Stinner2010-08-181-22/+43
| | | | | | | | | | | | | | | | | | filesystem encoding. initfsencoding() displays also a better error message if get_codeset() failed.
| * | Issue #8063: Call _PyGILState_Init() earlier in Py_InitializeEx().Victor Stinner2010-08-171-5/+5
| | |
| * | Issue #477863: Print a warning at shutdown if gc.garbage is not empty.Antoine Pitrou2010-08-081-0/+3
| | |
| * | Issue #5319: Print an error if flushing stdout fails at interpreterAntoine Pitrou2010-08-081-1/+1
| | | | | | | | | | | | shutdown.
| * | Issue #9079: Added _PyTime_gettimeofday(_PyTime_timeval *tp) to C APIAlexander Belopolsky2010-08-051-0/+2
| | | | | | | | | | | | | | | | | | exposed in Python.h. This function is similar to POSIX gettimeofday(struct timeval *tp), but available on platforms without gettimeofday().
| * | Issue #6543: Write the traceback in the terminal encoding instead of utf-8.Victor Stinner2010-06-171-1/+1
| | | | | | | | | | | | | | | | | | Fix the encoding of the modules filename. Reindent also traceback.h, just because I hate tabs :-)
| * | Issue #8965: initfsencoding() doesn't change the encoding on Mac OS XVictor Stinner2010-06-111-17/+19
| | | | | | | | | | | | | | | File system encoding have to be hardcoded to "utf-8" on Mac OS X. r81190 introduced a regression: the encoding was changed depending on the locale.
| * | Py_FatalError(): don't sys sys.last_xxx variablesVictor Stinner2010-06-081-1/+1
| | | | | | | | | | | | | | | | | | 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).
| * | Issue #3798: sys.exit(message) writes the message to sys.stderr file, insteadVictor Stinner2010-05-211-4/+6
| | | | | | | | | | | | of the C file stderr, to use stderr encoding and error handler
| * | Issue #8766: Initialize _warnings module before importing the first module.Victor Stinner2010-05-191-1/+3
| | | | | | | | | | | | Fix a crash if an empty directory called "encodings" exists in sys.path.
| * | Issue #6697: Check that _PyUnicode_AsString() result is not NULLVictor Stinner2010-05-191-5/+21
| | |
| * | handle_system_exit() flushs files to warranty the output orderVictor Stinner2010-05-171-0/+4
| | | | | | | | | | | | | | | | | | 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).
| * | Issue #8610: Load file system codec at startup, and display a fatal error onVictor Stinner2010-05-151-20/+42
| | | | | | | | | | | | | | | failure. Set the file system encoding to utf-8 (instead of None) if getting the locale encoding failed, or if nl_langinfo(CODESET) function is missing.