]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Fix mypy error on scalar call with tuple[Any, ...]
authorYurii Karabas <1998uriyyo@gmail.com>
Tue, 27 Jan 2026 01:54:01 +0000 (20:54 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 30 Jan 2026 18:53:22 +0000 (13:53 -0500)
commit026afdfc03a98b47948a0655ba2ca23862dd01a0
tree9434097e0c4c4fa3b801198b6427936c3a1b0944
parent21a7c49c9fd3b835d9004d2623b2633642551515
Fix mypy error on scalar call with tuple[Any, ...]

Fixed issue in new :pep:`646` support for result sets where an issue in the
mypy type checker prevented "scalar" methods including
:meth:`.Connection.scalar`, :meth:`.Result.scalar`,
:meth:`_orm.Session.scalar`, as well as async versions of these methods
from applying the correct type to the scalar result value, when the columns
in the originating :func:`_sql.select` were typed as ``Any``.  Pull request
courtesy Yurii Karabas.

Fixes: #13091
Closes: #13092
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/13092
Pull-request-sha: c0535dd7691c8b57d87fd5411cb0202866256fd6

Change-Id: Ifbebaf0bcfdda0dd293c3e278a639cd0c71d45cd
doc/build/changelog/unreleased_21/13091.rst [new file with mode: 0644]
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/engine/result.py
lib/sqlalchemy/ext/asyncio/engine.py
lib/sqlalchemy/ext/asyncio/scoping.py
lib/sqlalchemy/ext/asyncio/session.py
lib/sqlalchemy/orm/scoping.py
lib/sqlalchemy/orm/session.py
test/typing/plain_files/orm/session.py
test/typing/plain_files/sql/typed_results.py