summaryrefslogtreecommitdiff
path: root/Python/sysmodule.c
AgeCommit message (Collapse)AuthorLines
2018-12-08bpo-35441: Remove dead and buggy code related to PyList_SetItem(). (GH-11033)Miss Islington (bot)-1/+1
In _localemodule.c and selectmodule.c, remove dead code that would cause double decrefs if run. In addition, replace PyList_SetItem() with PyList_SET_ITEM() in cases where a new list is populated and there is no possibility of an error. In addition, check if the list changed size in the loop in array_array_fromlist(). (cherry picked from commit 99d56b53560b3867844472ae381fb3f858760621) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2017-06-06[3.6] bpo-30567: Fix refleak in sys.getwindowsversion (GH-1940) (#1970)Serhiy Storchaka-4/+4
(cherry picked from commit 48fb766)
2017-03-04[3.6] bpo-27593: Get SCM build info from git instead of hg. (#446) (#454)Ned Deily-3/+3
* bpo-27593: Get SCM build info from git instead of hg. (#446) sys.version and the platform module python_build(), python_branch(), and python_revision() functions now use git information rather than hg when building from a repo. Based on original patches by Brett Cannon and Steve Dower. (cherry picked from commit 5c4b0d063aba0a68c325073f5f312a2c9f40d178)
2016-11-20Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSizeSerhiy Storchaka-2/+2
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
2016-11-04Issue #28616: merge from 3.5Ned Deily-1/+1
2016-11-04Issue #28616: Correct help for sys.version_info releaselevel component.Ned Deily-1/+1
Patch by Anish Tambe.
2016-09-17Issue #27932: Prevent memory leak in win32_ver().Steve Dower-4/+42
2016-09-17Issue #27932: Prevent memory leak in win32_ver().Steve Dower-0/+37
2016-09-09remove ceval timestamp supportBenjamin Peterson-30/+0
2016-09-09Issue #28003: Fix a compiler warningYury Selivanov-1/+1
2016-09-08Issue #28003: Implement PEP 525 -- Asynchronous Generators.Yury Selivanov-0/+119
2016-09-08Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529)Steve Dower-2/+48
2016-09-05Issue #27355: Removed support for Windows CE. It was never finished,Larry Hastings-5/+3
and Windows CE is no longer a relevant platform for Python.
2016-08-22Rename _PyObject_FastCall() to _PyObject_FastCallDict()Victor Stinner-2/+2
Issue #27809: * Rename _PyObject_FastCall() function to _PyObject_FastCallDict() * Add _PyObject_FastCall(), _PyObject_CallNoArg() and _PyObject_CallArg1() macros calling _PyObject_FastCallDict()
2016-08-20sys_pyfile_write_unicode() now uses fast callVictor Stinner-7/+2
Issue #27128.
2016-08-20call_trampoline() now uses fast callVictor Stinner-19/+10
Issue #27128.
2016-06-14- Issue #23968: Rename the platform directory from plat-$(MACHDEP) todoko@ubuntu.com-0/+10
plat-$(PLATFORM_TRIPLET). Rename the config directory (LIBPL) from config-$(LDVERSION) to config-$(LDVERSION)-$(PLATFORM_TRIPLET). Install the platform specifc _sysconfigdata module into the platform directory and rename it to include the ABIFLAGS.
2016-04-25Issue #17905: Do not guard locale include with HAVE_LANGINFO_H.Stefan Krah-1/+1
2016-04-06Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka-1/+1
2016-03-14Add PYTHONMALLOC env varVictor Stinner-2/+4
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.
2016-01-20Merge 3.5Victor Stinner-1/+1
Issue #26154: Add a new private _PyThreadState_UncheckedGet() function.
2016-01-20Add _PyThreadState_UncheckedGet()Victor Stinner-1/+1
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
2016-01-05Issue #20440: Cleaning up the code by using Py_SETREF.Serhiy Storchaka-4/+1
2015-12-25Issue #25923: Added the const qualifier to static constant arrays.Serhiy Storchaka-2/+4
2015-11-05sysmodule.c: reuse Py_STRINGIFY() macroVictor Stinner-6/+2
2015-10-13sys.setrecursionlimit() now raises RecursionErrorVictor Stinner-3/+26
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.
2015-06-01Issue 24017: Make PyEval_(Set|Get)CoroutineWrapper privateYury Selivanov-3/+3
2015-05-12use our normal bracing styleBenjamin Peterson-1/+2
2015-05-12Issue #24017: Plug ref leak.Yury Selivanov-2/+0
2015-05-11PEP 0492 -- Coroutines with async and await syntax. Issue #24017.Yury Selivanov-0/+47
2015-03-30Issue #23752: _Py_fstat() is now responsible to raise the Python exceptionVictor Stinner-1/+1
Add _Py_fstat_noraise() function when a Python exception is not welcome.
2015-03-02Issue #23451: Update pyconfig.h for Windows to require Vista headers and ↵Steve Dower-0/+8
remove unnecessary version checks.
2015-02-21Issue #23152: Implement _Py_fstat() to support files larger than 2 GB on ↵Steve Dower-2/+2
Windows. fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
2015-01-18Issue #23181: More "codepoint" -> "code point".Serhiy Storchaka-1/+1
2015-01-18Issue #23181: More "codepoint" -> "code point".Serhiy Storchaka-1/+1
2014-12-07Issue #22696: Add function :func:`sys.is_finalizing` to know about ↵Antoine Pitrou-0/+11
interpreter shutdown.
2014-11-20Issue #22869: Split pythonrun into two modulesNick Coghlan-1/+1
- interpreter startup and shutdown code moved to a new pylifecycle.c module - Py_OptimizeFlag moved into the new module with the other global flags
2014-11-15Issue #22193: Fixed integer overflow error in sys.getsizeof().Serhiy Storchaka-5/+10
Fixed an error in _PySys_GetSizeOf declaration.
2014-08-14Issue #22193: Added private function _PySys_GetSizeOf() needed to implementSerhiy Storchaka-32/+40
some __sizeof__() methods.
2014-06-30Issue #21891: remove extraneous semicolon.Ned Deily-1/+1
2014-04-28Issue #13204: Calling sys.flags.__new__ would crash the interpreter, now it ↵Antoine Pitrou-3/+10
raises a TypeError.
2014-03-28undefine SET_SYS_FROM_STRING_BORROW after its done being used (closes #21089)Benjamin Peterson-0/+1
2014-02-09Issue #20437: Fixed 22 potential bugs when deleting objects references.Serhiy Storchaka-2/+1
2014-02-09Issue #20437: Fixed 21 potential bugs when deleting objects references.Serhiy Storchaka-2/+1
2013-12-21Issue #16136: Remove VMS support and VMS-related codeChristian Heimes-19/+0
2013-12-19Fix the C definition of the sys._debugmallocstats() function: the function hasVictor Stinner-1/+1
no parameter
2013-12-17Issue #16404: Add checks for return value of PyLong_FromLong() inSerhiy Storchaka-0/+4
sys.getwindowsversion() and ossaudiodev.setparameters(). Reported by Ned Batchelder.
2013-12-17Issue #16404: Add checks for return value of PyLong_FromLong() inSerhiy Storchaka-0/+4
sys.getwindowsversion() and ossaudiodev.setparameters(). Reported by Ned Batchelder.
2013-12-17Fixed leak in sys.flags initialization.Serhiy Storchaka-0/+1
2013-12-17Fixed leak in sys.flags initialization.Serhiy Storchaka-0/+1