Fred Drake [Thu, 12 Oct 2000 17:11:38 +0000 (17:11 +0000)]
When we know the compiler is GCC, always add the -Wall and
-Wstrict-prototypes options. This will make it a lot easier to keep
warnings under control in the first place in the future.
There is one known warning at this time, caught by the -Wstrict-prototypes
option. In Modules/main.c, the declaration of getopt() without parameters
gets a complaint (rightly) that it is not a proper prototype. The lack of
a complete prototype information should be corrected when the right
portability conditions have been identified.
Guido van Rossum [Thu, 12 Oct 2000 16:45:37 +0000 (16:45 +0000)]
[ Bug #116636 ] Bug in StringIO.write()
http://sourceforge.net/bugs/?func=detailbug&bug_id=116636&group_id=5470
bobalex@rsv.ricoh.com
Bug report: If the file position is less than the end of the "file",
and a write is performed extending past then end of the file, the data
string is corrupted.
Solution: in write(), when writing past the end, properly set self.len
when newpos is > self.len.
Tim Peters [Thu, 12 Oct 2000 06:10:25 +0000 (06:10 +0000)]
Stop raising OverflowError on underflows reported by libm (errno==ERANGE and
libm result is 0). Cautiously add a few libm exception test cases:
1. That exp(-huge) returns 0 without exception.
2. That exp(+huge) triggers OverflowError.
3. That sqrt(-1) raises ValueError specifically (apparently under glibc linked
with -lieee, it was raising OverflowError due to an accident of the way
mathmodule.c's CHECK() macro happened to deal with Infs and NaNs under gcc).
Add new section on the XML package. (This was the only major new 2.0 feature
left that wasn't covered. The article is therefore now essentially complete.)
A few minor changes
Thomas Wouters [Wed, 11 Oct 2000 23:26:11 +0000 (23:26 +0000)]
Do a better job at staying on-screen :P (Sorry, it's late here.) I'm
assuming here that the ANSI-C adjacent-string-concatenation technique is
allowable, now that Python requires an ANSI C compiler.
Thomas Wouters [Wed, 11 Oct 2000 23:20:09 +0000 (23:20 +0000)]
Adjust debugging code in the implementation of the DUP_TOPX bytecode, use
Py_FatalError() instead, and clarify the message somewhat. As discussed on
python-dev.
Lars Gustäbel [Wed, 11 Oct 2000 22:34:04 +0000 (22:34 +0000)]
Added non-ns start and end element methods.
Moved appendChild calls from DOMEventStream to PullDOM (parser indep).
Removed duplicated sibling pointer setting (duplicated in appendChild).
Fred Drake [Wed, 11 Oct 2000 18:56:00 +0000 (18:56 +0000)]
Make sure methods of ZipFile objects are in alphabetical order; the logical
groupings are still maintained. Based on a comment by Steve Holden
<sholden@holdenweb.com>.
Fred Drake [Wed, 11 Oct 2000 13:54:07 +0000 (13:54 +0000)]
Remove the last gcc -Wall warning about possible use of an uninitialized
variable. w should be initialized before entering the bytecode
interpretation loop since we only need one initialization to satisfy the
compiler.
Tim Peters [Wed, 11 Oct 2000 07:04:49 +0000 (07:04 +0000)]
Attempt to fix bogus gcc -Wall warnings reported by Marc-Andre Lemburg,
by making the DUP_TOPX code utterly straightforward. This also gets rid
of all normal-case internal DUP_TOPX if/branches, and allows replacing one
POP() with TOP() in each case, so is a good idea regardless.
Fred Drake [Tue, 10 Oct 2000 21:10:35 +0000 (21:10 +0000)]
Avoid a couple of "value computed is not used" warnings from gcc -Wall;
these computations are required for their side effects in traversing the
variable arguments list.
Fred Drake [Tue, 10 Oct 2000 20:58:48 +0000 (20:58 +0000)]
Note that the UserString/MutableString classes are far less efficient
than the built-in string types (suggested by Moshe Zadka
<moshez@math.huji.ac.il>).
Clarified what "can be converted to a string" means.
Fred Drake [Tue, 10 Oct 2000 19:35:40 +0000 (19:35 +0000)]
Substantially revise to handle the fact that Python CVS is no longer in a
file-system accessible repository. Add a little bit of smarts to convert
the cvsroot to an anonymous cvsroot the real one requires an authenticated
login to SourceForge; this avoids the SSH startup delay when doing the
checkout or export to get a fresh copy of the tree.
Fred Drake [Tue, 10 Oct 2000 16:46:36 +0000 (16:46 +0000)]
Move the documentation for the mutex module to be with the threading
and queue-management modules, since that is where the general context
for use in most cases.
Tim Peters [Mon, 9 Oct 2000 23:43:55 +0000 (23:43 +0000)]
When the classes in wave.py opened files themselves, their .close() methods
didn't bother to close the files. This caused the new test_wave test to fail
under Windows, as Windows won't let you delete a file that's open. Fixed
that by ensuring the wave read & write classes' .close() and __del__ methods
close files that were opened by their constructors.
Fix by Jean-Claude Rimbault [ Bug #116271 ] -- the WAVE header was
never written properly because the '4' length indicators for the 's'
format characters were missing.
Fred Drake [Mon, 9 Oct 2000 19:57:39 +0000 (19:57 +0000)]
Move the test for confirmation that all nodes have been freed into the
driver code, so that each test gets this; it had been done inconsistently.
Remove the lines that set the variables holding dom objects to None; not
needed since the interpreter cleans up locals on function return.
Tony Lownds: [ Patch #101816 ] Fixes shared modules on Mac OS X
1. Mac OS X is recognized by the Next-ish host recognition code as
"Darwin/1.2"
2. When specifying just --with-dyld, modules can compile as shared
3. --with-dyld and --with-next-framework, modules can compile as
shared
4. --with-suffix=.exe, and Lib/plat-darwin1.2 is being made, the regen
script invokes python as python.exe
[I had to reformat this patch a bit to make it work. Please test!]
Dan Wolfe: [ Patch #101823 ] Fix Darwin POSIX Thread redefinition
The patch below fixes the redefinition problem in Darwin with
_POSIX_THREADS. I'm not sure if this is the correct long term fix but
for now it fixes the problem and the fix is specific to Darwin.
Dan Wolfe: [ Patch #101824 ] On Darwin, remove unrecognized option
`-OPT:Olimit=0'
After many, many, many compiles, I finally got itchy of this warning
cluttering up the output... so I scratched (Darwin configs only) and
it's gone! :-)
Use python$EXE instead of python, for Darwin. (Patch by Tony
Lownds. (#101816)
[Note: I'm not sure that this is really the right fix. Surely Darwin
doesn't require you to say "python.exe" everywhere??? Even Windows
doesn't! Or am I misunderstanding the point?]
Patch #101810: check whether zst.avail_out is non-zero when getting
a Z_BUF_ERROR while decompressing. If it is, assume that this means
the data being decompressed is bad and raise an exception, instead of
just assuming that Z_BUF_ERROR always means that more space is required.
[ Bug #116174 ] using %% in cstrings sometimes fails with unicode paramsFix for the bug reported in Bug #116174: "%% %s" % u"abc" failed due
to the way string formatting delegated work to the Unicode formatting
function.
Tim Peters [Sat, 7 Oct 2000 05:09:39 +0000 (05:09 +0000)]
Possible fix for Skip's bug 116136 (sre recursion limit hit in tokenize.py).
tokenize.py has always used naive regexps for matching string literals,
and that appears to trigger the sre recursion limit on Skip's platform (he
has very long single-line string literals). Replaced all of tokenize.py's
string regexps with the "unrolled" forms used in IDLE, where they're known to
handle even absurd (multi-megabyte!) string literals without trouble. See
Friedl's book for explanation (at heart, the naive regexps create a backtracking
choice point for each character in the literal, while the unrolled forms create
none).
Tim Peters [Fri, 6 Oct 2000 23:09:00 +0000 (23:09 +0000)]
Fix for next iteration of SF bug 115690 (Unicode headaches in IDLE). The
parsing functions in support of auto-indent weren't expecting Unicode
strings, but text.get() can now return them (although it remains muddy as
to exactly when or why that can happen). Fixed that with a Big Hammer.