diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-12-28 09:50:57 -0500 |
---|---|---|
committer | Jon Dufresne <jon.dufresne@gmail.com> | 2018-12-28 09:50:57 -0500 |
commit | a87bd688d163308cc1af381f59fdbb4f4a818ce5 (patch) | |
tree | 71e9afd2e21f261804e084aab1284a22b36e3606 | |
parent | 4ae98e7de18f16fb669b74ee09245ff4de3da0b4 (diff) | |
download | redis-py-a87bd688d163308cc1af381f59fdbb4f4a818ce5.tar.gz |
Remove unnecessary compat shim for 'bytes'
Both Python 2.7 & Python 3 have the types bytes. On Python 2.7, it is an
alias for the type str, same as what was previously defined in
_compat.py.
-rw-r--r-- | redis/_compat.py | 2 | ||||
-rwxr-xr-x | redis/client.py | 2 | ||||
-rwxr-xr-x | redis/connection.py | 2 |
3 files changed, 2 insertions, 4 deletions
diff --git a/redis/_compat.py b/redis/_compat.py index 80973b3..c9213a6 100644 --- a/redis/_compat.py +++ b/redis/_compat.py @@ -112,7 +112,6 @@ if sys.version_info[0] < 3: xrange = xrange basestring = basestring unicode = unicode - bytes = str long = long else: from urllib.parse import parse_qs, unquote, urlparse @@ -142,7 +141,6 @@ else: basestring = str unicode = str safe_unicode = str - bytes = bytes long = int try: # Python 3 diff --git a/redis/client.py b/redis/client.py index 3411486..2645e83 100755 --- a/redis/client.py +++ b/redis/client.py @@ -7,7 +7,7 @@ import time import threading import time as mod_time import hashlib -from redis._compat import (basestring, bytes, imap, iteritems, iterkeys, +from redis._compat import (basestring, imap, iteritems, iterkeys, itervalues, izip, long, nativestr, safe_unicode) from redis.connection import (ConnectionPool, UnixDomainSocketConnection, SSLConnection, Token) diff --git a/redis/connection.py b/redis/connection.py index 9b949c5..ea06241 100755 --- a/redis/connection.py +++ b/redis/connection.py @@ -14,7 +14,7 @@ try: except ImportError: ssl_available = False -from redis._compat import (xrange, imap, byte_to_chr, unicode, bytes, long, +from redis._compat import (xrange, imap, byte_to_chr, unicode, long, nativestr, basestring, iteritems, LifoQueue, Empty, Full, urlparse, parse_qs, recv, recv_into, select, unquote) |