]>
Commit | Line | Data |
---|---|---|
77f90330 | 1 | """Deprecated - New code should avoid these""" |
2 | ||
3 | import base64 | |
4 | import getpass | |
5 | import html | |
6 | import html.parser | |
7 | import http | |
8 | import http.client | |
9 | import http.cookiejar | |
10 | import http.cookies | |
11 | import http.server | |
12 | import itertools | |
13 | import os | |
14 | import shutil | |
15 | import struct | |
16 | import tokenize | |
17 | import urllib | |
18 | ||
19 | compat_b64decode = base64.b64decode | |
20 | compat_chr = chr | |
21 | compat_cookiejar = http.cookiejar | |
22 | compat_cookiejar_Cookie = http.cookiejar.Cookie | |
23 | compat_cookies_SimpleCookie = http.cookies.SimpleCookie | |
24 | compat_get_terminal_size = shutil.get_terminal_size | |
25 | compat_getenv = os.getenv | |
26 | compat_getpass = getpass.getpass | |
27 | compat_html_entities = html.entities | |
28 | compat_html_entities_html5 = html.entities.html5 | |
29 | compat_HTMLParser = html.parser.HTMLParser | |
30 | compat_http_client = http.client | |
31 | compat_http_server = http.server | |
32 | compat_HTTPError = urllib.error.HTTPError | |
33 | compat_itertools_count = itertools.count | |
34 | compat_parse_qs = urllib.parse.parse_qs | |
35 | compat_str = str | |
36 | compat_struct_pack = struct.pack | |
37 | compat_struct_unpack = struct.unpack | |
38 | compat_tokenize_tokenize = tokenize.tokenize | |
39 | compat_urllib_error = urllib.error | |
40 | compat_urllib_parse_unquote = urllib.parse.unquote | |
41 | compat_urllib_parse_unquote_plus = urllib.parse.unquote_plus | |
42 | compat_urllib_parse_urlencode = urllib.parse.urlencode | |
43 | compat_urllib_parse_urlparse = urllib.parse.urlparse | |
44 | compat_urllib_request = urllib.request | |
45 | compat_urlparse = compat_urllib_parse = urllib.parse | |
46 | ||
1d485a1a | 47 | |
48 | def compat_setenv(key, value, env=os.environ): | |
49 | env[key] = value | |
50 | ||
51 | ||
77f90330 | 52 | __all__ = [x for x in globals() if x.startswith('compat_')] |