]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
[typing] Fix type error when passing Mapped columns to values()
authorYossi <54272821+Apakottur@users.noreply.github.com>
Mon, 1 Dec 2025 17:06:12 +0000 (12:06 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 3 Dec 2025 03:37:57 +0000 (22:37 -0500)
commit40c2400af7d44a528358ea1d73c275a85bb75616
tree68f29e005d3861ce185fb60e5ac929299fcf7645
parentb9e3cacb0e7025a31458f09d0cb0c72da0c5f660
[typing] Fix type error when passing Mapped columns to values()

This adjusts the _DMLOnlyColumnArgument type to be a more
focused _OnlyColumnArgument type where we also add a more tightly
focused coercion, while still allowing ORM attributes to be used
as arguments.

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Closes: #13012
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/13012
Pull-request-sha: 5ebb402c686abf1090e5b83e3489dfca4908efdf

Change-Id: I8bbccaf556ec5ecb2f5cfdd2030bcfa4eb5ce125
lib/sqlalchemy/sql/_elements_constructors.py
lib/sqlalchemy/sql/_selectable_constructors.py
lib/sqlalchemy/sql/_typing.py
lib/sqlalchemy/sql/coercions.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/selectable.py
test/typing/plain_files/sql/dml.py