svn+ssh://pythondev@svn.python.org/python/trunk
........
r71217 | georg.brandl | 2009-04-05 12:48:47 +0200 (So, 05 Apr 2009) | 1 line
#1726172: dont raise an unexpected IndexError if a voidresp() call has an empty response.
........
all the upper level libraries that use it, including urllib2.
Added and fixed some tests, and changed docs correspondingly.
Thanks to John J Lee for the patch and the pusing, :)
* resp[:1] in '123' # after Py2.2, this allowed blank responses to pass.
* replace <> with !=
* provide a usage message for empty command line calls
Backport candidate.
test if 'callable' has not been supplied is to test for None instead of
False. The previous correction to 'if callable()' was wrong because an unusable
callback would be ignored rather than raising an exception.
Instead of sending the real user and host, use "anonymous@" (i.e. no
host name at all!) as the default anonymous FTP password. This avoids
privacy violations.
expression. This is needed for certain servers that (in violation of
the standard) don't return the parentheses in the response.
This fixes SF bug #441712 by Henrik Weber (not exactly using his
patch).
to the class namespace.
Allow FTP.close() to be called more than once without tossing cookies.
(This seems to be a fairly common idiom for .close() methods, so let's
try to be consistent.)
This is slightly controversial, but after reading the argumentation in
the bug tracker for and against, I believe this is the right solution.
Let me know if it breaks for you, and how.
#101187, which some modifications. Specifically,
ntransfercmd(), transfercmd(), and retrbinary() all grow an optional
`rest' argument, which if not None, is used as the argument to an FTP
REST comman dbefore the socket is returned. Differences from the SF
patch:
- always compare against None with `is' or `is not' instead of == or !=
- no parens around conditional
- RFC 959 defines the argument to REST is a string containing any
ASCII characters in the range [33..126]. Therefore, we use the %s
format character instead of %f or %d as suggested in the patch's
comments. Note that we do /not/ sanity checkthe contents of the
rest argument (but we'll document this in the library reference
manual).
*this* set of patches is Ka-Ping's final sweep:
The attached patches update the standard library so that all modules
have docstrings beginning with one-line summaries.
A new docstring was added to formatter. The docstring for os.py
was updated to mention nt, os2, ce in addition to posix, dos, mac.