Repository navigation
Conversation
Fixes sqlalchemy#12730 Updated _ForUpdateOfArgument type alias to accept sequences of both column expressions and FROM clause arguments (tables, ORM entities). Previously only sequences of column expressions were supported, causing type checker errors when passing tuples of DeclarativeBase classes to with_for_update(of=...).
zzzeek
left a comment
There was a problem hiding this comment.
hi -
this would benefit from a typing test in test/typing/plain_files/sql/common_sql_element.py, the original user case in the issue can be mostly copied in to make sure it raises no errors
sqla-tester
left a comment
There was a problem hiding this comment.
OK, this is sqla-tester setting up my work on behalf of zzzeek to try to get revision 41a38bf of this pull request into gerrit so we can run tests and reviews and stuff
|
New Gerrit review created for change 41a38bf: https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/6438 |
|
Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/6438 has been merged. Congratulations! :) |
|
Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/6439 has been merged. Congratulations! :) |
Fixed typing issue where :meth:`.Select.with_for_update` would not support lists of ORM entities in the :paramref:`.Select.with_for_update.of` parameter. Pull request courtesy Shamil. Fixes: #12730 Closes: #12988 Pull-request: #12988 Pull-request-sha: 41a38bf Change-Id: I61d60a4f4d2b16037da8d5f30e33f5d74fa47374 (cherry picked from commit a057c47)
sqla-tester
left a comment
There was a problem hiding this comment.
Federico Caselli (CaselIT) wrote:
code review left on gerrit
View this in Gerrit at https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/6438
- doc/build/changelog/unreleased_20/12730.rst (line 5): we do changelogs for typing changes now?
Fixes #12730
Description
Updated _ForUpdateOfArgument type alias to accept sequences of both column expressions and FROM clause arguments (tables, ORM entities). Previously only sequences of column expressions were supported, causing type checker errors when passing tuples of DeclarativeBase classes to with_for_update(of=...).
Checklist
This pull request is:
must include a complete example of the issue. one line code fixes without an
issue and demonstration will not be accepted.
Fixes: #<issue number>in the commit messageinclude a complete example of how the feature would look.
Fixes: #<issue number>in the commit messageHave a nice day!