From c4be0b84a58ec9162c45fc57a6baa9e5fb7c966f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 25 Feb 2010 22:58:02 +0000 Subject: [PATCH] modify the py3k check to check for bytes --- lib/sqlalchemy/types.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py index a51e271f9d..d5f1d9f145 100644 --- a/lib/sqlalchemy/types.py +++ b/lib/sqlalchemy/types.py @@ -587,7 +587,11 @@ class String(Concatenable, TypeEngine): if dialect.supports_unicode_binds and self.convert_unicode != 'force': if self._warn_on_bytestring: def process(value): + # Py3K + #if isinstance(value, bytes): + # Py2K if isinstance(value, str): + # end Py2K util.warn("Unicode type received non-unicode bind " "param value %r" % value) return value -- 2.47.3