From: Mike Bayer Date: Thu, 25 Feb 2010 22:58:02 +0000 (+0000) Subject: modify the py3k check to check for bytes X-Git-Tag: rel_0_6beta2~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4be0b84a58ec9162c45fc57a6baa9e5fb7c966f;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git modify the py3k check to check for bytes --- 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