]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Include newlines in StatementError formatting
authorNate Clark <natec425@gmail.com>
Wed, 20 Feb 2019 17:58:18 +0000 (12:58 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 20 Feb 2019 23:56:47 +0000 (18:56 -0500)
commit8f318692d4443300c90c7be9dc44ae3c8707f818
tree3b935eedfd1c31ae4c69c4996f3bae5adec2bd71
parentd879bed8786b6387b470c148b412731456793653
Include newlines in StatementError formatting

Revised the formatting for :class:`.StatementError` when stringified. Each
error detail is broken up over multiple newlines instead of spaced out on a
single line.  Additionally, the SQL representation now stringifies the SQL
statement rather than using ``repr()``, so that newlines are rendered as is.
Pull request courtesy Nate Clark.

Fixes: #4500
Closes: #4501
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4501
Pull-request-sha: 60cc0ee68dc96b8f483a60d37bcb26b6c6d53efe

Change-Id: I79d8418b7495e5691c9a56f41e79495c26a967ff
doc/build/changelog/migration_13.rst
doc/build/changelog/unreleased_13/4500.rst [new file with mode: 0644]
lib/sqlalchemy/exc.py
lib/sqlalchemy/util/compat.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