]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
error message for Lookup
authorRamonWill <ramonwilliams@hotmail.co.uk>
Wed, 12 Aug 2020 18:50:20 +0000 (14:50 -0400)
committerRamonWill <ramonwilliams@hotmail.co.uk>
Mon, 17 Aug 2020 00:38:23 +0000 (01:38 +0100)
commit438a19d0d0770485bc53b91d92e094d35f2058c1
tree32451909b5028a409b8d28de6a585a9e9f32b855
parent8c4b0c86e4a1be3d8d34d5031fb349b9c6ce6c4f
error message for Lookup

Th proposed change will provide the user with the target Enum Class name as well as up to four possible enum values when a LookupError is raised in the Enum Class.

A user requested that the enum name and possible values are included to the LookupError message to make debugging easier. The criteria included using ellipses for Enums containing more than four values and using ellipses for enum values that were greater than a certain number of characters (for this resolution the limit is 11 characters).

This pull request is:

- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [X ] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**
Fixes: #4733
Closes: #5490
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5490
Pull-request-sha: 55e76f2ae796b59b7de157cfaae5235dffa359cb

Change-Id: I4541f9efed1c05401587a413e9e748d46938bcd1
(cherry picked from commit a8bd2116764fb6039742a34409254175846bb700)
doc/build/changelog/unreleased_13/4733.rst [new file with mode: 0644]
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/util/langhelpers.py
test/sql/test_types.py