Skip to content
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

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

Merged
merged 1 commit into from
Dec 5, 2024

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 review from a team as code owners 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
14 of 16 checks passed
@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