~pythonregexp2.7/python/issue2636-01+09-01-01

« back to all changes in this revision

Viewing changes to Lib/urllib.py

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-09-22 00:02:12 UTC
  • mfrom: (39022.1.34 Regexp-2.7)
  • Revision ID: darklord@timehorse.com-20080922000212-7r0q4f4ugiq57jph
Merged in changes from the Atomic Grouping / Possessive Qualifiers branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
import time
29
29
import sys
30
30
from urlparse import urljoin as basejoin
 
31
import warnings
31
32
 
32
33
__all__ = ["urlopen", "URLopener", "FancyURLopener", "urlretrieve",
33
34
           "urlcleanup", "quote", "quote_plus", "unquote", "unquote_plus",
69
70
# Shortcut for basic usage
70
71
_urlopener = None
71
72
def urlopen(url, data=None, proxies=None):
72
 
    """urlopen(url [, data]) -> open file-like object"""
 
73
    """Create a file-like object for the specified URL to read from."""
 
74
    from warnings import warnpy3k
 
75
    warnings.warnpy3k("urllib.urlopen() has been removed in Python 3.0 in "
 
76
                        "favor of urllib2.urlopen()", stacklevel=2)
 
77
 
73
78
    global _urlopener
74
79
    if proxies is not None:
75
80
        opener = FancyURLopener(proxies=proxies)