summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Use PyErr_WarnPy3k throughoutBenjamin Peterson2008-04-271-4/+2
|
* Fix indentation in sysmodule.cBenjamin Peterson2008-04-181-4/+4
|
* Fix a bug in PySys_HasWarnOption() where it was not properly checking theBrett Cannon2008-04-131-1/+1
| | | | length of the list storing the warning options.
* Re-implement the 'warnings' module in C. This allows for usage of theBrett Cannon2008-04-121-0/+8
| | | | | | | | | 'warnings' code in places where it was previously not possible (e.g., the parser). It could also potentially lead to a speed-up in interpreter start-up if the C version of the code (_warnings) is imported over the use of the Python version in key places. Closes issue #1631171.
* Make Py3k warnings consistent w.r.t. punctuation; also respect theGeorg Brandl2008-03-251-2/+2
| | | | EOL 80 limit and supply more alternatives in warning messages.
* Added quick hack for bzrChristian Heimes2008-03-241-2/+2
|
* Added quick hack for bzrChristian Heimes2008-03-241-1/+8
|
* #2358: add py3k warning to sys.exc_clear().Georg Brandl2008-03-211-1/+9
|
* Patch #1953Christian Heimes2008-02-041-13/+34
| | | | | I implemented the function sys._compact_freelists() and C API functions PyInt_/PyFloat_CompactFreeList() to compact the pre-allocated blocks of ints and floats. They allow the user to reduce the memory usage of a Python process that deals with lots of numbers. The patch also renames sys._cleartypecache to sys._clear_type_cache
* The previous change was causing a segfault after multiple calls to ↵Christian Heimes2008-01-301-3/+3
| | | | Py_Initialize() and Py_Finalize().
* Fixed some references leaks in sys.Christian Heimes2008-01-301-21/+17
|
* Added clear cache methods to clear the internal type lookup cache for ref ↵Christian Heimes2008-01-271-0/+13
| | | | leak test runs.
* #1648: add sys.gettrace() and sys.getprofile().Georg Brandl2008-01-201-0/+42
|
* Typo fixesAndrew M. Kuchling2008-01-151-2/+2
|
* Applied patch #1816: sys.flags patchChristian Heimes2008-01-141-3/+94
|
* Patch #602345 by Neal Norwitz and me: add -B option and ↵Georg Brandl2008-01-071-0/+3
| | | | PYTHONDONTWRITEBYTECODE envvar to skip writing bytecode.
* Feature #1534Christian Heimes2007-12-011-0/+2
| | | | | Added PyFloat_GetMax(), PyFloat_GetMin() and PyFloat_GetInfo() to the float API. Added a dictionary sys.float_info with information about the internal floating point type to the sys module.
* Expose Py_Py3kWarningFlag as sys.py3kwarning as discussed in #1504Christian Heimes2007-11-271-0/+2
| | | | Also added a warning.warnpy3k() as convenient method for Python 3.x related deprecation warnings.
* SF #1701207, Fix bogus assertion (and test it!)Neal Norwitz2007-04-161-2/+2
|
* SF patch #1630975: Fix crash when replacing sys.stdout in sitecustomizeThomas Wouters2007-01-231-3/+3
| | | | | | | | | | | When running the interpreter in an environment that would cause it to set stdout/stderr/stdin's encoding, having a sitecustomize that would replace them with something other than PyFile objects would crash the interpreter. Fix it by simply ignoring the encoding-setting for non-files. This could do with a test, but I can think of no maintainable and portable way to test this bug, short of adding a sitecustomize.py to the buildsystem and have it always run with it (hmmm....)
* Add some asserts. In sysmodule, I think these were to try to silenceNeal Norwitz2006-10-281-0/+4
| | | | | | | some warnings from Klokwork. They verify the assumptions of the format of svn version output. The assert in the thread module helped debug a problem on HP-UX.
* Forward-port of r52136,52138: a review of overflow-detecting code.Armin Rigo2006-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * unified the way intobject, longobject and mystrtoul handle values around -sys.maxint-1. * in general, trying to entierely avoid overflows in any computation involving signed ints or longs is extremely involved. Fixed a few simple cases where a compiler might be too clever (but that's all guesswork). * more overflow checks against bad data in marshal.c. * 2.5 specific: fixed a number of places that were still confusing int and Py_ssize_t. Some of them could potentially have caused "real-world" breakage. * list.pop(x): fixing overflow issues on x was messy. I just reverted to PyArg_ParseTuple("n"), which does the right thing. (An obscure test was trying to give a Decimal to list.pop()... doesn't make sense any more IMHO) * trying to write a few tests...
* Handle allocation failures gracefully. Found with failmalloc.Neal Norwitz2006-07-211-39/+34
| | | | Many (all?) of these could be backported.
* After approval from Anthony, merge the tim-current_framesTim Peters2006-07-101-0/+17
| | | | | | branch into the trunk. This adds a new sys._current_frames() function, which returns a dict mapping thread id to topmost thread stack frame.
* _PySys_Init(): It's rarely a good idea to size a buffer to theTim Peters2006-06-061-1/+1
| | | | | | | | exact maximum size someone guesses is needed. In this case, if we're really worried about extreme integers, then "cp%d" can actually need 14 bytes (2 for "cp" + 1 for \0 at the end + 11 for -(2**31-1)). So reserve 128 bytes instead -- nothing is actually saved by making a stack-local buffer tiny.