8000 fix: dbapi raised AttributeError with [] as arguments by olavloite · Pull Request #1257 · googleapis/python-spanner · GitHub
[go: up one dir, main page]

Skip to content

fix: dbapi raised AttributeError with [] as arguments#1257

Merged
olavloite merged 1 commit intomainfrom
allow-empty-array-params
Dec 5, 2024
Merged

fix: dbapi raised AttributeError with [] as arguments#1257
olavloite merged 1 commit intomainfrom
allow-empty-array-params

Conversation

@olavloite
Copy link
Contributor

If the cursor.execute(sql, args) function was called with an empty array instead of None, it would raise an AttributeError like this:

AttributeError: 'list' object has no attribute 'items'

This is for example automatically done by SQLAlchemy when executing a raw statement on a dbapi connection.

If the cursor.execute(sql, args) function was called with an empty array
instead of None, it would raise an AttributeError like this:

AttributeError: 'list' object has no attribute 'items'

This is for example automatically done by SQLAlchemy when executing a
raw statement on a dbapi connection.
@olavloite olavloite requested a review from a team as a code owner December 5, 2024 17:10
@olavloite olavloite requested a review from a team December 5, 2024 17:10
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Dec 5, 2024
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner API. label Dec 5, 2024
@olavloite olavloite enabled auto-merge (squash) December 5, 2024 18:11
@olavloite olavloite merged commit 758bf48 into main Dec 5, 2024
@olavloite olavloite deleted the allow-empty-array-params branch December 5, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the googleapis/python-spanner API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0