diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-02-25 22:00:58 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-02-25 22:00:58 +0000 |
commit | 756370e0b43a20ae30ed03cb30762756c97fb258 (patch) | |
tree | b7a77d9c63db47d55d27dbebe3df7f45c38c0126 /lib/sqlalchemy/engine/default.py | |
parent | 8056006f067f98cffcbdc274a1c7921f00a67ab9 (diff) | |
download | sqlalchemy-756370e0b43a20ae30ed03cb30762756c97fb258.tar.gz |
- The assert_unicode flag is deprecated. SQLAlchemy will raise
a warning in all cases where it is asked to encode a non-unicode
Python string, and will do nothing for DBAPIs that already
accept Python unicode objects.
Diffstat (limited to 'lib/sqlalchemy/engine/default.py')
-rw-r--r-- | lib/sqlalchemy/engine/default.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index 44c968942..5499b34e7 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -78,7 +78,14 @@ class DefaultDialect(base.Dialect): "The %s dialect is not yet ported to SQLAlchemy 0.6" % self.name) self.convert_unicode = convert_unicode - self.assert_unicode = assert_unicode + if assert_unicode: + util.warn_deprecated("assert_unicode is deprecated. " + "SQLAlchemy emits a warning in all cases where it " + "would otherwise like to encode a Python unicode object " + "into a specific encoding but a plain bytestring is received. " + "This does *not* apply to DBAPIs that coerce Unicode natively." + ) + self.encoding = encoding self.positional = False self._ischema = None |