Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Raise error if obtaining iterator of closed Cursor
  • Loading branch information
plamut committed Apr 16, 2021
commit f3db4e2b5cf8ae8c404b495018cf000675f04cd2
2 changes: 1 addition & 1 deletion google/cloud/bigquery/dbapi/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def decorate_public_methods(klass):
"""Apply ``_raise_on_closed()`` decorator to public instance methods.
"""
for name in dir(klass):
if name.startswith("_"):
if name.startswith("_") and name != "__iter__":
continue

member = getattr(klass, name)
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_dbapi_cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def test_raises_error_if_closed(self):
"fetchone",
"setinputsizes",
"setoutputsize",
"__iter__",
)

for method in method_names:
Expand Down