summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* Check return result from Py_InitModule*(). This API can fail.Neal Norwitz2006-01-191-0/+2
| | | | Probably should be backported.
* svnversion_init(): Use standard layout for function defn.Tim Peters2006-01-061-1/+2
|
* Trimmed trailing whitespace.Tim Peters2006-01-061-20/+20
|
* Drop sys.build_number. Add sys.subversion.Martin v. Löwis2006-01-051-2/+84
|
* Expose Subversion revision number (calculated via "svnversion .") to Python.Barry Warsaw2005-12-181-0/+3
| | | | | | | Add C API function Py_GetBuildNumber(), add it to the interactive prompt banner (i.e. Py_GetBuildInfo()), and add it as the sys.build_number attribute. The build number is a string instead of an int because it may contain a trailing 'M' if there are local modifications.
* Merge ast-branch to headJeremy Hylton2005-10-201-1/+1
| | | | | | | | | | This change implements a new bytecode compiler, based on a transformation of the parse tree to an abstract syntax defined in Parser/Python.asdl. The compiler implementation is not complete, but it is in stable enough shape to run the entire test suite excepting two disabled tests.
* SF bug #887946, segfault if redirecting directoryNeal Norwitz2005-10-031-0/+9
| | | | | | | Also provide a warning if a directory is passed on the command line. Add minimal command line test. Will backport.
* patch [ 1119423 ] python -c readlink()s and stat()s '-c'Georg Brandl2005-09-151-3/+3
|
* Partially revert #1074011; don't try to fflush stdin.Martin v. Löwis2005-01-271-1/+10
| | | | Backported to 2.3 and 2.4.
* Flush std{in,out,err} before closing it. Fixes #1074011.Martin v. Löwis2005-01-231-3/+10
| | | | Will backport to 2.4 and 2.3.
* This is my patch:Michael W. Hudson2004-08-121-1/+1
| | | | | | [ 1005891 ] support --with-tsc on PPC plus a trivial change to settscdump's docstring and a Misc/NEWS entry.
* Remove compiler warningNeal Norwitz2004-06-131-1/+1
|
* Patch #510695: Add TSC profiling for the VM.Martin v. Löwis2004-06-081-0/+30
|
* Changed random calls to PyThreadState_Get() to use the macroNicholas Bastin2004-03-241-8/+8
|
* Enable the profiling of C functions (builtins and extensions)Nicholas Bastin2004-03-241-3/+4
|
* Move initialization of sys.std{in,out}.encoding to Py_Initialize.Martin v. Löwis2003-08-091-18/+0
| | | | | Verify that the encoding actually exists. Fixes #775985. Will backport to 2.3.
* New function sys.getcheckinterval(), to complement setcheckinterval().Tim Peters2003-07-061-0/+12
|
* Patch #612627: Add encoding attribute to file objects, and determineMartin v. Löwis2003-05-101-0/+43
| | | | the terminal encoding on Windows and Unix.
* Patch #708495: Port more stuff to OpenVMS.Martin v. Löwis2003-05-031-0/+19
|