Skip to content

Commit 91d968c

Browse files
authored
SNOW-1526475: fix type hint for private_key (#1996)
1 parent 14dc119 commit 91d968c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

DESCRIPTION.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
1212
- Set default connection timeout of 10 seconds and socket read timeout of 10 minutes for HTTP calls in file transfer.
1313
- Optimized `to_pandas()` performance by fully parallel downloading logic.
1414
- Fixed a bug that specifying client_session_keep_alive_heartbeat_frequency in snowflake-sqlalchemy could crash the connector.
15+
- Fixed incorrect type hint of connection parameter `private_key`.
1516
- Added support for connectivity to multiple domains.
1617
- Bumped keyring dependency from g>=23.1.0,<25.0.0 to g>=23.1.0,<26.0.0
1718

src/snowflake/connector/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def _get_private_bytes_from_file(
183183
"backoff_policy": (DEFAULT_BACKOFF_POLICY, Callable),
184184
"passcode_in_password": (False, bool), # Snowflake MFA
185185
"passcode": (None, (type(None), str)), # Snowflake MFA
186-
"private_key": (None, (type(None), str, RSAPrivateKey)),
186+
"private_key": (None, (type(None), bytes, RSAPrivateKey)),
187187
"private_key_file": (None, (type(None), str)),
188188
"private_key_file_pwd": (None, (type(None), str, bytes)),
189189
"token": (None, (type(None), str)), # OAuth or JWT Token

0 commit comments

Comments
 (0)