summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
Commit message (Collapse)AuthorAgeFilesLines
* PEP 415: Implement suppression of __context__ display with an exception ↵Benjamin Peterson2012-05-151-6/+3
| | | | | | attribute This replaces the original PEP 409 implementation. See #14133.
* Issues #13959, 14647: Re-implement imp.reload() in Lib/imp.py.Brett Cannon2012-04-291-4/+0
| | | | Thanks to Eric Snow for the patch.
* Issue #14605: Make explicit the entries on sys.path_hooks that used toBrett Cannon2012-04-261-1/+1
| | | | | | | | | | | | be implicit. Added a warning for when sys.path_hooks is found to be empty. Also changed the meaning of None in sys.path_importer_cache to represent trying sys.path_hooks again (an interpretation of previous semantics). Also added a warning for when None was found. The long-term goal is for None in sys.path_importer_cache to represent the same as imp.NullImporter: no finder found for that sys.path entry.
* Issue #13959: Rename imp to _imp and add Lib/imp.py and beginBrett Cannon2012-04-151-2/+2
| | | | | | | rewriting functionality in pure Python. To start, imp.new_module() has been rewritten in pure Python, put into importlib (privately) and then publicly exposed in imp.
* Plug a refleak.Brett Cannon2012-04-151-2/+1
|
* Issue #2377: Make importlib the implementation of __import__().Brett Cannon2012-04-141-2/+59
| | | | | | | importlib._bootstrap is now frozen into Python/importlib.h and stored as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen code along with sys and imp and then uses _frozen_importlib._install() to set builtins.__import__() w/ _frozen_importlib.__import__().
* merge 3.2Benjamin Peterson2012-04-031-20/+31
|\
| * fix parse_syntax_error to clean up its resourcesBenjamin Peterson2012-04-031-20/+31
| |
* | Close issue #6210: Implement PEP 409Nick Coghlan2012-02-261-1/+5
| |
* | Fix test failure in test_cmd_line by initializing the hash secret at the ↵Antoine Pitrou2012-02-211-1/+0
|\ \ | |/ | | | | earliest point.
| * Fix test failure in test_cmd_line by initializing the hash secret at the ↵Antoine Pitrou2012-02-211-1/+0
| | | | | | | | earliest point.
* | Merge 3.2: Issue #13703 plus some related test suite fixes.Georg Brandl2012-02-201-0/+8
|\ \ | |/
| * Merge from 3.1: Issue #13703: add a way to randomize the hash values of ↵Georg Brandl2012-02-201-0/+8
| |\ | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * Issue #13703: add a way to randomize the hash values of basic types (str, ↵Georg Brandl2012-02-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Issue #12705: Raise SyntaxError when compiling multiple statements as single ↵Meador Inge2012-01-191-0/+3
| | | | | | | | | | | | interactive statement
* | | Fix a memory leak when initializing the standard I/O streams.Antoine Pitrou2012-01-181-1/+2
|\ \ \ | |/ /
| * | Fix a memory leak when initializing the standard I/O streams.Antoine Pitrou2012-01-181-1/+2
| | |
* | | Issue #13645: pyc files now contain the size of the corresponding sourceAntoine Pitrou2012-01-131-0/+2
| | | | | | | | | | | | | | | code, to avoid timestamp collisions (especially on filesystems with a low timestamp resolution) when checking for freshness of the bytecode.
* | | Issue #13575: there is only one class type.Florent Xicluna2011-12-121-6/+1
| | |
* | | 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 #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 #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.
* | | print_exception() uses PyUnicode_GetLength() instead of PyUnicode_GetSize()Victor Stinner2011-11-201-1/+1
| | |
* | | Issue #10227: Add an allocation cache for a single slice object.Antoine Pitrou2011-11-181-0/+1
| | | | | | | | | | | | Patch by Stefan Behnel.
* | | Issue #12281: Rewrite the MBCS codec to handle correctly replace and ignoreVictor Stinner2011-10-181-2/+3
| | | | | | | | | | | | | | | error handlers on all Windows versions. The MBCS codec is now supporting all error handlers, instead of only replace to encode and ignore to decode.
* | | Port SetAttrString/HasAttrString to SetAttrId/GetAttrId.Martin v. Löwis2011-10-141-3/+6
| | |
* | | Rename _Py_identifier to _Py_IDENTIFIER.Martin v. Löwis2011-10-141-16/+16
| | |
* | | Use identifier API for PyObject_GetAttrString.Martin v. Löwis2011-10-101-10/+20
| | |
* | | Add API for static strings, primarily good for identifiers.Martin v. Löwis2011-10-091-12/+18
| | | | | | | | | | | | Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
* | | - 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 #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. ........ ................