summaryrefslogtreecommitdiff
path: root/sqlparse/compat.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-12-28 15:46:38 -0500
committerAndi Albrecht <albrecht.andi@gmail.com>2019-03-10 09:03:42 +0100
commitc9a490abf869eddf5b88de57c17d7a6c6c643ed8 (patch)
treeab03ed4e7fc2dc7ab8ec4207aef56062cfe2658d /sqlparse/compat.py
parent9aab1d2fc5c1ea9435bec404fa33b844996f2a4b (diff)
downloadsqlparse-c9a490abf869eddf5b88de57c17d7a6c6c643ed8.tar.gz
Remove unnecessary compat shim for bytes
Both Python 2.7 and Python 3 have the type bytes. On Python 2.7, it is an alias of str, same as was previously defined in compat.py. Makes the code slightly more compatible with Python 3 style syntax. Observe: $ python2 >>> bytes <type 'str'>
Diffstat (limited to 'sqlparse/compat.py')
-rw-r--r--sqlparse/compat.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/sqlparse/compat.py b/sqlparse/compat.py
index 4ca79a2..d2214be 100644
--- a/sqlparse/compat.py
+++ b/sqlparse/compat.py
@@ -27,7 +27,6 @@ if PY3:
def unicode_compatible(cls):
return cls
- bytes_type = bytes
text_type = str
string_types = (str,)
from io import StringIO
@@ -40,7 +39,6 @@ elif PY2:
cls.__str__ = lambda x: x.__unicode__().encode('utf-8')
return cls
- bytes_type = str
text_type = unicode
string_types = (str, unicode,)
from StringIO import StringIO