summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #18818: The "encodingname" part of PYTHONIOENCODING is now optional.Serhiy Storchaka2013-09-131-8/+12
|
* Issue #18756: os.urandom() now uses a lazily-opened persistent file ↵Antoine Pitrou2013-08-301-0/+1
| | | | descriptor, so as to avoid using many file descriptors when run in parallel from multiple threads.
* pythonrun.c: use MAXPATHLEN instead of PATH_MAXVictor Stinner2013-08-271-1/+1
| | | | PATH_MAX is not available on "MIPS IRIX 6.5.30 [SB] 3.x" buildbot
* Issue #18571: Implementation of the PEP 446: file descriptors and file handlesVictor Stinner2013-08-271-1/+1
| | | | | are now created non-inheritable; add functions os.get/set_inheritable(), os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
* Close #11619: The parser and the import machinery do not encode UnicodeVictor Stinner2013-08-261-22/+82
| | | | filenames anymore on Windows.
* Issue #18808: Non-daemon threads are now automatically joined when a ↵Antoine Pitrou2013-08-251-0/+3
| | | | sub-interpreter is shutdown (it would previously dump a fatal error).
* Issue #16400: Add command line option for isolated mode.Christian Heimes2013-08-101-0/+1
| | | | | | | | | | -I Run Python in isolated mode. This also implies -E and -s. In isolated mode sys.path contains neither the script’s directory nor the user’s site-packages directory. All PYTHON* environment variables are ignored, too. Further restrictions may be imposed to prevent the user from injecting malicious code.
* Fix styleAntoine Pitrou2013-07-301-2/+2
|
* Issue #18520: Fix initstdio(), handle PySys_SetObject() failureVictor Stinner2013-07-221-2/+8
|
* Issue #18520: initsite() is a little bit more verbose when import site failsVictor Stinner2013-07-221-0/+1
|
* Issue #18520: Add a new PyStructSequence_InitType2() function, same thanVictor Stinner2013-07-221-1/+2
| | | | | | | | PyStructSequence_InitType() except that it has a return value (0 on success, -1 on error). * PyStructSequence_InitType2() now raises MemoryError on memory allocation failure * Fix also some calls to PyDict_SetItemString(): handle error
* Issue #18520: Fix initsigs(), handle PyOS_InitInterrupts() errorVictor Stinner2013-07-211-0/+3
| | | | PyOS_InitInterrupts() can raise error when importing the signal module
* Close #18469: Replace PyDict_GetItemString() with _PyDict_GetItemId() in ↵Victor Stinner2013-07-161-0/+3
| | | | | | | | | | | | structseq.c _PyDict_GetItemId() is more efficient: it only builds the Unicode string once. Identifiers (dictionary keys) are now created at Python initialization, and if the creation failed, Python does exit with a fatal error. Before, PyDict_GetItemString() failure was not handled: structseq_new() could call PyObject_GC_NewVar() with a negative size, and structseq_dealloc() could also crash.
* Issue #18203: Add _PyMem_RawStrdup() and _PyMem_Strdup()Victor Stinner2013-07-071-9/+12
| | | | | Replace strdup() with _PyMem_RawStrdup() or _PyMem_Strdup(), depending if the GIL is held or not.
* Issue #18203: Fix Py_Finalize(): destroy the GIL after the last call toVictor Stinner2013-07-071-9/+9
| | | | | | | PyMem_Malloc() or PyObject_Malloc(). For example, PyCFunction_Fini() calls PyObject_GC_Del() which calls PyObject_FREE().
* 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
|\ \ | |/