OLD | NEW |
(Empty) | |
| 1 from __future__ import absolute_import |
| 2 |
| 3 from future.standard_library import suspend_hooks |
| 4 from future.utils import PY3 |
| 5 |
| 6 if PY3: |
| 7 from urllib.request import * |
| 8 # This aren't in __all__: |
| 9 from urllib.request import (getproxies, |
| 10 pathname2url, |
| 11 proxy_bypass, |
| 12 quote, |
| 13 request_host, |
| 14 splitattr, |
| 15 splithost, |
| 16 splitpasswd, |
| 17 splitport, |
| 18 splitquery, |
| 19 splittag, |
| 20 splittype, |
| 21 splituser, |
| 22 splitvalue, |
| 23 thishost, |
| 24 to_bytes, |
| 25 unquote, |
| 26 unwrap, |
| 27 url2pathname, |
| 28 urlcleanup, |
| 29 urljoin, |
| 30 urlopen, |
| 31 urlparse, |
| 32 urlretrieve, |
| 33 urlsplit, |
| 34 urlunparse) |
| 35 else: |
| 36 __future_module__ = True |
| 37 with suspend_hooks(): |
| 38 from urllib import * |
| 39 from urllib2 import * |
| 40 from urlparse import * |
| 41 |
| 42 # Rename: |
| 43 from urllib import toBytes # missing from __all__ on Py2.6 |
| 44 to_bytes = toBytes |
| 45 |
| 46 # from urllib import (pathname2url, |
| 47 # url2pathname, |
| 48 # getproxies, |
| 49 # urlretrieve, |
| 50 # urlcleanup, |
| 51 # URLopener, |
| 52 # FancyURLopener, |
| 53 # proxy_bypass) |
| 54 |
| 55 # from urllib2 import ( |
| 56 # AbstractBasicAuthHandler, |
| 57 # AbstractDigestAuthHandler, |
| 58 # BaseHandler, |
| 59 # CacheFTPHandler, |
| 60 # FileHandler, |
| 61 # FTPHandler, |
| 62 # HTTPBasicAuthHandler, |
| 63 # HTTPCookieProcessor, |
| 64 # HTTPDefaultErrorHandler, |
| 65 # HTTPDigestAuthHandler, |
| 66 # HTTPErrorProcessor, |
| 67 # HTTPHandler, |
| 68 # HTTPPasswordMgr, |
| 69 # HTTPPasswordMgrWithDefaultRealm, |
| 70 # HTTPRedirectHandler, |
| 71 # HTTPSHandler, |
| 72 # URLError, |
| 73 # build_opener, |
| 74 # install_opener, |
| 75 # OpenerDirector, |
| 76 # ProxyBasicAuthHandler, |
| 77 # ProxyDigestAuthHandler, |
| 78 # ProxyHandler, |
| 79 # Request, |
| 80 # UnknownHandler, |
| 81 # urlopen, |
| 82 # ) |
| 83 |
| 84 # from urlparse import ( |
| 85 # urldefrag |
| 86 # urljoin, |
| 87 # urlparse, |
| 88 # urlunparse, |
| 89 # urlsplit, |
| 90 # urlunsplit, |
| 91 # parse_qs, |
| 92 # parse_q" |
| 93 # ) |
OLD | NEW |