Commit Graph

24210 Commits

Author SHA1 Message Date
Neal Norwitz 089061f7f0 Remove unused local variables 2002-09-12 20:34:41 +00:00
Neal Norwitz a59ab05fda Remove unnecessary imports 2002-09-12 20:29:56 +00:00
Jack Jansen 4ef1103b71 When testing for localhost/ first map to lower case. Spotted by Skip. 2002-09-12 20:14:04 +00:00
Jack Jansen 3ae2dc5e5e Treat file://localhost/ as local too (same as file:/ and file:///).
Fixes #607789, bugfix candidate.
2002-09-12 19:47:52 +00:00
Jack Jansen 10c6eda070 Mode rU for universal newlines, not rT. Spotted by Guido. 2002-09-12 19:41:28 +00:00
Fred Drake c1ddc505d9 Minor revision to the "\\" patch, including updating the docs a little to
accomodate the fact that they are more general now that they are for the
os.path module and not just posixpath.

This and the previous patch should be combined and applied to the 2.2-maint
branch.
2002-09-12 18:01:26 +00:00
Skip Montanaro c12909bcc6 add note about os.path.join and drive letters on Windows. 2002-09-12 17:39:56 +00:00
Fred Drake 6dd7d07aa6 If PyXML is installed, there is no Node.allnodes, so that portion of
the test should be skipped if that's the case.
2002-09-12 17:03:02 +00:00
Fred Drake d2909c901e Relax a test so it passes either with the standard library or PyXML.
The original expected value is actually wrong, but we'll pick up the
real fix and test when we refresh the xml package from PyXML before
2.3a1.
2002-09-12 17:02:01 +00:00
Guido van Rossum efc1188239 Fix warnings on 64-bit platforms about casts from pointers to ints.
Two of these were real bugs.
2002-09-12 14:43:41 +00:00
Guido van Rossum 770acd3f7f Only build the 'dl' extension when sys.maxint equals 2**31-1.
This module raises "SystemError: module dl requires sizeof(int) ==
sizeof(long) == sizeof(char*)" when compiled on 64-bit platforms.
2002-09-12 14:41:20 +00:00
Walter Dörwald ed44dbd959 Remove another mention of "import string".
The file itself still mentions Python 1.5.1,
so it might need further updates.
2002-09-12 14:40:44 +00:00
Fred Drake b7c1895ec5 Fix typo reported by Paul Clifford.
Note that there is no str.joinfields(), use str.join() instead.
2002-09-12 14:16:07 +00:00
Michael W. Hudson 5c1ad84d7f Fix for platforms where int != long. 2002-09-12 09:31:30 +00:00
Guido van Rossum 4bf1254342 Undocumented feature: MHMailbox sets the msg object's _mh_msgno
attribute to the (stringized) message number (if this attribute is
settable).  This is useful so users of this class can report the
correct message number (e.g. when classifying spam).

Also added a blank line before the first method of each class.
2002-09-12 05:08:00 +00:00
Guido van Rossum d560ace3a7 I don't think it's safe to use map.iteritems() in the various poll
routines.  I got some errors "dictionary changed size during
iteration" when running ZEO tests on machine while doing heavy
forground work in another window, and thinking about it, I believe
that it should be okay if readable() or writable() modifies the map.

I also finally made all the spacing conform to the Python style guide:
no space between a function/method name and the following left
parenthesis (fixed lots of occurrences), spaces around assignment
operators (fixed a few, always of the form "map=..."), and a blank
line between the class statement and the first method definition (a
few).
2002-09-12 04:57:29 +00:00
Barry Warsaw 78170048f9 Bump to 2.3.1 to pick up the missing file. 2002-09-12 03:44:50 +00:00
Jack Jansen ec694c32a7 Pass None to AHGotoPage(). 2002-09-11 22:05:59 +00:00
Jack Jansen f6b3fddfc3 The debugger source view only understood mac-style linefeeds. Fixed. 2002-09-11 22:05:02 +00:00
Fred Drake 73e8ebfc5a Revise text about the level of DOM support, and provide pointers to
the work of the XML-SIG in the main body of the text.

Modify the markup in a few places to avoid wrapping lines in bad
places, and just general cleanliness.
2002-09-11 22:03:47 +00:00
Guido van Rossum 06067915c4 Add Mats Wichmann, another snake farmhand. 2002-09-11 21:09:53 +00:00
Walter Dörwald aaab30e00c Apply diff2.txt from SF patch http://www.python.org/sf/572113
(with one small bugfix in bgen/bgen/scantools.py)

This replaces string module functions with string methods
for the stuff in the Tools directory. Several uses of
string.letters etc. are still remaining.
2002-09-11 20:36:02 +00:00
Guido van Rossum 6a0477b099 Alphabetize Qvist properly. 2002-09-11 19:40:10 +00:00
Guido van Rossum 02fe64708f Insert an overflow check when the sequence repetition count is outside
the range of ints.  The old code would pass random truncated bits to
sq_repeat() on a 64-bit machine.

Backport candidate.
2002-09-11 19:00:52 +00:00
Guido van Rossum f981a3373c Add Laura "force of nature" Creighton and Anders "snake farmer" Qvist,
for their contributions to the snake farm.
2002-09-11 18:33:56 +00:00
Guido van Rossum c8060a68ff The list(xrange(sys.maxint / 4)) test blew up on 64-bit platforms.
Because ob_size is a 32-bit int but sys.maxint is LONG_MAX which is a
64-bit value, there's no way to make this test succeed on a 64-bit
platform.  So just skip it when sys.maxint isn't 0x7fffffff.

