From 8bef78debf8eb97d0651ad7b337d9cef4e839d87 Mon Sep 17 00:00:00 2001 From: Brandon Chinn Date: Wed, 8 Oct 2025 14:54:23 -0700 Subject: [PATCH] Fix type of SnowflakeCursorBase.__iter__ --- DESCRIPTION.md | 1 + src/snowflake/connector/cursor.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION.md b/DESCRIPTION.md index d463bca9e3..f51afdfe7e 100644 --- a/DESCRIPTION.md +++ b/DESCRIPTION.md @@ -15,6 +15,7 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne - Added an option to exclude `botocore` and `boto3` dependencies by setting `SNOWFLAKE_NO_BOTO` environment variable during installation - Revert changing exception type in case of token expired scenario for `Oauth` authenticator back to `DatabaseError` - Added support for pandas conversion for Day-time and Year-Month Interval types +* Fixed the return type of iterating over a cursor - v3.17.4(September 22,2025) - Added support for intermediate certificates as roots when they are stored in the trust store diff --git a/src/snowflake/connector/cursor.py b/src/snowflake/connector/cursor.py index c13ab242c7..c0f690e25f 100644 --- a/src/snowflake/connector/cursor.py +++ b/src/snowflake/connector/cursor.py @@ -1628,7 +1628,7 @@ def reset(self, closing: bool = False) -> None: if not self.connection._reuse_results: self._result_set = None - def __iter__(self) -> Iterator[dict] | Iterator[tuple]: + def __iter__(self) -> Iterator[FetchRow]: """Iteration over the result set.""" while True: _next = self.fetchone()