]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
fix result.columns() method
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 21 Apr 2022 17:27:16 +0000 (13:27 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 21 Apr 2022 17:27:16 +0000 (13:27 -0400)
commitfe2045fb1c767436ed1e32359fe005dabead504a
tree9a51e5096d1299c74db0a871b9daf9cc54a3326f
parent6aefaaa110fc239571c043fad1c8a6a4e1de4368
fix result.columns() method

Fixed issue in :meth:`.Result.columns` method where calling upon
:meth:`.Result.columns` with a single index could in some cases,
particularly ORM result object cases, cause the :class:`.Result` to yield
scalar objects rather than :class:`.Row` objects, as though the
:meth:`.Result.scalars` method had been called. In SQLAlchemy 1.4, this
scenario emits a warning that the behavior will change in SQLAlchemy 2.0.

Fixes: #7953
Change-Id: I3c4ca3eecc2bfc85ad1c38000e5990d6dde80d22
doc/build/changelog/unreleased_14/7953.rst [new file with mode: 0644]
lib/sqlalchemy/engine/result.py
test/base/test_result.py