]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
honor enum length in all cases
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 10 Jun 2022 16:42:54 +0000 (12:42 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 10 Jun 2022 17:21:26 +0000 (13:21 -0400)
commit4274981156a554fb4b8340d2fa4d8c4afed7c86c
tree5c20a6f9102f2a75e6d5c799e0ec9ec3ba9e784c
parentb171f5d2e488c46a664847644e65d5dc03759840
honor enum length in all cases

The :paramref:`.Enum.length` parameter, which sets the length of the
``VARCHAR`` column for non-native enumeration types, is now used
unconditionally when emitting DDL for the ``VARCHAR`` datatype, including
when the :paramref:`.Enum.native_enum` parameter is set to ``True`` for
target backends that continue to use ``VARCHAR``. Previously the parameter
would be erroneously ignored in this case. The warning previously emitted
for this case is now removed.

Fixes: #7791
Change-Id: I91764546b56e9416479949be8a118cdc91ac5ed9
doc/build/changelog/unreleased_20/7791.rst [new file with mode: 0644]
lib/sqlalchemy/sql/sqltypes.py
test/sql/test_types.py