diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2008-06-18 20:49:58 +0000 |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2008-06-18 20:49:58 +0000 |
commit | 1afc1696167547a5fa101c53e5a3ab4717f8852c (patch) | |
tree | e989e72e71530d892214562785df7e11f84c1111 /Lib/mimetypes.py | |
parent | a656d2cd8984f1ecb5a7e2cd09a18f72452f2b78 (diff) | |
download | cpython-1afc1696167547a5fa101c53e5a3ab4717f8852c.tar.gz cpython-1afc1696167547a5fa101c53e5a3ab4717f8852c.zip |
Make a new urllib package .
It consists of code from urllib, urllib2, urlparse, and robotparser.
The old modules have all been removed. The new package has five
submodules: urllib.parse, urllib.request, urllib.response,
urllib.error, and urllib.robotparser. The urllib.request.urlopen()
function uses the url opener from urllib2.
Note that the unittests have not been renamed for the
beta, but they will be renamed in the future.
Joint work with Senthil Kumaran.
Diffstat (limited to 'Lib/mimetypes.py')
-rw-r--r-- | Lib/mimetypes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index 6c36a9c1d2f..5812c0c573b 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -24,7 +24,7 @@ read_mime_types(file) -- parse one file, return a dictionary or None import os import posixpath -import urllib +import urllib.parse __all__ = [ "guess_type","guess_extension","guess_all_extensions", @@ -104,7 +104,7 @@ class MimeTypes: Optional `strict' argument when False adds a bunch of commonly found, but non-standard types. """ - scheme, url = urllib.splittype(url) + scheme, url = urllib.parse.splittype(url) if scheme == 'data': # syntax of data URLs: # dataurl := "data:" [ mediatype ] [ ";base64" ] "," data |