]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Change StatementError formatting (newlines and %s)
authorNate Clark <natec425@gmail.com>
Sun, 17 Feb 2019 01:17:56 +0000 (19:17 -0600)
committerNate Clark <natec425@gmail.com>
Sun, 17 Feb 2019 01:17:56 +0000 (19:17 -0600)
commit1bbcec147f0d692cd4022cecaef93d3c3231b034
tree6646d88d9ad01565d5d065d6c2523e111da97b95
parent4d7ac4be6c2f548b2e54d015003028bd9d10c805
Change StatementError formatting (newlines and %s)

This changes the error formatting for StatementError in two ways:

1) Break each error detail up over multiple newlines instead of
   spaced out on a single line. Hopefully, this helps readers scan
   the error message more easily.

2) Change the SQL representation in the message to use __str__ (%s)
   instead of the current behavior that uses __repr__ (%r). This
   should help readers recognize the structure of their SQL,
   particularly if it is a multiline SQL statement. In the multiline
   case, the SQL would be printed over multiple lines instead of
   printing an escaped "\n".
lib/sqlalchemy/exc.py
test/base/test_except.py
test/engine/test_deprecations.py
test/engine/test_execute.py
test/engine/test_logging.py
test/orm/test_session.py
test/sql/test_insert_exec.py