Tim Peters [Sun, 8 Jan 2006 02:25:34 +0000 (02:25 +0000)]
alias_for_import_name(): Dueling compiler warnings ;-)
Squash new warnings from VC 7.1 about mixing signed and
unsigned types in comparisons. I can see why `len` was
changed to size_t here, but don't see why `i` was also
changed. Change `i` back to int.
Neal Norwitz [Sun, 8 Jan 2006 01:10:34 +0000 (01:10 +0000)]
Fix icc warnings. This couldn't have been correct since i is checked
for 2 different values without changing. I think this was the intent.
The unused warning only occurs when not building in debug mode.
Neal Norwitz [Sat, 7 Jan 2006 21:07:20 +0000 (21:07 +0000)]
If there is no libtermcap all the readline tests failed.
This inappropriately disabled some capabilities which exist.
Now test for readline in -lreadline, if not found there, try it
in -ltermcap only if not in -lreadline. If both libraries are
required, there will need to be more work, but I'm not sure
under what conditions both libraries would be required.
Neal Norwitz [Fri, 6 Jan 2006 04:18:21 +0000 (04:18 +0000)]
initscr() will exit if there's an error. Try to catch the obvious failure
cases if TERM isn't set or is unknown (perhaps we should only check if
unset or empty?)
Skip the test if TERM isn't set. This seems to occur when running under
buildbot and presumably cron.
For some more info check here:
http://mail.python.org/pipermail/python-checkins/2006-January/048704.html
Neal Norwitz [Tue, 3 Jan 2006 01:38:53 +0000 (01:38 +0000)]
As discussed on python-dev, don't remove Python-ast.[ch] with distclean
even though they are generated. Since these files require Python 2.2+,
it's possible they can't be created on a fresh system.
Tim Peters [Fri, 30 Dec 2005 20:46:23 +0000 (20:46 +0000)]
test_main(): Restore the original root logger level after running
the tests. This stops the confusing/annoying:
No handlers could be found for logger "cookielib"
message we got whenever some test running after test_logging
happened to use cookielib.py (when not using regrtest's -r,
this happened during test_urllib2; when using -r, it varied).
Skip Montanaro [Fri, 30 Dec 2005 05:09:48 +0000 (05:09 +0000)]
Fix a delimiter detection problem in sniffer. Sniffing "a|b|c\r\n" was
returning 'a' as the delimiter. It now returns '|', but not because I
understood better what the code was supposed to do. Would someone that
understands the idea behind _guess_delimiter() (see its doc string) look to
see if my fallback choice is better than before or if it's just serendipity
that I picked the proper delimiter?
* set sq_repeat and sq_concat to NULL for user-defined new-style
classes, as a way to fix a number of related problems. See
test_descr.notimplemented()). One of these problems was fixed
in r25556 and r25557 but many more existed; this is a general
fix and thus reverts r25556-r25557.
* to avoid having PySequence_Repeat()/PySequence_Concat() failing
on user-defined classes, they now fall back to nb_add/nb_mul if
sq_concat/sq_repeat are not defined and the arguments appear to
be sequences.
Skip Montanaro [Wed, 28 Dec 2005 15:37:25 +0000 (15:37 +0000)]
Fix for problem with Sniffer class. If your delimiter is whitespace and the
last field was empty it would strip the delimiter and incorrectly guess that
"" was the delimiter. Reported in c.l.py by Laurent Laporte. Will
backport.
Armin Rigo [Mon, 26 Dec 2005 18:06:17 +0000 (18:06 +0000)]
Updating the short blob about old/new-style classes to reflect (IMHO) more
precisely the motivation and the differences.
Added links to www.python.org/doc/newstyle.html and a footnote to warn against
the statement "x[i] is equivalent to x.__getitem__(i)", which already caused
many invalid bug reports on SF.
cast first PyUnicode_Decode argument to proper type (why is
"char *" used for encoded byte streams, btw? shouldn't that
be "void *" or, if necessary, "unsigned char *"?)