aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/sysmodule.c
Commit message (Collapse)AuthorAge
* Add _PyThreadState_UncheckedGet()Victor Stinner2016-01-20
| | | | | | | | | | | | | | | | | | | Issue #26154: Add a new private _PyThreadState_UncheckedGet() function which gets the current thread state, but don't call Py_FatalError() if it is NULL. Python 3.5.1 removed the _PyThreadState_Current symbol from the Python C API to no more expose complex and private atomic types. Atomic types depends on the compiler or can even depend on compiler options. The new function _PyThreadState_UncheckedGet() allows to get the variable value without having to care of the exact implementation of atomic types. Changes: * Replace direct usage of the _PyThreadState_Current variable with a call to _PyThreadState_UncheckedGet(). * In pystate.c, replace direct usage of the _PyThreadState_Current variable with the PyThreadState_GET() macro for readability. * Document also PyThreadState_Get() in pystate.h
* sys.setrecursionlimit() now raises RecursionErrorVictor Stinner2015-10-13
| | | | | | | Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new recursion limit is too low depending at the current recursion depth. Modify also the "lower-water mark" formula to make it monotonic. This mark is used to decide when the overflowed flag of the thread state is reset.
* Issue 24017: Make PyEval_(Set|Get)CoroutineWrapper privateYury Selivanov2015-06-01
|
* use our normal bracing styleBenjamin Peterson2015-05-12
|
* Issue #24017: Plug ref leak.Yury Selivanov2015-05-12
|
* PEP 0492 -- Coroutines with async and await syntax. Issue #24017.Yury Selivanov2015-05-11
|
* Issue #23752: _Py_fstat() is now responsible to raise the Python exceptionVictor Stinner2015-03-30
| | | | Add _Py_fstat_noraise() function when a Python exception is not welcome.
* Issue #23451: Update pyconfig.h for Windows to require Vista headers and ↵Steve Dower2015-03-02
| | | | remove unnecessary version checks.
* Issue #23152: Implement _Py_fstat() to support files larger than 2 GB on ↵Steve Dower2015-02-21
| | | | | | Windows. fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
* Issue #23181: More "codepoint" -> "code point".Serhiy Storchaka2015-01-18
|\
| * Issue #23181: More "codepoint" -> "code point".Serhiy Storchaka2015-01-18
| |
* | Issue #22696: Add function :func:`sys.is_finalizing` to know about ↵Antoine Pitrou2014-12-07
| | | | | | | | interpreter shutdown.
* | Issue #22869: Split pythonrun into two modulesNick Coghlan2014-11-20
|/ | | | | | | - interpreter startup and shutdown code moved to a new pylifecycle.c module - Py_OptimizeFlag moved into the new module with the other global flags
* Issue #22193: Fixed integer overflow error in sys.getsizeof().Serhiy Storchaka2014-11-15
| | | | Fixed an error in _PySys_GetSizeOf declaration.
* Issue #22193: Added private function _PySys_GetSizeOf() needed to implementSerhiy Storchaka2014-08-14
| | | | some __sizeof__() methods.
* Issue #21891: remove extraneous semicolon.Ned Deily2014-06-30
|
* Issue #13204: Calling sys.flags.__new__ would crash the interpreter, now it ↵Antoine Pitrou2014-04-28
| | | | raises a TypeError.
* undefine SET_SYS_FROM_STRING_BORROW after its done being used (closes #21089)Benjamin Peterson2014-03-28
|
* Issue #20437: Fixed 22 potential bugs when deleting objects references.Serhiy Storchaka2014-02-09
|\
| * Issue #20437: Fixed 21 potential bugs when deleting objects references.Serhiy Storchaka2014-02-09
| |
* | Issue #16136: Remove VMS support and VMS-related codeChristian Heimes2013-12-21
| |
* | Fix the C definition of the sys._debugmallocstats() function: the function hasVictor Stinner2013-12-19
| | | | | | | | no parameter
* | Issue #16404: Add checks for return value of PyLong_FromLong() inSerhiy Storchaka2013-12-17
|\| | | | | | | | | sys.getwindowsversion() and ossaudiodev.setparameters(). Reported by Ned Batchelder.
| * Issue #16404: Add checks for return value of PyLong_FromLong() inSerhiy Storchaka2013-12-17
| | | | | | | | | | sys.getwindowsversion() and ossaudiodev.setparameters(). Reported by Ned Batchelder.
* | Fixed leak in sys.flags initialization.Serhiy Storchaka2013-12-17
|\|
| * Fixed leak in sys.flags initialization.Serhiy Storchaka2013-12-17
| |
* | Issue #14432: Remove the thread state field from the frame structure. Fix aVictor Stinner2013-12-13
| | | | | | | | | | | | | | crash when a generator is created in a C thread that is destroyed while the generator is still used. The issue was that a generator contains a frame, and the frame kept a reference to the Python state of the destroyed C thread. The crash occurs when a trace function is setup.
* | ssue #19183: Implement PEP 456 'secure and interchangeable hash algorithm'.Christian Heimes2013-11-20
| | | | | | | | Python now uses SipHash24 on all major platforms.
* | (Merge 3.3) sysmodule.c: fix sys_update_path(), use Py_ARRAY_LENGTH() to getVictor Stinner2013-11-15
|\| | | | | | | | | | | the size of the fullpath buffer, not PATH_MAX. fullpath is declared using MAXPATHLEN or MAX_PATH depending on the OS, and PATH_MAX is not declared on IRIX.
| * sysmodule.c: fix sys_update_path(), use Py_ARRAY_LENGTH() to get the size ofVictor Stinner2013-11-15
| | | | | | | | | | the fullpath buffer, not PATH_MAX. fullpath is declared using MAXPATHLEN or MAX_PATH depending on the OS, and PATH_MAX is not declared on IRIX.
* | Issue #19512, #19515: remove shared identifiers, move identifiers where theyVictor Stinner2013-11-07
| | | | | | | | | | | | | | 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-06
| | | | | | | | | | | | | | 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 #19512: Add _PySys_GetObjectId() and _PySys_SetObjectId() functionsVictor Stinner2013-11-06
| |
* | Issue #19512: sys_displayhook() now uses an identifier for "builtins"Victor Stinner2013-11-06
| | | | | | | | | | | | dictionary key and only decodes "\n" string once to write a newline. So "builtins" and "\n" are only decoded once from UTF-8, at the first call.
* | Issue #18408: Add a new PyFrame_FastToLocalsWithError() function to handleVictor Stinner2013-10-29
| | | | | | | | | | exceptions when merging fast locals into f_locals of a frame. PyEval_GetLocals() now raises an exception and return NULL on failure.
* | Issue #18520: fix reference leak in _PySys_Init()Victor Stinner2013-10-27
| |
* | #18839: merge with 3.3.Ezio Melotti2013-08-26
|\|
| * #18839: document that sys.exit() will not accept a non-integer numeric value ↵Ezio Melotti2013-08-26
| | | | | | | | as exit status.
* | Issue #16400: Add command line option for isolated mode.Christian Heimes2013-08-10
| | | | | | | | | | | | | | | | | | | | -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.
* | Issue #18520: Fix _PySys_Init(), handle PyDict_SetItemString() errorsVictor Stinner2013-07-22
| |
* | Issue #18520: Add a new PyStructSequence_InitType2() function, same thanVictor Stinner2013-07-22
| | | | | | | | | | | | | | | | 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 #15905: Fix theoretical buffer overflow in handling of sys.argv[0],Christian Heimes2013-07-22
|\| | | | | | | prefix and exec_prefix if the operation system does not obey MAXPATHLEN.
| * Issue #15905: Fix theoretical buffer overflow in handling of sys.argv[0],Christian Heimes2013-07-22
| | | | | | | | prefix and exec_prefix if the operation system does not obey MAXPATHLEN.
* | #13226: update references from ctypes/DLFCN modules to os moduleAndrew Kuchling2013-06-21
| |
* | Issue #13390: New function :func:`sys.getallocatedblocks()` returns the ↵Antoine Pitrou2012-12-09
| | | | | | | | | | | | number of memory blocks currently allocated. Also, the ``-R`` option to regrtest uses this function to guard against memory allocation leaks.
* | RISCOS support has been removed a long time ago. Remove last remains in ↵Christian Heimes2012-11-19
| | | | | | | | sys.flags code. #16501 can be closed, too.
* | Issue #16166: Add PY_LITTLE_ENDIAN and PY_BIG_ENDIAN macros and unifiedChristian Heimes2012-10-17
|/ | | | endianess detection and handling.
* Issue #15242: Have PyImport_GetMagicTag() return a const char *Brett Cannon2012-07-09
| | | | | | | defined in sysmodule.c instead of straight out of a Unicode object. Thanks to Amaury Forgeot d'Arc for noticing the bug and Eric Snow for writing the patch.
* Issue #14785: Add sys._debugmallocstats() to help debug low-level memory ↵David Malcolm2012-06-22
| | | | allocation issues
* Eric Snow's implementation of PEP 421.Barry Warsaw2012-06-03
| | | | Issue 14673: Add sys.implementation