diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-10-25 12:07:38 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-10-25 12:07:38 -0400 |
commit | 7c6bde1c15c97cae34ef9449aa595168910fe87d (patch) | |
tree | a8f68e9107ded8b907f136bfd03f679aa0b93678 /lib | |
parent | dfb94ca7512136e277ff6e2c969154f3467f592d (diff) | |
download | sqlalchemy-7c6bde1c15c97cae34ef9449aa595168910fe87d.tar.gz |
The long-deprecated and non-functional ``assert_unicode`` flag on
:func:`.create_engine` as well as :class:`.String` is removed.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sqlalchemy/engine/__init__.py | 6 | ||||
-rw-r--r-- | lib/sqlalchemy/engine/default.py | 12 | ||||
-rw-r--r-- | lib/sqlalchemy/types.py | 18 |
3 files changed, 2 insertions, 34 deletions
diff --git a/lib/sqlalchemy/engine/__init__.py b/lib/sqlalchemy/engine/__init__.py index eb9ef266b..3deb437bb 100644 --- a/lib/sqlalchemy/engine/__init__.py +++ b/lib/sqlalchemy/engine/__init__.py @@ -126,12 +126,6 @@ def create_engine(*args, **kwargs): :ref:`connections_toplevel` - :param assert_unicode: Deprecated. This flag - sets an engine-wide default value for - the ``assert_unicode`` flag on the - :class:`.String` type - see that - type for further details. - :param case_sensitive=True: if False, result column names will match in a case-insensitive fashion, that is, ``row['SomeColumn']``. diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index f43c0404e..1be7bc029 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -99,7 +99,7 @@ class DefaultDialect(interfaces.Dialect): reflection_options = () - def __init__(self, convert_unicode=False, assert_unicode=False, + def __init__(self, convert_unicode=False, encoding='utf-8', paramstyle=None, dbapi=None, implicit_returning=None, case_sensitive=True, @@ -111,16 +111,6 @@ class DefaultDialect(interfaces.Dialect): self.name) self.convert_unicode = convert_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 diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py index e31cecfe2..579bd354d 100644 --- a/lib/sqlalchemy/types.py +++ b/lib/sqlalchemy/types.py @@ -982,7 +982,7 @@ class String(Concatenable, TypeEngine): def __init__(self, length=None, collation=None, convert_unicode=False, - assert_unicode=None, unicode_error=None, + unicode_error=None, _warn_on_bytestring=False ): """ @@ -1035,13 +1035,6 @@ class String(Concatenable, TypeEngine): cause SQLAlchemy's encode/decode services to be used unconditionally. - :param assert_unicode: Deprecated. A warning is emitted - when a non-``unicode`` object is passed to the - :class:`.Unicode` subtype of :class:`.String`, - or the :class:`.UnicodeText` subtype of :class:`.Text`. - See :class:`.Unicode` for information on how to - control this warning. - :param unicode_error: Optional, a method to use to handle Unicode conversion errors. Behaves like the ``errors`` keyword argument to the standard library's ``string.decode()`` functions. This flag @@ -1058,15 +1051,6 @@ class String(Concatenable, TypeEngine): raise exc.ArgumentError("convert_unicode must be 'force' " "when unicode_error is set.") - 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.length = length self.collation = collation self.convert_unicode = convert_unicode |