summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #1545463: Global variables caught in reference cycles are now ↵Antoine Pitrou2013-05-061-4/+1
| | | | garbage-collected at shutdown.
* Fix crash caused by 8c1385205a35Antoine Pitrou2013-05-051-6/+8
|\ | | | | | | (thanks Arfrever for reporting).
| * Fix crash caused by 8c1385205a35Antoine Pitrou2013-05-051-6/+8
| | | | | | | | (thanks Arfrever for reporting).
* | #17115: I hate you MS for not supporting C99.Brett Cannon2013-05-041-2/+2
| |
* | Issue #17408: Avoid using an obsolete instance of the copyreg module when ↵Antoine Pitrou2013-05-041-3/+1
|\ \ | |/ | | | | the interpreter is shutdown and then started again.
| * Issue #17408: Avoid using an obsolete instance of the copyreg module when ↵Antoine Pitrou2013-05-041-3/+1
| | | | | | | | the interpreter is shutdown and then started again.
* | #17115,17116: Have modules initialize the __package__ and __loader__Brett Cannon2013-05-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | attributes to None. The long-term goal is for people to be able to rely on these attributes existing and checking for None to see if they have been set. Since import itself sets these attributes when a loader does not the only instances when the attributes are None are from someone overloading __import__() and not using a loader or someone creating a module from scratch. This patch also unifies module initialization. Before you could have different attributes with default values depending on how the module object was created. Now the only way to not get the same default set of attributes is to circumvent initialization by calling ModuleType.__new__() directly.
* | merge 3.3 (#17863)Benjamin Peterson2013-04-291-9/+8
|\ \ | |/
| * ignore errors when trying to fetch sys.stdin.encoding (closes #17863)Benjamin Peterson2013-04-291-9/+8
| |
* | Issue #17832: fix a compilation warning about a function prototype.Antoine Pitrou2013-04-241-1/+2
| | | | | | | | Also, make the private function static.
* | #17323: The "[X refs, Y blocks]" printed by debug builds has been disabled ↵Ezio Melotti2013-03-251-4/+20
| | | | | | | | by default. It can be re-enabled with the `-X showrefcount` option.
* | Issue #13390: New function :func:`sys.getallocatedblocks()` returns the ↵Antoine Pitrou2012-12-091-3/+4
|/ | | | | | number of memory blocks currently allocated. Also, the ``-R`` option to regrtest uses this function to guard against memory allocation leaks.
* Issue #15001: fix segfault on "del sys.module['__main__']"Hynek Schlawack2012-11-071-6/+6
|\ | | | | | | Patch by Victor Stinner.
| * 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-031-5/+8
| | | | | | | | sys.stdout and sys.stderr are now using "\r\n" newline on Windows, as Python 2.
* | Issue #16218: Support non ascii characters in python launcher.Andrew Svetlov2012-11-011-2/+7
| | | | | | | | Patch by Serhiy Storchaka.
* | Issue #15895: my analysis was slightly off. The FILE pointer is only leaked ↵Christian Heimes2012-09-111-8/+6
| | | | | | | | when set_main_loader() fails for a pyc file with closeit=0. In the success case run_pyc_file() does its own cleanup of the fp. I've changed the code to use another FILE ptr for pyc files and moved the fclose() to PyRun_SimpleFileExFlags() to make it more obvious what's happening.
* | Issue #15895: Fix FILE pointer leak in PyRun_SimpleFileExFlags() when ↵Christian Heimes2012-09-111-1/+5
| | | | | | | | filename points to a pyc/pyo file and closeit is false.
* | Close #13119: use "\r\n" newline for sys.stdout/err on WindowsVictor Stinner2012-08-031-5/+8
| | | | | | | | sys.stdout and sys.stderr are now using "\r\n" newline on Windows, as Python 2.
* | Fix initialization of the faulthandler moduleVictor Stinner2012-07-311-4/+4
| | | | | | | | | | | | | | faulthandler requires the importlib if "-X faulthandler" option is present on the command line, so initialize faulthandler after importlib. Add also an unit test.
* | Refcounting fixesNick Coghlan2012-07-151-3/+7
| |
* | Make set_main_loader static (noticed by Antoine Pitrou)Nick Coghlan2012-07-151-1/+1
| |
* | Actually initialize __main__.__loader__ with loader instances, not the ↵Nick Coghlan2012-07-151-2/+6
| | | | | | | | corresponding type objects
* | Take the first step in resolving the messy pkgutil vs importlib edge cases ↵Nick Coghlan2012-07-151-7/+58
| | | | | | | | by basing pkgutil explicitly on importlib, deprecating its internal import emulation and setting __main__.__loader__ correctly so that runpy still works (Affects #15343, #15314, #15357)
* | 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.
| * 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".
* | Issue #14785: Add sys._debugmallocstats() to help debug low-level memory ↵David Malcolm2012-06-221-1/+1
| | | | | | | | allocation issues
* | Issue #14928: Fix importlib bootstrap issues by using a custom executable ↵Antoine Pitrou2012-06-191-1/+10
| | | | | | | | (Modules/_freeze_importlib) to build Python/importlib.h.
* | 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.