Backport candidate.
2002-09-11 18:32:30 +00:00
Guido van Rossum 4061cbee9c Patch suggested by Hamish Lawson: add an __iter__() that returns
iter(self.keys()).
2002-09-11 18:20:34 +00:00
Michael W. Hudson 806d1c817a Fix *really* embarrassing typo reported by Raymond Hettinger. 2002-09-11 17:09:45 +00:00
Jeremy Hylton fcd7353863 Use distutils.debug.DEBUG instead of distutils.core.DEBUG.
Note that distutils.core.DEBUG still works if client code uses it, but
the core code avoids circular references by using distutils.debug.
2002-09-11 16:31:53 +00:00
Jeremy Hylton 5f6228ed46 Define DEBUG in a separate module to resolve circular references. 2002-09-11 16:28:52 +00:00
Martin v. Löwis 504bc4f3b7 Remove mentioning of Python 2.0 limitations. Fixes #607783. 2002-09-11 16:26:03 +00:00
Guido van Rossum d4774fb6ef Untested code for 64-bit platforms. range_length() is declared as int
but returns r->len which is a long.  This doesn't even cause a warning
on 32-bit platforms, but can return bogus values on 64-bit platforms
(and should cause a compiler warning).  Fix this by inserting a range
check when LONG_MAX != INT_MAX, and adding an explicit cast to (int)
when the test passes.  When r->len is out of range, PySequence_Size()
and hence len() will report an error (but an iterator will still
work).
2002-09-11 15:55:48 +00:00
Michael W. Hudson 02ff6a9952 A slight change to SET_LINENO-less tracing.
This makes things a touch more like 2.2.  Read the comments in
Python/ceval.c for more details.
2002-09-11 15:36:32 +00:00
Michael W. Hudson 519a342d79 Bunch more tests. 2002-09-11 14:47:51 +00:00
Barry Warsaw fbcde75c70 get_payload(): Document that calling it with no arguments returns a
reference to the payload.
2002-09-11 14:11:35 +00:00
Mark Hammond 51a0ae3f97 Ignore IOError exceptions when writing the message. 2002-09-11 13:22:35 +00:00
Barry Warsaw ccd9e75b18 test_both(): I believe this was a typo: m is only defined if no
exception occurred so it should only be closed in the else clause.
Without this change we can an UnboundLocalError on Linux:

Traceback (most recent call last):
  File "Lib/test/test_mmap.py", line 304, in ?
    test_both()
  File "Lib/test/test_mmap.py", line 208, in test_both
    m.close()
UnboundLocalError: local variable 'm' referenced before assignment
2002-09-11 02:56:42 +00:00
Barry Warsaw 1a5b9562d6 test_quote_unquote(): Added a test for the rfc822.unquote() patch
(adapted from Quinn Dunkan's mimelib SF patch #573204).
2002-09-11 02:32:57 +00:00
Barry Warsaw 4e09d5c6d6 unquote(): Didn't properly de-backslash-ify. This patch (adapted from
Quinn Dunkan's mimelib SF patch #573204) fixes the problem.
2002-09-11 02:32:14 +00:00
Barry Warsaw bc6edac8df test_utils_quote_unquote(): Test for unquote() properly
de-backslash-ifying.
2002-09-11 02:31:24 +00:00
Barry Warsaw 184d55a897 rfc822.unquote() doesn't properly de-backslash-ify in Python prior to
2.3.  This patch (adapted from Quinn Dunkan's SF patch #573204) fixes
the problem and should get ported to rfc822.py.
2002-09-11 02:22:48 +00:00
Jack Jansen 93ad6a7a3b Converted to Vise 8. 2002-09-11 00:55:48 +00:00
Fred Drake 691fb55dd2 Clarify who maintains Tkinter and who maintains Tk. 2002-09-10 21:59:17 +00:00
Guido van Rossum ef1b41ba0a At Jim Fulton's request, increase the maxstring value of _saferepr to
a more reasonable value.

Backport candidate.
2002-09-10 21:57:14 +00:00
Tim Peters 1b5112ac97 I left some debugging junk in here; removed it. Also replaced a few
more instances of the bizarre "del f; del m" ways to spell .close() (del
won't do any good here under Jython, etc).
2002-09-10 21:19:55 +00:00
Jack Jansen 17d67f07cd All set for 2.3 installer, except for upgrade of Vise version. 2002-09-10 21:15:44 +00:00
Tim Peters 4f4f4d70af A few days ago a test was added here to ensure that creating an mmap
with a size larger than the underlying file worked on Windows.  It
does <wink>.  However, merely creating an mmap that way has the side
effect of growing the file on disk to match the specified size.  A
*later* test assumed that the file on disk was still exactly as it was
before the new "size too big" test was added, but that's no longer true.
So added a hack at the end of the "size too big" test to truncate the
disk file back to its original size on Windows.
2002-09-10 20:49:15 +00:00
Jack Jansen a0d1833639 Fixed typo spotted by Whomas Touters. 2002-09-10 20:07:34 +00:00
Barry Warsaw 034b47acfe _parsebody(): Instead of raising a BoundaryError when no start
boundary could be found -- in a lax parser -- the entire body is
assigned to the message payload.
2002-09-10 16:14:56 +00:00
Barry Warsaw b1c1de3805 Import _isstring() from the compatibility layer.
_handle_text(): Use _isstring() for stringiness test.

_handle_multipart(): Add a test before the ListType test, checking for
stringiness of the payload.  String payloads for multitypes means a
message with broken MIME chrome was parsed by a lax parser.  Instead
of raising a BoundaryError in those cases, the entire body is assigned
to the message payload (but since the content type is still
multipart/*, the Generator needs to be updated too).
2002-09-10 16:13:45 +00:00