Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

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

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

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

Conversation

@olavloite

Copy link
Copy Markdown
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 teamDecember 5, 2024 17:10
@product-auto-labelproduct-auto-labelBot added the size: s Pull request size is small. label Dec 5, 2024
@product-auto-labelproduct-auto-labelBot 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 mainDec 5, 2024
@olavloite
olavloite deleted the allow-empty-array-params branch December 5, 2024 18:22
@release-pleaserelease-pleaseBot mentioned this pull request Dec 5, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spannerIssues related to the googleapis/python-spanner API.size: sPull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@olavloite@harshachinta@thiagotnunes