summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* New version from Jim:Guido van Rossum1999-06-151-50/+30
| | | | | | | | - Don't call Py_FatalError() when initialization fails. - Fix bogus use of return value from PyRun_String(). - Fix misc. compiler errors on some platforms.
* New version from Jim: don't call Py_FatalError() when initialization fails.Guido van Rossum1999-06-151-5/+2
|
* Jim Fulton writes:Guido van Rossum1999-06-091-10/+56
| | | | | | | | | | | | | | | | | | I've updated cPickle.c to use class exceptions: Changed pickle error types to classes: PickleError PicklingError UnpickleableError UnpicklingError And change the handling of unpickleable objects so that an UnpickleableError is raised with the unpickleable object as the argument. UnpickleableError has a reasonable string representation and provides access to the problem object, which is useful during debugging. [I'm still waiting for patches to do the same to pickle.py.]
* posix_listdir(): When an error occurs, callBarry Warsaw1999-05-271-5/+5
| | | | | | posix_error_with_filename() instead of posix_error(), passing in the name argument, so you get information on which directory was being listed.
* On HP-UX, -rpath is another option taking an argument that needs to goGuido van Rossum1999-05-211-0/+1
| | | | to the libs variable. Reported by Albert Chin-A-Young.
* Apparently __GNU_LIBRARY__ is defined for glibc as well as for libc5.Guido van Rossum1999-04-231-3/+3
| | | | | | | The test really wanted to distinguish between the two. So now we test for __GLIBC__ instead. I have confirmed that this works for glibc and I have an email from Christian Tanzer confirming that it works for libc5, so it should be fine.
* Jim Fulton writes:Guido van Rossum1999-04-191-13/+41
| | | | | | | | | | | | | | I have attached a new cPickle that adds a new control attribute to unpicklers: Added new Unpickler attribute, find_global. If set to None, then global and instance pickles are disabled. Otherwise, it should be set to a callable object that takes two arguments, a module name and an object name, and returns an object. If the attribute is unset, then the default mechanism is used. This feature provides an additional mechanism for controlling which classes can be used for unpickling.
* Patch from Tim Peters to repare a the problem that tracebacks are offGuido van Rossum1999-04-191-2/+9
| | | | by a line when Python is run with -x.
* Patch by Drew Csillag for FreeBSD's sh, which doesn't automaticallyGuido van Rossum1999-04-191-0/+8
| | | | join \-terminated lines.
* Avoid triggering Alpha OSF/1 specific code on Alpha NT or Linux.Guido van Rossum1999-04-191-1/+1
|
* Put back __osf__ support for gethostbyname_r(); the real bug was thatGuido van Rossum1999-04-131-1/+5
| | | | | | it was being used even without threads. This of course might be an all-platform problem so now we only use the _r variant when we are using threads.
* Fix accidentally reversed NULL test in load_mark(). Suggested byGuido van Rossum1999-04-121-1/+1
| | | | | Tamito Kajiyama. (This caused a bug only on platforms where malloc(0) returns NULL.)
* 'clean' target should remove hassignal.Guido van Rossum1999-04-121-1/+2
|
* Cast added by Jack Jansen (for Mac port).Guido van Rossum1999-04-121-1/+2
|
* casts for picky compilers.Guido van Rossum1999-04-102-2/+3
|
* 3-arg gethostbyname_r doesn't really work on OSF/1.Guido van Rossum1999-04-101-1/+1
|
* Patch by Andrew Kuchling to unflush() (flush() for deflating).Guido van Rossum1999-04-071-4/+8
| | | | | | Without this, if inflate() returned Z_BUF_ERROR asking for more output space, we would report the error; now, we increase the buffer size and try again, just as for Z_OK.
* Add extern decl for fsync() for SunOS 4.x.Guido van Rossum1999-04-071-0/+1
|
* Jonathan Giddy notes, and Chris Lawrence agrees, that some comments onGuido van Rossum1999-04-051-3/+3
| | | | #else/#endif are wrong, and that #if HAVE_TM_ZONE should be #ifdef.
* Protection against picling to/from closed (real) file.Guido van Rossum1999-03-291-0/+8
| | | | The problem was reported by Moshe Zadka.
* #$@%! Forgot to remove a #error directive used for testing. Sorry.Guido van Rossum1999-03-291-1/+0
|
* Chris Lawrence writes:Guido van Rossum1999-03-291-18/+28
| | | | | | | | | | | | | | | | | | | | | | """ The GNU folks, in their infinite wisdom, have decided not to implement altzone in libc6; this would not be horrible, except that timezone (which is implemented) includes the current DST setting (i.e. timezone for Central is 18000 in summer and 21600 in winter). So Python's timezone and altzone variables aren't set correctly during DST. Here's a patch relative to 1.5.2b2 that (a) makes timezone and altzone show the "right" thing on Linux (by using the tm_gmtoff stuff available in BSD, which is how the GLIBC manual claims things should be done) and (b) should cope with the southern hemisphere. In pursuit of (b), I also took the liberty of renaming the "summer" and "winter" variables to "july" and "jan". This patch should also make certain time calculations on Linux actually work right (like the tz-aware functions in the rfc822 module). (It's hard to find DST that's currently being used in the southern hemisphere; I tested using Africa/Windhoek.) """
* Avoid warnings from AIX compiler. Reported by Vladimir (AIX is myGuido van Rossum1999-03-291-3/+3
| | | | middlename) Marangozov, patch coded by Greg Stein.
* Add an .unused_data attribute to decompressor objects. If .unused_dataAndrew M. Kuchling1999-03-251-0/+22
| | | | | | is not an empty string, this means that you have arrived at the end of the stream of compressed data, and the contents of .unused_data are whatever follows the compressed stream.
* Added Greg Stein and Andrew Kuchling's sha module.Guido van Rossum1999-03-242-1/+610
| | | | Fix comments about zlib version and URL.
* Implement two suggestions by Jonathan Giddy: (1) in AIX, clear theGuido van Rossum1999-03-241-0/+19
| | | | | | | | | | | | data struct before calling gethostby{name,addr}_r(); (2) ignore the 3/5/6 args determinations made by the configure script and switch on platform identifiers instead: AIX, OSF have 3 args Sun, SGI have 5 args Linux has 6 args On all other platforms, undef HAVE_GETHOSTBYNAME_R altogether.
* Vladimir Marangozov implements the AIX 3-arg gethostbyname_r code.Guido van Rossum1999-03-241-14/+32
|
* Add $(EXE) to various occurrences of python so it will work on CygwinGuido van Rossum1999-03-231-2/+2
| | | | with egcs (after setting EXE=.exe). Patch by Norman Vine.
* Clean up pass for the previous patches.Guido van Rossum1999-03-221-23/+35
| | | | | | | | | | | | | | | | | | - Use HAVE_GETHOSTBYNAME_R_6_ARG instead of testing for Linux and glibc2. - If gethostbyname takes 3 args, undefine HAVE_GETHOSTBYNAME_R -- don't know what code should be used. - New symbol USE_GETHOSTBYNAME_LOCK defined iff the lock should be used. - Modify the gethostbyaddr() code to also hold on to the lock until after it is safe to release, overlapping with the Python lock. (Note: I think that it could in theory be possible that Python code executed while gethostbyname_lock is held could attempt to reacquire the lock -- e.g. in a signal handler or destructor. I will simply say "don't do that then.")
* Jonathan Giddy writes:Guido van Rossum1999-03-221-8/+15
| | | | | | | | Here's a patch to fix the race condition, which wasn't fixed by Rob's patch. It holds the gethostbyname lock until the results are copied out, which means that this lock and the Python global lock are held at the same time. This shouldn't be a problem as long as the gethostbyname lock is always acquired when the global lock is not held.
* Fixed the flush() method of compression objects; the test forAndrew M. Kuchling1999-03-221-12/+29
| | | | | the end of loop was incorrect, and failed when the flushmode != Z_FINISH. Logic cleaned up and commented.
* Use an unsigned cast to avoid a warning in VC++.Guido van Rossum1999-03-191-1/+2
|
* Docstring fix: acosh() returns the hyperbolic arccosine, not theFred Drake1999-03-161-1/+1
| | | | | hyperbolic cosine. Problem report via David Ascher by one of his students.
* Patch by Rob Riggs for Linux -- glibc2 has a different argumentGuido van Rossum1999-03-151-0/+24
| | | | converntion for gethostbyname_r() etc. than Solaris!
* Patch by Chris Herborth for BeOS code.Guido van Rossum1999-03-091-14/+8
| | | | | | | | | | He writes: I had an off-by-1000 error in floatsleep(), and the problem with time.clock() is that it's not implemented properly on QNX... ANSI says it's supposed to return _CPU_ time used by the process, but on QNX it returns the amount of real time used... so I was confused.
* # Typo in docstring (Retrun -> Return).Guido van Rossum1999-02-231-1/+1
|
* Carefully check for overflow when allocating the memory for fromfileGuido van Rossum1999-02-231-1/+8
| | | | | -- someone tried to pass in sys.maxint and got bitten by the bogus calculations.
* Patch by Tadayoshi Funaba (with some changes) to be smarter aboutGuido van Rossum1999-02-231-6/+12
| | | | | | | | guessing what happened when strftime() returns 0. Is it buffer overflow or was the result simply 0 bytes long? (This happens for an empty format string, or when the format string is a single %Z and the timezone is unknown.) if the buffer is at least 256 times as long as the format, assume the latter.
* Document *static* -- in two places!Guido van Rossum1999-02-221-1/+4
|
* We don't support leap seconds, so the seconds field of a time 9-tupleGuido van Rossum1999-02-221-1/+1
| | | | should be in the range [0-59]. Noted by Tadayoshi Funaba.
* In atoi(), don't use isxdigit() to test whether the last characterGuido van Rossum1999-02-221-1/+1
| | | | | | converted was a "digit" -- use isalnum(). This test is there only to guard against "+" or "-" being interpreted as a valid int literal. Reported by Takahiro Nakayama.
* The docstring for ttyname(..) claims a second "mode" argument. TheGuido van Rossum1999-02-221-1/+1
| | | | actual code does not allow such an argument. (Finn Bock.)
* When the parameter to PyInt_AsLong() has already been checked withFred Drake1999-02-171-2/+2
| | | | PyInt_Check(), use PyInt_AS_LONG() instead (two places).
* Use the portable form of initializing the ob_type field for new types.Fred Drake1999-02-161-2/+8
|
* The symbols P_* (for spawn*(), MS specific) should not have a leadingGuido van Rossum1999-02-161-5/+5
| | | | underscore after all, for consistency with the O_* symnbols.
* Fixed totally bogus conversion factors used in the Win32 version ofGuido van Rossum1999-02-161-3/+10
| | | | os.times().
* Got rid of the file-global PosixError. This was redundant since itBarry Warsaw1999-02-091-8/+4
| | | | | | was just an alias for PyExc_OSError and the way we were doing it was causing a (small) memory leak anyway. Just use PyExc_OSError everywhere.
* On Windows, -i shouldn't call set[v]buf(stdin, ...) because it screwsGuido van Rossum1999-02-091-1/+1
| | | | | | up the _tkinter main loop. Not clear why; the _kbhit() call _tkinter makes probably confuses the stdio library when buffering isn't set to whatever it is by default.
* Fix buglet in load_put -- the test for bad readline result tested theGuido van Rossum1999-02-081-1/+1
| | | | wrong variable.
* The variable TESTPATH should be initialized to empty.Guido van Rossum1999-02-081-1/+1
| | | | The test code is now accessed as a package.