summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util/compat.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-02-21 20:52:43 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2016-02-21 20:52:43 -0500
commit01809bddff5b6e93010eb139aed54526c6e6c058 (patch)
treee8a31670e7dffdce04802de112edc2f7ea563e1c /lib/sqlalchemy/util/compat.py
parent6713817e1186cd1e36c9aea9d89a30bc299ffe27 (diff)
downloadsqlalchemy-01809bddff5b6e93010eb139aed54526c6e6c058.tar.gz
- Fixed bug in "to_list" conversion where a single bytes object
would be turned into a list of individual characters. This would impact among other things using the :meth:`.Query.get` method on a primary key that's a bytes object. fixes #3660
Diffstat (limited to 'lib/sqlalchemy/util/compat.py')
-rw-r--r--lib/sqlalchemy/util/compat.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/util/compat.py b/lib/sqlalchemy/util/compat.py
index 99b5177b5..ee4a20f9b 100644
--- a/lib/sqlalchemy/util/compat.py
+++ b/lib/sqlalchemy/util/compat.py
@@ -62,6 +62,7 @@ if py3k:
)
string_types = str,
+ binary_types = bytes,
binary_type = bytes
text_type = str
int_types = int,
@@ -115,6 +116,7 @@ else:
from cStringIO import StringIO as byte_buffer
string_types = basestring,
+ binary_types = bytes,
binary_type = str
text_type = unicode
int_types = int, long