summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Renamed the C extension for ncurses support from 'curses' to '_curses'.Andrew M. Kuchling2000-06-102-8/+8
| | | | (The SourceForge admins have been asked to rename the ,v file.)
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-071-1/+1
| | | | The locale module is turned on per default.
* Patch from Trent Mick:Andrew M. Kuchling2000-06-061-1/+1
| | | | | Fix a small bug in posixmodule.c where a char* is being dereferenced where it should not be.
* Use PyArg_ParseTuple and specify the method names, following a suggestionAndrew M. Kuchling2000-06-031-5/+5
| | | | from Greg Stein
* Add missing PyArg_NoArgs() calls to methods that didn't take argumentsAndrew M. Kuchling2000-06-031-8/+16
| | | | (Pointed out by Moshe Zadka)
* Fredrik Lundh: here's the 96.6% version of SREJeremy Hylton2000-06-013-194/+500
|
* Fix bug reported by atkins@gweep.net; re.compile(r"[\100-\410]")Andrew M. Kuchling2000-06-011-1/+1
| | | | | dumps core. Solution: fix check_escape() to match its comment and use only the low 8 bits of the octal number.
* Michael Hudson <mwh21@cam.ac.uk>:Fred Drake2000-06-013-7/+14
| | | | | Removed PyErr_BadArgument() calls and replaced them with more useful error messages.
* Patch from M.-A. Lemburg:Jeremy Hylton2000-05-261-25/+23
| | | | | | | | | | | | | | | | | | | | | | | | | Python on UNIX now trusts PYTHONHOME unconditionally Modules/getpath.c: Landmark changed to os.py. Setting PYTHONHOME now unconditionally sets sys.prefix (and sys.exec_prefix). No further checks are done whether the standard lib can be found in that location or not. This is in sync with the PC subdir getpath implementations. PC/getpathp.c: Landmark changed to os.py. PC/os2vacpp/getpathp.c: Landmark changed to os.py. Note: BAW's checkin on exceptions.c eliminates earlier concerns about a bogus PYTHONHOME value leading to a core dump. Instead it causes a useless sys.path and prevents imports.
* _exceptions.c is moved to ../Python/exceptions.cBarry Warsaw2000-05-261-994/+0
|
* The _exceptions module is moved to the Python subdirectory.Barry Warsaw2000-05-261-1/+0
|
* Built-in class-based standard exceptions. Written by Fredrik Lundh.Barry Warsaw2000-05-251-0/+994
| | | | Modified, proofread, and integrated for Python 1.6 by Barry Warsaw.
* Added the _exceptions module, implementing the built-in class-basedBarry Warsaw2000-05-251-0/+1
| | | | standard exceptions.
* Changes by AMK: Use HAVE_NCURSES_H to include correct header fileAndrew M. Kuchling2000-05-231-133/+124
| | | | | | | | | Lots of typo fixes (a bit too much cut-and-paste in this module) Aliases removed: attr_on, attr_off, attr_set Lowercased the names COLOR_PAIR and PAIR_NUMBER #ifdef's for compiling on Solaris added (need to understand SYSV curses versions better and generalize this) Bumped version number bumped to 1.6
* Oliver Andrich's ncurses-specific curses module, version 1.5b1Andrew M. Kuchling2000-05-231-948/+1607
|
* Donn Cave <donn@oz.net>:Fred Drake2000-05-161-0/+2
| | | | BeOS (up to 5.0) lacks <netinet/tcp.h>.
* The addition of rint() (by Peter Schneider-Kamp; I forgot to mentionGuido van Rossum2000-05-111-0/+4
| | | | | | that before) in the previous patch has one problem; rint() is not in the C math library on all platforms (e.g. not for VC++). Make it conditional on HAVE_RINT.
* Added math.rint() -- round according to current IEEE754 modeGuido van Rossum2000-05-111-0/+3
|
* M.-A. Lemburg <mal@lemburg.com>:Fred Drake2000-05-091-1/+4
| | | | | Fixed a bug due to a /* inside /*...*/. GCC doesn't like this and bombs.
* New version from Jim Fulton to fix a problem that Eric Raymond ranGuido van Rossum2000-05-091-6/+20
| | | | | | | | | | | | | | | | | | | | | | into. Jim writes: The core dump was due to a C decrement operation in a macro invocation in load_pop. (BAD) I fixed this by moving the decrement outside the macro call. I added a comment to load_pop and load_mark to document the fact that cPickle separates the unpickling stack into two separate stacks, one for objects and one for marks. I also moved some increments out of some macro calls (PyTuple_SET_ITEM and PyList_SET_ITEM). This wasn't necessary, but made me feel better. :) I tested these changes in *my* cPickle, which doesn't have the new Unicode stuff.
* Trent Mick:Guido van Rossum2000-05-081-4/+4
| | | | | | | | | | | | | Fix overflow bug in ldexp(x, exp). The 'exp' argument maps to a C int for the math library call [double ldexp(double, int)], however the 'd' PyArg_ParseTuple formatter was used to yield a double, which was subsequently cast to an int. This could overflow. [GvR: mysteriously, on Solaris 2.7, ldexp(1, 2147483647) returns Inf while ldexp(1, 2147483646) raises OverflowError; this seems a bug in the math library (it also takes a real long time to compute the Inf outcome). Does this point to a bug in the CHECK() macro? It should have discovered that the result was outside the HUGE_VAL range.]
* When the UTF-8 conversion to Unicode fails, return an 8-bit stringGuido van Rossum2000-05-041-1/+5
| | | | | | | | | | instead. This seems more robust than returning an Unicode string with some unconverted charcters in it. This still doesn't support getting truly binary data out of Tcl, since we look for the trailing null byte; but the old (pre-Unicode) code did this too, so apparently there's no need. (Plus, I really don't feel like finding out how Tcl deals with this in each version.)
* Two changes to improve (I hope) Unicode support.Guido van Rossum2000-05-041-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. In Tcl 8.2 and later, use Tcl_NewUnicodeObj() when passing a Python Unicode object rather than going through UTF-8. (This function doesn't exist in Tcl 8.1, so there the original UTF-8 code is still used; in Tcl 8.0 there is no support for Unicode.) This assumes that Tcl_UniChar is the same thing as Py_UNICODE; a run-time error is issued if this is not the case. 2. In Tcl 8.1 and later (i.e., whenever Tcl supports Unicode), when a string returned from Tcl contains bytes with the top bit set, we assume it is encoded in UTF-8, and decode it into a Unicode string object. Notes: - Passing Unicode strings to Tcl 8.0 does not do the right thing; this isn't worth fixing. - When passing an 8-bit string to Tcl 8.1 or later that has bytes with the top bit set, Tcl tries to interpret it as UTF-8; it seems to fall back on Latin-1 for non-UTF-8 bytes. I'm not sure what to do about this besides telling the user to disambiguate such strings by converting them to Unicode (forcing the user to be explicit about the encoding). - Obviously it won't be possible to get binary data out of Tk this way. Do we need that ability? How to do it?
* Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum2000-05-0337-124/+138
| | | | | | | | | | For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
* Remove all references to stdwin.Guido van Rossum2000-05-031-21/+1
|
* >>Boing!<<Guido van Rossum2000-05-031-2664/+0
| | | | Finally, this long-obsolete module bites the dust.
* Vladimir Marangozov:Guido van Rossum2000-05-031-5/+5
| | | | | Change Py_Malloc/Realloc/Free calls to PyMem_Malloc/Realloc/Free + PyErr_Nomemory on error check. Py_Malloc c.s. are obsolete.
* Mark Hammond to the rescue:Guido van Rossum2000-05-031-3/+4
| | | | | | | | | | | | Checkin 2.131 of posixmodule.c changed os.stat on Windows, so that "/bin/" type notation (trailing backslash) would work on Windows to be consistent with Unix. However, the patch broke the simple case of: os.stat("\\") This did work in 1.5.2, and obviously should! This patch addresses this, and restores the correct behaviour.
* Disable the ZEROTRAP code -- this turns a 0 byte into a 2 byte and IGuido van Rossum2000-05-021-1/+1
| | | | | don't think that's what we want. There was some brief discussion of this somewhere but I don't recall where.
* usage_mid: Remove the description of the -X flag; it's gone now.Barry Warsaw2000-05-021-5/+0
| | | | Py_Main(): Remove the 'X' case.
* Ignore a bunch of generated files.Barry Warsaw2000-05-021-0/+8
|
* Marc-Andre Lemburg:Guido van Rossum2000-05-011-1/+6
| | | | | | | Added -U command line option. With the option enabled the Python compiler interprets all "..." strings as u"..." (same with r"..." and ur"...").
* posix_utime(): Allow the second argument to be None, which invokes theBarry Warsaw2000-05-011-7/+23
| | | | | | utime(path, NULL) call, setting the atime and mtime of the file to the current time. The previous signature utime(path, (atime, mtime)) is of course still allowed.
* Marc-Andre Lemburg:Guido van Rossum2000-04-271-1/+3
| | | | Fixes a memory leak found by Fredrik Lundh.
* Jack Jansen:Guido van Rossum2000-04-261-0/+17
| | | | | | | | This patch is a workaround for Macintosh, where the GUSI I/O library (time, stat, etc) use the MacOS epoch of 1-Jan-1904 and the MSL C library (ctime, localtime, etc) uses the (apparently ANSI standard) epoch of 1-Jan-1900. Python programs see the MacOS epoch and we convert values when needed.
* Michael Hudson:Guido van Rossum2000-04-261-3/+16
| | | | | | | | | | | | This patch changes posixmodule.c:execv to a) check for zero length args (does this to execve, too), raising ValueError. b) raises more rational exceptions for various flavours of duff arguments. I *hate* TypeError: "illegal argument type for built-in operation" It has to be one of the most frustrating error messages ever.
* Fix typo in last patch -- the symbol's name is MSG_DONWAIT, notGuido van Rossum2000-04-251-1/+1
| | | | MSG_DONTWAIT. Reported by Fredrik Lundh.
* Patch by Charles G Waldman:Guido van Rossum2000-04-251-1/+4
| | | | | 1) Adds MSG_DONTWAIT if defined (I needed this) 2) Spells "coreectly" correctly ;-)
* Charles G Waldman: Doing a PyObject_New then PyMem_DEL causes havoc ifGuido van Rossum2000-04-251-3/+3
| | | | you are trying to use Py_TRACE_REFS.
* validate_arglist(): Re-written to reflect extended call syntax.Fred Drake2000-04-251-3/+80
| | | | | validate_numnodes(): Added comment to explain the sometimes idiomatic usage pattern.
* Jack Jansen: The GUSI 2.0 I/O library used on the Mac uses theGuido van Rossum2000-04-241-9/+15
| | | | | | | | | | socklen_t (unsigned int) for most size parameters. Apparently this is part of the UNIX 98 standard. [GvR: the changes to configure.in etc. that I just checked in make sure that socklen_t is defined everywhere, so I deleted the little part of Jack's mod to define socklen_t if not in GUSI2. I suppose I will have to add it to the Windows config.h in a minute.]
* Charles Waldman writes:Guido van Rossum2000-04-211-14/+11
| | | | | | | | | | | | | | | | | | | | """ Problem description: Run the following script: import test.test_cpickle for x in xrange(1000000): reload(test.test_cpickle) Watch Python's memory use go up up and away! In the course of debugging this I also saw that cPickle is inconsistent with pickle - if you attempt a pickle.load or pickle.dump on a closed file, you get a ValueError, whereas the corresponding cPickle operations give an IOError. Since cPickle is advertised as being compatible with pickle, I changed these exceptions to match. """
* Use an explicit macro SOCKETCLOSE which expands to closesocket (onGuido van Rossum2000-04-211-10/+14
| | | | | | | | | Windows), soclose (on OS2), or to close (everywhere else). Hopefully this fixes a new compilation error that I suddenly get on Windows because the macro definition for close -> closesocket apparently was done before including io.h, which contains a prototype for close. (No idea why this wasn't an error before.)
* Patch by Brian Hooper, somewhat augmented by GvR, to strip a trailingGuido van Rossum2000-04-211-0/+28
| | | | | | | | | | backslash from the pathname argument to stat() on Windows -- while on Unix, stat("/bin/") succeeds and does the same thing as stat("/bin"), on Windows, stat("\\windows\\") fails while stat("\\windows") succeeds. This modified version of the patch recognizes both / and \. (This is odd behavior of the MS C library, since os.listdir("\\windows\\") succeeds!)
* ANSI-fy & de-tabify the source.Fred Drake2000-04-191-1505/+1317
| | | | (4-space indents already used.)
* setup_confname_table(): Close memory leak caused by not decref'ing theBarry Warsaw2000-04-131-16/+15
| | | | inserted dictionary values. Also, simplified the logic a bit.
* raise TypeError when bad argument passed to cStringIO.StringIOJeremy Hylton2000-04-121-4/+10
|
* Correct fix by Mark Favas for the cast problems.Guido van Rossum2000-04-101-4/+5
|
* I've had complaints about the comparison "where >= 0" before -- onGuido van Rossum2000-04-101-1/+1
| | | | IRIX, it doesn't even compile. Added a cast: "where >= (char *)0".
* Remove CRLF line endings.Guido van Rossum2000-04-101-2/+2
| | | | Fredrik Lundh: add two missing casts.