summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* 00147-add-debug-malloc-stats.patchFedora Python maintainers2020-09-291-0/+53
| | | | | | | 00147 # Add a sys._debugmallocstats() function Based on patch 202 from RHEL 5's python.spec, with updates from rhbz#737198 Sent upstream as http://bugs.python.org/issue14785
* 00112-2.7.13-debug-build.patchFedora Python maintainers2020-09-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 00112 # Patch to support building both optimized vs debug stacks DSO ABIs, sharing the same .py and .pyc files, using "_d.so" to signify a debug build of an extension module. Based on Debian's patch for the same, http://patch-tracker.debian.org/patch/series/view/python2.6/2.6.5-2/debug-build.dpatch (which was itself based on the upstream Windows build), but with some changes: * Debian's patch to dynload_shlib.c looks for module_d.so, then module.so, but this can potentially find a module built against the wrong DSO ABI. We instead search for just module_d.so in a debug build * We remove this change from configure.in's build of the Makefile: SO=$DEBUG_EXT.so so that sysconfig.py:customize_compiler stays with shared_lib_extension='.so' on debug builds, so that UnixCCompiler.find_library_file can find system libraries (otherwise "make sharedlibs" fails to find system libraries, erroneously looking e.g. for "libffi_d.so" rather than "libffi.so") * We change Lib/distutils/command/build_ext.py:build_ext.get_ext_filename to add the _d there, when building an extension. This way, "make sharedlibs" can build ctypes, by finding the sysmtem libffi.so (rather than failing to find "libffi_d.so"), and builds the module as _ctypes_d.so * Similarly, update build_ext:get_libraries handling of Py_ENABLE_SHARED by appending "_d" to the python library's name for the debug configuration * We modify Modules/makesetup to add the "_d" to the generated Makefile rules for the various Modules/*.so targets This may introduce issues when building an extension that links directly against another extension (e.g. users of NumPy?), but seems more robust when searching for external libraries * We don't change Lib/distutils/command/build.py: build.build_purelib to embed plat_specifier, leaving it as is, as pure python builds should be unaffected by these differences (we'll be sharing the .py and .pyc files) * We introduce DEBUG_SUFFIX as well as DEBUG_EXT: - DEBUG_EXT is used by ELF files (names and SONAMEs); it will be "_d" for a debug build - DEBUG_SUFFIX is used by filesystem paths; it will be "-debug" for a debug build Both will be empty in an optimized build. "_d" contains characters that are valid ELF metadata, but this leads to various ugly filesystem paths (such as the include path), and DEBUG_SUFFIX allows these paths to have more natural names. Changing this requires changes elsewhere in the distutils code. * We add DEBUG_SUFFIX to PYTHON in the Makefile, so that the two configurations build parallel-installable binaries with different names ("python-debug" vs "python"). * Similarly, we add DEBUG_SUFFIX within python-config and python$(VERSION)-config, so that the two configuration get different paths for these. See also patch 130 below
* [2.7] bpo-35441: Remove dead and buggy code related to PyList_SetItem(). ↵Serhiy Storchaka2018-12-191-1/+1
| | | | | | | | | | | | | | (GH-11033) (GH-11234) 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>
* bpo-27593: Get SCM build info from git instead of hg (#1327)Victor Stinner2017-05-021-3/+3
| | | | | | | | | | | Based on commit 5c4b0d063aba0a68c325073f5f312a2c9f40d178 by Ned Deily, which is based on original patches by Brett Cannon and Steve Dower. Remove also the private _Py_svnversion() function and SVNVERSION variable. Note: Py_SubversionRevision() and Py_SubversionShortBranch() are unchanged, they are part of the public API.
* Issue #28616: Correct help for sys.version_info releaselevel component.Ned Deily2016-11-041-1/+1
| | | | Patch by Anish Tambe.
* Issue #22193: Fixed integer overflow error in sys.getsizeof().Serhiy Storchaka2014-11-151-4/+9
| | | | Fixed an error in _PySys_GetSizeOf declaration.
* Issue #22193: Added private function _PySys_GetSizeOf() needed to implementSerhiy Storchaka2014-08-141-33/+42
| | | | some __sizeof__() methods.
* Issue #20437: Fixed 43 potential bugs when deleting objects references.Serhiy Storchaka2014-02-091-2/+1
|
* Issue #16404: Add checks for return value of PyInt_FromLong() inSerhiy Storchaka2013-12-171-0/+4
| | | | | sys.getwindowsversion() and ossaudiodev.setparameters(). Reported by Ned Batchelder.
* Fixed leak in sys.flags initialization.Serhiy Storchaka2013-12-171-0/+1
|
* #18839: document that sys.exit() will not accept a non-integer numeric value ↵Ezio Melotti2013-08-261-1/+1
| | | | as exit status.
* merge 2.6 with hash randomization fixBenjamin Peterson2012-02-211-2/+4
|\
| * - Issue #13703: oCERT-2011-003: add -R command-line option and PYTHONHASHSEEDBarry Warsaw2012-02-211-2/+4
| | | | | | | | | | | | environment variable, to provide an opt-in way to protect against denial of service attacks due to hash collisions within the dict and set types. Patch by David Malcolm, based on work by Victor Stinner.
| * Merged revisions 81398 via svnmerge fromAntoine Pitrou2010-05-211-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81398 | antoine.pitrou | 2010-05-21 19:12:38 +0200 (ven., 21 mai 2010) | 6 lines Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allows embedders of the interpreter to set sys.argv without also modifying sys.path. This helps fix `CVE-2008-5983 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_. ........
| * Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-895/+895
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
| * Revert r78621. This was not a critical fix and we're in rc mode.Barry Warsaw2010-03-031-1/+1
| |
| * Merged revisions 78620 via svnmerge fromFlorent Xicluna2010-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78620 | florent.xicluna | 2010-03-03 12:49:53 +0100 (mer, 03 mar 2010) | 2 lines Revert a nonexistent docstring typo, r42805. ........
| * Merged revisions 77892 via svnmerge fromVictor Stinner2010-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77892 | victor.stinner | 2010-01-31 23:32:15 +0100 (dim., 31 janv. 2010) | 4 lines Issue #7819: Check sys.call_tracing() arguments types. py3k was already patched by issue #3661. ........
| * Merged revisions 72871-72872 via svnmerge fromBenjamin Peterson2009-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72871 | benjamin.peterson | 2009-05-23 14:24:37 -0500 (Sat, 23 May 2009) | 1 line support building with subversion 1.7 #6094 ........ r72872 | benjamin.peterson | 2009-05-23 14:31:02 -0500 (Sat, 23 May 2009) | 1 line reorder name ........
| * Merged revisions ↵Georg Brandl2009-01-141-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 68521,68527,68534-68536,68540,68547,68552,68563,68570,68572,68575,68579-68580,68584 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68521 | hirokazu.yamamoto | 2009-01-11 04:28:13 +0100 (So, 11 Jan 2009) | 1 line Fixed version number in build_ssl.bat. ........ r68527 | martin.v.loewis | 2009-01-11 10:43:55 +0100 (So, 11 Jan 2009) | 2 lines Issue #4895: Use _strdup on Windows CE. ........ r68534 | gregory.p.smith | 2009-01-11 18:53:33 +0100 (So, 11 Jan 2009) | 2 lines correct email address ........ r68535 | gregory.p.smith | 2009-01-11 18:57:54 +0100 (So, 11 Jan 2009) | 9 lines Update the documentation for binascii and zlib crc32/adler32 functions to better describe the signed vs unsigned return value behavior on different platforms and versions of python. Mention the workaround to make them all return the same thing by using & 0xffffffff. Fixes issue4903. Also needs to be merged into release26-maint, release30-maint, & py3k. ........ r68536 | benjamin.peterson | 2009-01-11 20:48:15 +0100 (So, 11 Jan 2009) | 1 line add email addresses ........ r68540 | martin.v.loewis | 2009-01-12 08:57:11 +0100 (Mo, 12 Jan 2009) | 2 lines Issue #4915: Port sysmodule to Windows CE. ........ r68547 | kristjan.jonsson | 2009-01-12 19:09:27 +0100 (Mo, 12 Jan 2009) | 1 line Add tests for invalid format specifiers in strftime, and for handling of invalid file descriptors in the os module. ........ r68552 | vinay.sajip | 2009-01-12 21:36:18 +0100 (Mo, 12 Jan 2009) | 1 line Minor changes/corrections in markup. ........ r68563 | benjamin.peterson | 2009-01-13 02:49:10 +0100 (Di, 13 Jan 2009) | 1 line small logic correction ........ r68570 | raymond.hettinger | 2009-01-13 10:08:32 +0100 (Di, 13 Jan 2009) | 5 lines Issue 4922: Incorrect comments for MutableSet.add() and MutableSet.discard(). Needs to be backported to 2.6 and forward ported to 3.0 and 3.1. ........ r68572 | andrew.kuchling | 2009-01-13 14:40:54 +0100 (Di, 13 Jan 2009) | 1 line Note that first coord. is left alone ........ r68575 | thomas.heller | 2009-01-13 18:32:28 +0100 (Di, 13 Jan 2009) | 1 line Fix refcount leak in error cases. Bug found by coverity. ........ r68579 | benjamin.peterson | 2009-01-13 22:42:23 +0100 (Di, 13 Jan 2009) | 1 line make bytearrayobject.o depend on the stringlib #4936 ........ r68580 | benjamin.peterson | 2009-01-13 22:43:11 +0100 (Di, 13 Jan 2009) | 1 line add bytearrayobject.h to PYTHON_HEADERS ........ r68584 | benjamin.peterson | 2009-01-13 23:22:41 +0100 (Di, 13 Jan 2009) | 1 line de-spacify ........
* | Document absoluteness of sys.executablePetri Lehtinen2012-02-021-1/+1
| | | | | | | | Closes #13402.
* | sys.checkinterval() now refreshes the current countdown ticker.Raymond Hettinger2011-06-021-0/+1
| |
* | remove this dead subversion codeBenjamin Peterson2011-03-251-62/+5
| |
* | #11515: fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-151-1/+1
| |
* | Port build identification from default branch.Georg Brandl2011-03-061-0/+3
| |
* | Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allowsAntoine Pitrou2010-05-211-2/+8
| | | | | | | | | | | | embedders of the interpreter to set sys.argv without also modifying sys.path. This helps fix `CVE-2008-5983 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
* | Untabify C files. Will watch buildbots.Antoine Pitrou2010-05-091-969/+969
| |
* | Revert a nonexistent docstring typo, r42805.Florent Xicluna2010-03-031-1/+1
| |
* | Issue #7819: Check sys.call_tracing() arguments types.Victor Stinner2010-01-311-1/+1
| | | | | | | | py3k was already patched by issue #3661.
* | Issue #7766: Change sys.getwindowsversion() return value to a named tuple ↵Eric Smith2010-01-271-13/+62
| | | | | | | | and add the additional members returned in an OSVERSIONINFOEX structure. The new members are service_pack_major, service_pack_minor, suite_mask, and product_type.
* | Issue #7117 (backport py3k float repr) continued:Mark Dickinson2009-10-241-0/+10
| | | | | | | | | | Add sys.float_repr_style attribute ('short' if short float repr is in used; 'legacy' otherwise).
* | Update docstrings for sys.getdlopenflags() and sys.setdlopenflags().Alexandre Vassalotti2009-06-291-10/+12
| |
* | handle errors from _PyObject_LookupSpecial when __get__ failsBenjamin Peterson2009-05-251-4/+6
| |
* | support building with subversion 1.7 #6094Benjamin Peterson2009-05-231-1/+1
| |
* | convert some more special methods to use _PyObject_LookupSpecialBenjamin Peterson2009-05-091-12/+7
| |
* | Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms.Mark Dickinson2009-03-201-0/+4
| | | | | | | | Backport of r70459.
* | Implement issue #4285, convert sys.version_info to a namedEric Smith2009-02-061-20/+79
| | | | | | | | tuple. Patch by Ross Light.
* | Issue #4915: Port sysmodule to Windows CE.Martin v. Löwis2009-01-121-3/+12
|/
* Added garbage collector overhead and optional default return value toRobert Schuppenies2008-07-101-13/+46
| | | | sys.getsizeof.
* Fixed Issue3122 and extended sys.getsizeof tests for built-in types.Robert Schuppenies2008-07-101-11/+10
|
* - Issue #2862: Make int and float freelist management consistent with otherGregory P. Smith2008-07-061-20/+0
| | | | | freelists. Changes their CompactFreeList apis into ClearFreeList apis and calls them via gc.collect().
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-19/+19
| | | | | | | http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
* Some style nits. Also clarify in the docstrings what __sizeof__ does.Georg Brandl2008-06-011-2/+2
|
* Issue #2898: Added sys.getsizeof() to retrieve size of objects in bytes.Robert Schuppenies2008-06-011-0/+41
|
* New environment variable PYTHONIOENCODING.Martin v. Löwis2008-06-011-20/+0
|
* Renamed PyString to PyBytesChristian Heimes2008-05-261-19/+19
|
* Patch #2488: Add sys.maxsize.Martin v. Löwis2008-05-201-0/+3
|
* Fix sys.flags to properly expose bytes_warning.Brett Cannon2008-05-081-2/+2
| | | | Closes issue #2790.
* Implemented PEP 370Christian Heimes2008-05-061-5/+5
|
* A little reformating of Py3k warningsBenjamin Peterson2008-04-271-1/+1
|