mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Moved fix for #747 to compat module
This commit is contained in:
@@ -91,6 +91,7 @@ if is_py2:
|
||||
from StringIO import StringIO
|
||||
from .packages import chardet
|
||||
|
||||
builtin_str = str
|
||||
bytes = str
|
||||
str = unicode
|
||||
basestring = basestring
|
||||
@@ -105,6 +106,7 @@ elif is_py3:
|
||||
from io import StringIO
|
||||
from .packages import chardet2 as chardet
|
||||
|
||||
builtin_str = str
|
||||
str = str
|
||||
bytes = bytes
|
||||
basestring = (str,bytes)
|
||||
|
||||
+1
-3
@@ -32,9 +32,7 @@ from .utils import (
|
||||
DEFAULT_CA_BUNDLE_PATH)
|
||||
from .compat import (
|
||||
cookielib, urlparse, urlunparse, urljoin, urlsplit, urlencode, str, bytes,
|
||||
StringIO, is_py2, chardet, json)
|
||||
|
||||
from __builtin__ import str as builtin_str
|
||||
StringIO, is_py2, chardet, json, builtin_str)
|
||||
|
||||
REDIRECT_STATI = (codes.moved, codes.found, codes.other, codes.temporary_moved)
|
||||
CONTENT_CHUNK_SIZE = 10 * 1024
|
||||
|
||||
Reference in New Issue
Block a user