summaryrefslogtreecommitdiffstats
path: root/Modules/main.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30565: Add PYTHONCOERCECLOCALE=warn runtime flag (GH-2260)Nick Coghlan2017-06-181-4/+3
| | | | | | | | | | | | - removes PY_WARN_ON_C_LOCALE build time flag - locale coercion and compatibility warnings are now always compiled in, but are off by default - adds PYTHONCOERCECLOCALE=warn runtime option to aid in debugging potentially locale related compatibility problems Due to not-yet-resolved test failures on *BSD systems (including Mac OS X), this also temporarily disables UTF-8 as a locale coercion target, and skips testing the interpreter's behavior in the POSIX locale.
* bpo-30636: Fix the indentation for the help (#2131)Stéphane Wirtel2017-06-131-1/+1
|
* bpo-30636: Add PYTHONCOERCECLOCALE to the help of the command line (GH-2125)Stéphane Wirtel2017-06-121-0/+4
|
* bpo-22257: Private C-API for main interpreter initialization (PEP 432). (#1729)Eric Snow2017-05-241-2/+15
| | | (patch by Nick Coghlan)
* bpo-22257: Private C-API for core runtime initialization (PEP 432). (#1772)Eric Snow2017-05-241-16/+19
| | | (patch by Nick Coghlan)
* bpo-22257: Fix CLI by using int instead of char (compares to EOF). (#1765)Eric Snow2017-05-231-1/+1
|
* bpo-22257: Small changes for PEP 432. (#1728)Eric Snow2017-05-231-107/+180
| | | PEP 432 specifies a number of large changes to interpreter startup code, including exposing a cleaner C-API. The major changes depend on a number of smaller changes. This patch includes all those smaller changes.
* bpo-30022: Get rid of using EnvironmentError and IOError (except test… (#1051)Serhiy Storchaka2017-04-161-1/+1
|
* bpo-29723: Consistently configure sys.path[0] (#575)Nick Coghlan2017-03-121-28/+44
| | | | | | | | | | | | | | | | | | | | | | Directory and zipfile execution previously added the parent directory of the directory or zipfile as sys.path[0] and then subsequently overwrote it with the directory or zipfile itself. This caused problems in isolated mode, as it overwrote the "stdlib as a zip archive" entry in sys.path, as the parent directory was never added. The attempted fix to that issue in bpo-29319 created the opposite problem in *non*-isolated mode, by potentially leaving the parent directory on sys.path instead of overwriting it. This change fixes the root cause of the problem by removing the whole "add-and-overwrite" dance for sys.path[0], and instead simply never adds the parent directory to sys.path in the first place.
* bpo-29770: remove outdated PYO related info (GH-590)Xiang Zhang2017-03-111-1/+1
|
* Issue #29319: Prevent RunMainFromImporter overwriting sys.path[0].Steve Dower2017-02-041-2/+12
|\
| * Issue #29319: Prevent RunMainFromImporter overwriting sys.path[0].Steve Dower2017-02-041-2/+12
| |\
| | * Issue #29319: Prevent RunMainFromImporter overwriting sys.path[0].Steve Dower2017-02-041-2/+12
| | |
* | | Issue #28768: Fix implicit declaration of function _setmode. Patch by ↵Steve Dower2016-12-281-0/+3
|\ \ \ | |/ / | | | | | | Masayuki Yamamoto
| * | Issue #28768: Fix implicit declaration of function _setmode. Patch by ↵Steve Dower2016-12-281-0/+3
| | | | | | | | | | | | Masayuki Yamamoto
* | | Use _PyObject_CallNoArg()Victor Stinner2016-12-061-1/+1
|/ / | | | | | | | | | | | | Replace: PyObject_CallObject(callable, NULL) with: _PyObject_CallNoArg(callable)
* | Issue #28532: Show sys.version when -V option is supplied twiceINADA Naoki2016-11-211-1/+2
| |
* | Issue #28192: Don't import readline in isolated modeSteve Dower2016-09-171-1/+2
| |
* | Check return value of PyList_Append() in Py_Main(). CID 1353200Christian Heimes2016-09-081-1/+2
| |
* | Add PYTHONMALLOC env varVictor Stinner2016-03-141-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Issue #26516: * Add PYTHONMALLOC environment variable to set the Python memory allocators and/or install debug hooks. * PyMem_SetupDebugHooks() can now also be used on Python compiled in release mode. * The PYTHONMALLOCSTATS environment variable can now also be used on Python compiled in release mode. It now has no effect if set to an empty string. * In debug mode, debug hooks are now also installed on Python memory allocators when Python is configured without pymalloc.
* | Fixed formatting comman-line usage message.Serhiy Storchaka2015-12-301-4/+4
|\ \ | |/
| * Fixed formatting comman-line usage message.Serhiy Storchaka2015-12-301-4/+4
| |
* | Issue #25923: Added more const qualifiers to signatures of static and ↵Serhiy Storchaka2015-12-251-1/+1
| | | | | | | | private functions.
* | Issue #25923: Added the const qualifier to static constant arrays.Serhiy Storchaka2015-12-251-7/+7
| |
* | Issue #5319: New Py_FinalizeEx() API to exit with status 120 on failureMartin Panter2015-11-301-2/+6
|/
* Issue #23752: _Py_fstat() is now responsible to raise the Python exceptionVictor Stinner2015-03-301-2/+4
| | | | Add _Py_fstat_noraise() function when a Python exception is not welcome.
* Back-out wcstok deprecation suppression and updates calls to use wcstok_s.Steve Dower2015-02-261-3/+3
|
* Issue #23152: Implement _Py_fstat() to support files larger than 2 GB on ↵Steve Dower2015-02-211-3/+2
| | | | | | Windows. fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
* Issue #20597: Remove unused definition of PATH_MAX on Windows, MAXPATHLEN isVictor Stinner2014-11-051-1/+0
| | | | now preferred. Patch written by Jeffrey Armstrong.
* Issue #18395: Rename ``_Py_char2wchar()`` to :c:func:`Py_DecodeLocale`, renameVictor Stinner2014-08-011-2/+2
| | | | | ``_Py_wchar2char()`` to :c:func:`Py_EncodeLocale`, and document these functions.
* Issue #20355: -W command line options now have higher priority than the ↵Antoine Pitrou2014-04-281-1/+18
| | | | PYTHONWARNINGS environment variable. Patch by Arfrever.
* Issue #16136: Remove VMS support and VMS-related codeChristian Heimes2013-12-211-29/+0
|
* Issue #19512, #19515: remove shared identifiers, move identifiers where theyVictor Stinner2013-11-071-1/+1
| | | | | | | are used. Move also _Py_IDENTIFIER() defintions to the top in modified files to remove identifiers duplicated in the same file.
* Issue #19512: add some common identifiers to only create common strings once,Victor Stinner2013-11-061-1/+1
| | | | | | | instead of creating temporary Unicode string objects Add also more identifiers in pythonrun.c to avoid temporary Unicode string objets for the interactive interpreter.
* 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().
* Issue #16400: Add command line option for isolated mode.Christian Heimes2013-08-101-1/+8
| | | | | | | | | | -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.
* #16937: merge with 3.3.Ezio Melotti2013-07-251-1/+2
|\
| * #16937: document that stdin is always buffered, even when -u is used. Patch ↵Ezio Melotti2013-07-251-1/+2
| | | | | | | | by Elena Oat.
* | Issue #18408: handle PySys_GetObject() failure, raise a RuntimeErrorVictor Stinner2013-07-161-1/+3
| |
* | Issue #18338: `python --version` now prints version string to stdout, andSerhiy Storchaka2013-07-111-1/+1
| | | | | | | | not to stderr. Patch by Berker Peksag and Michael Dickens.
* | Issue #18203: Add _PyMem_RawStrdup() and _PyMem_Strdup()Victor Stinner2013-07-071-2/+2
| | | | | | | | | | Replace strdup() with _PyMem_RawStrdup() or _PyMem_Strdup(), depending if the GIL is held or not.
* | Issue #18203: Replace malloc() with PyMem_RawMalloc() at Python initializationVictor Stinner2013-07-071-7/+7
| | | | | | | | | | | | | | * Replace malloc() with PyMem_RawMalloc() * Replace PyMem_Malloc() with PyMem_RawMalloc() where the GIL is not held. * _Py_char2wchar() now returns a buffer allocated by PyMem_RawMalloc(), instead of PyMem_Malloc()
* | Issue #5845: Enable tab-completion in the interactive interpreter by ↵Antoine Pitrou2013-05-041-0/+28
| | | | | | | | | | | | default, thanks to a new sys.__interactivehook__. (original patch by Éric Araujo)
* | Close #14439: Python now prints the traceback on runpy failure at startup.Victor Stinner2013-04-091-0/+4
| |
* | #16306: merge with 3.3.Ezio Melotti2012-11-231-0/+1
|\ \ | |/
| * #16306: merge with 3.2.Ezio Melotti2012-11-231-0/+1
| |\
| | * #16306: report only the first unknown option and add more tests. Patch by ↵Ezio Melotti2012-11-231-0/+1
| | | | | | | | | | | | Serhiy Storchaka.
* | | #16135: Removal of OS/2 support (posixmodule y platform dependent files)Jesus Cea2012-10-041-5/+1
|/ /
* | Fix for issue 15716: interpreter could crash when PYTHONEXECUTABLE was set ↵Ronald Oussoren2012-08-221-1/+1
|\ \ | |/ | | | | | | | | | | | | | | on Mac OS X. This is due to an off-by-one error: the allocated buffer didn't have room for a NUL character at the end of the mbstowcs result. (merge with 3.2)
| * Fix for issue 15716: interpreter could crash when PYTHONEXECUTABLE was set ↵Ronald Oussoren2012-08-221-1/+1
| | | | | | | | | | | | | | on Mac OS X. This is due to an off-by-one error: the allocated buffer didn't have room for a NUL character at the end of the mbstowcs result.