summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* 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 ........
* 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.
* Add 3 more bytes to a buffer to cover constants in string and null byte on ↵Brett Cannon2006-06-051-1/+1
| | | | | | top of 10 possible digits for an int. Closes bug #1501223.
* Make use of METH_O and METH_NOARGS where possible.Georg Brandl2006-05-291-2/+2
| | | | Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
* C++ compiler cleanup: extern "C" a couple declarations, cast int to size_tSkip Montanaro2006-04-181-1/+9
|
* Ignore the references to the dummy objects used as deleted keysArmin Rigo2006-04-121-3/+2
| | | | in dicts and sets when computing the total number of references.
* Bug #1421664: Set sys.stderr.encodingMartin v. Löwis2006-04-031-0/+5
|
* Try to be a bit more consistent on all platforms:Neal Norwitz2006-03-091-1/+4
| | | | | | | python . python < . both print a message, return non-zero and do not core dump.
* Change int to Py_ssize_t in several places.Martin v. Löwis2006-03-071-1/+1
| | | | | Add (int) casts to silence compiler warnings. Raise Python exceptions for overflows.
* Use Py_ssize_t for _Py_RefTotal.Neal Norwitz2006-03-041-1/+1
| | | | I tried to handle Win64 properly, but please review.
* Fix minor docstring typo.Brett Cannon2006-03-021-1/+1
|
* Use Py_ssize_t to count theMartin v. Löwis2006-02-161-1/+2
|
* Merge ssize_t branch.Martin v. Löwis2006-02-151-1/+1
|