Skip to content
Myr

fix chardet import

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent f553857 · Browse files · 2 files+5 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+5 added−6 removed

  • other:+5 added−6 removed

2 files+5 added−6 removed

modified:requests/packages/chardet/test.py-1 removed
1from __future__ import print_function1import sys, glob2sys.path.insert(0, '..')3from chardet.universaldetector import UniversalDetector4
16 unmodified lines
modified:requests/compat.py+5 added-5 removed
79 unmodified lines
80# ---------81# Specifics82# ---------8384try:85 import cchardet as chardet86except ImportError:87 from .packages import chardet888990if is_py2:91 from urllib import quote, unquote, quote_plus, unquote_plus, urlencode92 from urlparse import urlparse, urlunparse, urljoin, urlsplit, urldefrag93 from urllib2 import parse_http_list94 import cookielib95 from Cookie import Morsel96 from StringIO import StringIO92 try:93 import cchardet as chardet94 except ImportError:95 from .packages import chardet97 from .packages.urllib3.packages.ordered_dict import OrderedDict9899 builtin_str = str100 bytes = str
8 unmodified lines
109 from urllib.request import parse_http_list110 from http import cookiejar as cookielib111 from http.cookies import Morsel112 from io import StringIO112 from .packages import chardet2 as chardet113 from collections import OrderedDict114115 builtin_str = str116 str = str
3 unmodified lines