]> granicus.if.org Git - python/commitdiff
Fix duplicate import.
authorGeorg Brandl <georg@python.org>
Sat, 6 Feb 2010 22:44:17 +0000 (22:44 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 6 Feb 2010 22:44:17 +0000 (22:44 +0000)
Lib/urllib.py

index be77e1de647bc84e6d7d6e6ffd8c19220d236409..095123755770117c09eb5505425b71435e0b2c69 100644 (file)
@@ -28,7 +28,6 @@ import os
 import time
 import sys
 from urlparse import urljoin as basejoin
-import warnings
 
 __all__ = ["urlopen", "URLopener", "FancyURLopener", "urlretrieve",
            "urlcleanup", "quote", "quote_plus", "unquote", "unquote_plus",
@@ -72,8 +71,8 @@ _urlopener = None
 def urlopen(url, data=None, proxies=None):
     """Create a file-like object for the specified URL to read from."""
     from warnings import warnpy3k
-    warnings.warnpy3k("urllib.urlopen() has been removed in Python 3.0 in "
-                        "favor of urllib2.urlopen()", stacklevel=2)
+    warnpy3k("urllib.urlopen() has been removed in Python 3.0 in "
+             "favor of urllib2.urlopen()", stacklevel=2)
 
     global _urlopener
     if proxies is not None: