| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
x in string.whitespace => x.isspace()
type(x) in types.StringTypes => isinstance(x, basestring)
isinstance(x, types.StringTypes) => isinstance(x, basestring)
type(x) is types.StringType => isinstance(x, str)
type(x) == types.StringType => isinstance(x, str)
string.split(x, ...) => x.split(...)
string.join(x, y) => y.join(x)
string.zfill(x, ...) => x.zfill(...)
string.count(x, ...) => x.count(...)
hasattr(types, "UnicodeType") => try: unicode except NameError:
type(x) != types.TupleTuple => not isinstance(x, tuple)
isinstance(x, types.TupleType) => isinstance(x, tuple)
type(x) is types.IntType => isinstance(x, int)
Do not mention the string module in the rlcompleter docstring.
This partially applies SF patch http://www.python.org/sf/562373
(with basestring instead of string). (It excludes the changes to
unittest.py and does not change the os.stat stuff.)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
When os.stat() for a file raises OSError, turn it into IOError per
documentation.
Bugfix candidate.
|
|
|
|
|
|
| |
This change is similar to the supplied patch, but does not save the opener
when a proxy configuration is specified.
This closes SF patch #523415.
|
|
|
|
|
|
| |
that it works.
Bugfix candidate (this and the previous checkin, obviously).
|
|
|
|
|
|
|
| |
I really can't test this, but from reading the discussion in that bug
report, it's likely that this works. It may also close a whole bunch
of other bug reports related to urllib and proxies on Windows, but who
knows.
|
| |
|
|
|
|
| |
and remove the unneccessary "import stat" statement.
|
|
|
|
| |
exists.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
open_http():
In urllib.py library module, URLopener.open_https()
returns a class instance of addinfourl() with its
self.url property missing the protocol.
Instead of "https://www.someurl.com", it becomes
"://www.someurl.com".
|
|
|
|
| |
reported by Neal Norwitz.
|
|
|
|
|
|
|
|
| |
Modify rfc822.formatdate() to always generate English names,
regardless of locale. This is required by RFC 1123.
In open_local_file() of urllib and urllib2, use new formatdate() from
rfc822.
|
|
|
|
| |
ftp urls.
|
| |
|
| |
|
|
|
|
| |
Look specific to Windows. Don't know whether it works.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For local files urllib.py doesn't return the MIME
headers that the documentation says it does:
http://www.python.org/doc/current/lib/module-
urllib.html#l2h-2187 states that "When the method is
local-file, returned headers will include a Date
representing the file's last-modified time, a Content-
Length giving file size, and a Content-Type containing
a guess at the file's type"
But in Python 2.1 the only header that gets returned
is the Content-Type:
>>> import urllib
>>> f = urllib.urlopen("gurk.txt")
>>> f.info().headers
['Content-Type: text/plain\n']
|
|
|
|
| |
This closes SF patch #419459.
|
|
|
|
| |
Reported by Juan M. Bello Rivas.
|
|
|
|
|
|
|
|
| |
Even though relative redirects are illegal, they are common
urllib treated every relative redirect as though it was to http,
even if the original was https://
As long as we're compensating for server bugs, might as well do
it properly.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
giving it a slight facelift
|
| |
|
|
|
|
| |
an invalid 401 request is being handled.
|
|
|
|
|
|
| |
number of entries into http_error_302 exceeds the value set for the maxtries
attribute (which defaults to 10), the recursion is exited by calling
the http_error_500 method (or if that is not defined, http_error_default).
|
| |
|
|
|
|
| |
case, the order of parameters in the output matches the order of the inputs.
|
|
|
|
| |
parameters. This closes the code part of patch 103314.
|
|
|
|
|
|
|
| |
when quoting forbidden characters. There are scripts out there that
break with lower case, therefore I guess %%%X should be used."
I agree, so am fixing this.
|
|
|
|
|
|
|
| |
dogfort).
- Don't drop the data argument when calling open_https() from the
authentication error handler.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
obsolete!).
Fix a bug in ftpwrapper.retrfile() where somehow ftplib.error_perm was
assumed to be a string. (The fix applies str().)
Also break some long lines and change the output from test() slightly.
|
|
|
|
| |
protocols. Closes bug #119822.
|
|
|
|
|
|
|
|
|
|
| |
invalid proxy setting.
Minor change to call of unknown_url; always pass data argument
explicitly since data defaults to None.
PEP 42: Add as a feature that urllib handle proxy setting that contain
only the host and port of the proxy.
|
|
|
|
|
|
|
| |
The earlier code assumed "protocol=host;protocol=host;..." or "host",
but Windows may also use "protocol=host" (just one entry), as well as
"protocol://host". This code needs some more work, so I'll leave the
bug open for now.
|
|
|
|
|
|
|
|
|
|
| |
character according to RFC 2396. Add some text to quote doc string
that explains the quoting rules better.
This closes SF Bug #114427.
Add _fast_quote operation that uses a dictionary instead of a list
when the standard set of safe characters is used.
|
|
|
|
|
|
| |
applies patch #101369 by Moshe Zadke
use explicit list of always safe characters instead of string.letters
add test case
|
|
|
|
| |
Don't people *test* their changes?
|
|
|
|
|
|
|
|
|
|
| |
so that a subclass can override it.
This partly addresses Bug #112634 -- but the documentation is still
wrong, since it suggests that you can set self.version *after* calling
the base class __init__. In fact it must be done *before*.
I'll fix that too.
|
|
|
|
| |
Make it easier to use HTTP POST with urlretrieve().
|
|
|
|
| |
* fixed type in doc string for quote
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch description
-----------------
This addresses four issues:
(1) usernames and passwords in urls with special characters are now
decoded properly. i.e. http://foo%2C:bar@www.whatever.com/
(2) Basic Auth support has been added to HTTPS, like it was in HTTP.
(3) Version 1.92 sent the POSTed data, but did not deal with errors
(HTTP responses other than 200) properly. HTTPS now behaves the
same way HTTP does.
(4) made URL-checking beahve the same way with HTTPS as it does with
HTTP (changed == to !=).
|
|
|
|
| |
Note that this patch looks worse than it is - an existing function (getproxies() for all platforms other than Win/Mac) has been moved, renamed and indentation changed, but the body of that function is identical. Windows now allows the environment variables to override the registry.
|