From a782160de2e66ad6f6cb2630ddc16ced4da1c359 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 21 Mar 2021 17:10:18 -0400 Subject: Add support for Boolean, Enum Fixed bug in Mypy plugin where the Python type detection for the :class:`_sqltypes.Boolean` column type would produce an exception; additionally implemented support for :class:`_sqltypes.Enum`, including detection of a string-based enum vs. use of Python ``enum.Enum``. Fixes: #6109 Change-Id: I25e546ea2f50d90be2d6fec303976d82849a3d31 --- lib/sqlalchemy/sql/sqltypes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py index 816423d1b..a73c61147 100644 --- a/lib/sqlalchemy/sql/sqltypes.py +++ b/lib/sqlalchemy/sql/sqltypes.py @@ -1324,15 +1324,15 @@ class Enum(Emulated, String, SchemaType): by that backend. :param \*enums: either exactly one PEP-435 compliant enumerated type - or one or more string or unicode enumeration labels. If unicode - labels are present, the `convert_unicode` flag is auto-enabled. + or one or more string labels. .. versionadded:: 1.1 a PEP-435 style enumerated class may be passed. :param convert_unicode: Enable unicode-aware bind parameter and - result-set processing for this Enum's data. This is set - automatically based on the presence of unicode label strings. + result-set processing for this Enum's data under Python 2 only. + Under Python 2, this is set automatically based on the presence of + unicode label strings. This flag will be removed in SQLAlchemy 2.0. :param create_constraint: defaults to False. When creating a non-native enumerated type, also build a CHECK constraint on the -- cgit v1.2.1