]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Unify native and non-native valid values for ``Enum``
authorFederico Caselli <cfederico87@gmail.com>
Wed, 7 Apr 2021 20:02:10 +0000 (22:02 +0200)
committerFederico Caselli <cfederico87@gmail.com>
Sat, 10 Apr 2021 13:36:33 +0000 (15:36 +0200)
commit9fd4d188708ff4d5a11dde806acda6792b810703
tree930f9a883d833aae887d776bf4914e28dd395909
parent3770dbd0028c490f72325f1c13917b021c6f6dbb
Unify native and non-native valid values for ``Enum``

Unify behaviour :class:`_schema.Enum` in native and non-native
implementations regarding the accepted values for an enum with
aliased elements.
When :paramref:`_schema.Enum.omit_aliases` is ``False`` all values,
alias included, are accepted as valid values.
When :paramref:`_schema.Enum.omit_aliases` is ``True`` only non aliased values
are accepted as valid values.

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