-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor SqlAlchemy Session.execute() to 2.0 style #32857
Refactor SqlAlchemy Session.execute() to 2.0 style #32857
Conversation
8591ba4
to
a4ac956
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you amend the commit and force-push to fix the typo in the commit message?
a4ac956
to
87900de
Compare
@uranusjr , thanks for noticing. Fixed |
Hi @uranusjr ! |
Looks good. Moving to draft to prevent accidental merge before we get 2.7 out. |
9fecee2
to
bafd41d
Compare
fa7ec6e
to
20f502c
Compare
98fef37
to
3910890
Compare
…lain text SQL queries
3910890
to
6c4010d
Compare
2.7.0 is now out! |
@uranusjr , thanks for the good news! Can we merge it then? |
@jedcunningham , @potiuk , hi, |
Refactored
Session.execute()
calls to SqlAlchemy 2.0 style by wrapping plain text SQL queries withtext()
function.It eliminates the warning message:
Using plain strings to indicate SQL statements without using the text() construct is deprecated and will be removed in version 2.0. Ensure plain SQL statements are passed using the text() construct. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
SqlAlchemy documentation: https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#execute-method-more-strict-execution-options-are-more-prominent
Related issue: #28723