snowflake-connector-python 4.3.0
Snowflake Connector for Python
License: Apache-2.0
Requires Python: >=3.9
Keywords: Snowflake db database cloud analytics warehouse

This package includes the Snowflake Connector for Python, which conforms to the Python DB API 2.0 specification:
https://www.python.org/dev/peps/pep-0249/

Snowflake Documentation is available at:
https://docs.snowflake.com/

Source code is also available at: https://github.com/snowflakedb/snowflake-connector-python

# Release Notes
- v4.3.0(February 12,2026)
  - Ensured proper list conversion - the converter runs to_snowflake on all list elements.
  - Made the parameter `server_session_keep_alive` in `SnowflakeConnection` skip checking for pending async queries, providing faster connection close times especially when many async queries are executed.
  - Fix string representation of INTERVAL YEAR and INTERVAL MONTH types.
  - Log a warning when using http protocol for OAuth urls.
  - Deprecated support for custom revocation error classes in OCSP response cache deserialization. By default, only `RevocationCheckError` exceptions are deserialized from OCSP cache. Custom exception classes can be temporarily enabled by setting the `SNOWFLAKE_ENABLE_CUSTOM_REVOCATION_ERRORS` environment variable to `true` or `1`, but this support will be removed in a future release.
  - Bumped up vendored `urllib3` to `2.6.3`
  - Added `force_microseconds_precision` to `cursor.fetch_arrow_all` and `cursor.fetch_pandas_all` to avoid PyArrow schema incosistency between batches.

- v4.2.0(January 07,2026)
  - Added `SnowflakeCursor.stats` property to expose granular DML statistics (rows inserted, deleted, updated, and duplicates) for operations like CTAS where `rowcount` is insufficient.
  - Added support for injecting SPCS service identifier token (`SPCS_TOKEN`) into login requests when present in SPCS containers.
  - Introduced shared library([source code](https://github.com/snowflakedb/universal-driver/tree/main/sf_mini_core)) for extended telemetry to identify and prepare testing platform for native rust extensions.
  - Added `private_key_passphrase` connection parameter for key pair authentication with encrypted private keys.

- v4.1.1(December 12,2025)
  - Relaxed pandas dependency requirements for Python below 3.12.
  - Changed CRL cache cleanup background task to daemon to avoid blocking main thread.
  - Fixed NO_PROXY issues with PUT operations

- v4.1.0(November 18,2025)
  - Added the `SNOWFLAKE_AUTH_FORCE_SERVER` environment variable to force the use of the local-listening server when using the `externalbrowser` auth method.
    - This allows headless environments (like Docker or Airflow) running locally to auth via a browser URL.
  - Fix compilation error when building from sources with libc++.
  - Pin lower versions of dependencies to oldest version without vulnerabilities.
  - Added no_proxy parameter for proxy configuration without using environmental variables.
  - Added OAUTH_AUTHORIZATION_CODE and OAUTH_CLIENT_CREDENTIALS to list of authenticators that don't require user to be set
  - Added `oauth_socket_uri` connection parameter allowing to separate server and redirect URIs for local OAuth server.
  - Made platform_detection logs silent and improved its timeout handling. Added support for ENV_VAR_DISABLE_PLATFORM_DETECTION environment variable.
  - Fixed FIPS environments md5 hash issues with multipart upload on Azure.

- v4.0.0(October 09,2025)
  - Added support for checking certificates revocation using revocation lists (CRLs)
  - Added `CERT_REVOCATION_CHECK_MODE` to `CLIENT_ENVIRONMENT`
  - Added the `workload_identity_impersonation_path` parameter to support service account impersonation for Workload Identity Federation on GCP and AWS workloads only
  - Fixed `get_results_from_sfqid` when using `DictCursor` and executing multiple statements at once
  - Added the `oauth_credentials_in_body` parameter supporting an option to send the oauth client credentials in the request body
  - Fix retry behavior for `ECONNRESET` error
  - 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`
  - Enhanced configuration file security checks with stricter permission validation.
    - Configuration files writable by group or others now raise a `ConfigSourceError` with detailed permission information, preventing potential credential tampering.
  - Fixed the return type of `SnowflakeConnection.cursor(cursor_class)` to match the type of `cursor_class`
  - Constrained the types of `fetchone`, `fetchmany`, `fetchall`
    - As part of this fix, `DictCursor` is no longer a subclass of `SnowflakeCursor`; use `SnowflakeCursorBase` as a superclass of both.
  - Fix "No AWS region was found" error if AWS region was set in `AWS_DEFAULT_REGION` variable instead of `AWS_REGION` for `WORKLOAD_IDENTITY` authenticator
  - Add `ocsp_root_certs_dict_lock_timeout` connection parameter to set the timeout (in seconds) for acquiring the lock on the OCSP root certs dictionary. Default value for this parameter is -1 which indicates no timeout.
  - Fixed behaviour of trying S3 Transfer Accelerate endpoint by default for internal stages, and always getting HTTP403 due to permissions missing on purpose. Now /accelerate is not attempted.

- v3.18.0(October 03,2025)
  - Added support for pandas conversion for Day-time and Year-Month Interval types

- v3.17.4(September 22,2025)
  - Added support for intermediate certificates as roots when they are stored in the trust store
  - Bumped up vendored `urllib3` to `2.5.0` and `requests` to `v2.32.5`
  - Dropped support for OpenSSL versions older than 1.1.1

- v3.17.3(September 02,2025)
  - Enhanced configuration file permission warning messages.
    - Improved warning messages for readable permission issues to include clear instructions on how to skip warnings using the `SF_SKIP_WARNING_FOR_READ_PERMISSIONS_ON_CONFIG_FILE` environment variable.
  - Fixed the bug with staging pandas dataframes on AWS - the regional endpoint is used when required
    - This addresses the issue with `create_dataframe` call on Snowpark

- v3.17.2(August 23,2025)
  - Fixed a bug where platform_detection was retrying failed requests with warnings to non-existent endpoints.
  - Added disabling endpoint-based platform detection by setting `platform_detection_timeout_seconds` to zero.

- v3.17.1(August 17,2025)
  - Added `infer_schema` parameter to `write_pandas` to perform schema inference on the passed data.
  - Namespace `snowlake` reverted back to non-module.

- v3.17.0(August 16,2025)
  - Added in-band HTTP exception telemetry.
  - Added an `unsafe_skip_file_permissions_check` flag to skip file permission checks on the cache and configuration.
  - Added `APPLICATION_PATH` within `CLIENT_ENVIRONMENT` to distinguish between multiple scripts using the Python Connector in the same environment.
  - Added basic JSON support for Interval types.
  - Added in-band OCSP exception telemetry.
  - Added support for new authentication methods with Workload Identity Federation (WIF).
    - Added the `WORKLOAD_IDENTITY` value for the authenticator type.
    - Added the `workload_identity_provider` and `workload_identity_entra_resource` parameters.
  - Added support for the `use_vectorized_scanner` parameter in the write_pandas function.
  - Added support of proxy setup using connection parameters without emitting environment variables.
  - Added populating of `type_code` in `ResultMetadata` for interval types.
  - Introduced the `snowflake_version` property to the connection.
  - Moved `OAUTH_TYPE` to `CLIENT_ENVIROMENT`.
  - Relaxed the `pyarrow` version constrain; versions >= 19 can now be used.
  - Disabled token caching for OAuth Client Credentials authentication.
  - Fixed OAuth authenticator values.
  - Fixed a bug where a PAT with an external session authenticator was used while `external_session_id` was not provided in `SnowflakeRestful.fetch`.
  - Fixed the case-sensitivity of `Oauth` and `programmatic_access_token` authenticator values.
  - Fixed unclear error messages for incorrect `authenticator` values.
  - Fixed GCS staging by ensuring the endpoint has a scheme.
  - Fixed a bug where time-zoned timestamps fetched as a `pandas.DataFrame` or `pyarrow.Table` would overflow due to unnecessary precision. A clear error will now be raised if an overflow cannot be prevented.

- v3.16.0(July 04,2025)
  - Bumped numpy dependency from <2.1.0 to <=2.2.4.
  - Added Windows support for Python 3.13.
  - Added `bulk_upload_chunks` parameter to `write_pandas` function. Setting this parameter to True changes the behaviour of write_pandas function to first write all the data chunks to the local disk and then perform the wildcard upload of the chunks folder to the stage. In default behaviour the chunks are being saved, uploaded and deleted one by one.
  - Added support for new authentication mechanism PAT with external session ID.
  - Added `client_fetch_use_mp` parameter that enables multiprocessed fetching of result batches.
  - Added basic arrow support for Interval types.
  - Fixed `write_pandas` special characters usage in the location name.
  - Fixed usage of `use_virtual_url` when building the location for gcs storage client.
  - Added support for Snowflake OAuth for local applications.

- v3.15.0(Apr 29,2025)
  - Bumped up min boto and botocore version to 1.24.
  - OCSP: terminate certificates chain traversal if a trusted certificate already reached.
  - Added new authentication methods support for programmatic access tokens (PATs), OAuth 2.0 Authorization Code Flow, OAuth 2.0 Client Credentials Flow, and OAuth Token caching.
    - For OAuth 2.0 Authorization Code Flow:
      - Added the `oauth_client_id`, `oauth_client_secret`, `oauth_authorization_url`, `oauth_token_request_url`, `oauth_redirect_uri`, `oauth_scope`, `oauth_disable_pkce`, `oauth_enable_refresh_tokens` and `oauth_enable_single_use_refresh_tokens` parameters.
      - Added the `OAUTH_AUTHORIZATION_CODE` value for the parameter authenticator.
    - For OAuth 2.0 Client Credentials Flow:
      - Added the `oauth_client_id`, `oauth_client_secret`, `oauth_token_request_url`, and `oauth_scope` parameters.
      - Added the `OAUTH_CLIENT_CREDENTIALS` value for the parameter authenticator.
    - For OAuth Token caching: Passing a username to driver configuration is required, and the `client_store_temporary_credential property` is to be set to `true`.

- v3.14.1(April 21, 2025)
  - Added support for Python 3.13.
    - NOTE: Windows 64 support is still experimental and should not yet be used for production environments.
  - Dropped support for Python 3.8.
  - Added basic decimal floating-point type support.
  - Added experimental authentication methods.
  - Added support of GCS regional endpoints.
  - Added support of GCS virtual urls. See more: https://cloud.google.com/storage/docs/request-endpoints#xml-api
  - Added `client_fetch_threads` experimental parameter to better utilize threads for fetching query results.
  - Added `check_arrow_conversion_error_on_every_column` connection property that can be set to `False` to restore previous behaviour in which driver will ignore errors until it occurs in the last column. This flag's purpose is to unblock workflows that may be impacted by the bugfix and will be removed in later releases.
  - Lowered log levels from info to debug for some of the messages to make the output easier to follow.
  - Allowed the connector to inherit a UUID4 generated upstream, provided in statement parameters (field: `requestId`), rather than automatically generate a UUID4 to use for the HTTP Request ID.
  - Improved logging in urllib3, boto3, botocore - assured data masking even after migration to the external owned library in the future.
  - Improved error message for client-side query cancellations due to timeouts.
  - Improved security and robustness for the temporary credentials cache storage.
  - Fixed a bug that caused driver to fail silently on `TO_DATE` arrow to python conversion when invalid date was followed by the correct one.
  - Fixed expired S3 credentials update and increment retry when expired credentials are found.
  - Deprecated `insecure_mode` connection property and replaced it with `disable_ocsp_checks` with the same behavior as the former property.

- v3.14.0(March 03, 2025)
  - Bumped pyOpenSSL dependency upper boundary from <25.0.0 to <26.0.0.
  - Added a <19.0.0 pin to pyarrow as a workaround to a bug affecting Azure Batch.
  - Optimized distribution package lookup to speed up import.
  - Fixed a bug where privatelink OCSP Cache url could not be determined if privatelink account name was specified in uppercase.
  - Added support for iceberg tables to `write_pandas`.
  - Fixed base64 encoded private key tests.
  - Fixed a bug where file permission check happened on Windows.
  - Added support for File types.
  - Added `unsafe_file_write` connection parameter that restores the previous behaviour of saving files downloaded with GET with 644 permissions.

- v3.13.2(January 29, 2025)
  - Changed not to use scoped temporary objects.

- v3.13.1(January 29, 2025)
  - Remedied SQL injection vulnerability in snowflake.connector.pandas_tools.write_pandas. See more https://github.com/snowflakedb/snowflake-connector-python/security/advisories/GHSA-2vpq-fh52-j3wv
  - Remedied vulnerability in deserialization of the OCSP response cache. See more: https://github.com/snowflakedb/snowflake-connector-python/security/advisories/GHSA-m4f6-vcj4-w5mx
  - Remedied vulnerability connected to cache files permissions. See more: https://github.com/snowflakedb/snowflake-connector-python/security/advisories/GHSA-r2x6-cjg7-8r43

- v3.13.0(January 23,2025)
  - Added a feature to limit the sizes of IO-bound ThreadPoolExecutors during PUT and GET commands.
  - Updated README.md to include instructions on how to verify package signatures using `cosign`.
  - Updated the log level for cursor's chunk rowcount from INFO to DEBUG.
  - Added a feature to verify if the connection is still good enough to send queries over.
  - Added support for base64-encoded DER private key strings in the `private_key` authentication type.

- v3.12.4(December 3,2024)
  - Fixed a bug where multipart uploads to Azure would be missing their MD5 hashes.
  - Fixed a bug where OpenTelemetry header injection would sometimes cause Exceptions to be thrown.
  - Fixed a bug where OCSP checks would throw TypeError and make mainly GCP blob storage unreachable.
  - Bumped pyOpenSSL dependency from >=16.2.0,<25.0.0 to >=22.0.0,<25.0.0.

- v3.12.3(October 25,2024)
  - Improved the error message for SSL-related issues to provide clearer guidance when an SSL error occurs.
  - Improved error message for SQL execution cancellations caused by timeout.

- v3.12.2(September 11,2024)
  - Improved error handling for asynchronous queries, providing more detailed and informative error messages when an async query fails.
  - Improved inference of top-level domains for accounts specifying a region in China, now defaulting to snowflakecomputing.cn.
  - Improved implementation of the `snowflake.connector.util_text.random_string` to reduce the likelihood of collisions.
  - Updated the log level for OCSP fail-open warning messages from ERROR to WARNING.

- v3.12.1(August 20,2024)
  - Fixed a bug that logged the session token when renewing a session.
  - Fixed a bug where disabling client telemetry did not work.
  - Fixed a bug where passing `login_timeout` as a string raised a `TypeError` during the login retry step.
  - Use `pathlib` instead of `os` for default config file location resolution.
  - Removed upper `cryptogaphy` version pin.
  - Removed reference to script `snowflake-export-certs` (its backing module was already removed long ago)
  - Enhanced retry mechanism for handling transient network failures during query result polling when no server response is received.

- v3.12.0(July 24,2024)
  - Set default connection timeout of 10 seconds and socket read timeout of 10 minutes for HTTP calls in file transfer.
  - Optimized `to_pandas()` performance by fully parallel downloading logic.
  - Fixed a bug that specifying client_session_keep_alive_heartbeat_frequency in snowflake-sqlalchemy could crash the connector.
  - Fixed incorrect type hint of connection parameter `private_key`.
  - Added support for connectivity to multiple domains.
  - Bumped keyring dependency from >=23.1.0,<25.0.0 to >=23.1.0,<26.0.0.
  - Disabled OOB Telemetry.

- v3.11.0(June 17,2024)
  - Added support for `token_file_path` connection parameter to read an OAuth token from a file when connecting to Snowflake.
  - Added support for `debug_arrow_chunk` connection parameter to allow debugging raw arrow data in case of arrow data parsing failure.
  - Added support for `disable_saml_url_check` connection parameter to disable SAML URL check in OKTA authentication.
  - Fixed a bug that OCSP certificate signed using SHA384 algorithm cannot be verified.
  - Fixed a bug that status code shown as uploaded when PUT command failed with 400 error.
  - Fixed a bug that a PermissionError was raised when the current user does not have the right permission on parent directory of config file path.
  - Fixed a bug that OCSP GET url is not encoded correctly when it contains a slash.
  - Fixed a bug that an SSO URL didn't accept `:` in a query parameter, for instance, `https://sso.abc.com/idp/startSSO.ping?PartnerSpId=https://xyz.snowflakecomputing.com/`.

- v3.10.1(May 21, 2024)

  - Removed an incorrect error log message that could occur during arrow data conversion.

- v3.10.0(April 29,2024)

  - Added support for structured types to fetch_pandas_all.
  - Fixed an issue relating to incorrectly formed China S3 endpoints.

- v3.9.1(April 22,2024)

  - Fixed an issue that caused a HTTP 400 error when connecting to a China endpoint.

- v3.9.0(April 20,2024)

  - Added easy logging configuration so that users can easily generate log file by setup log config in `$SNOWFLAKE_HOME/config.toml`.
  - Improved s3 acceleration logic when connecting to China endpoint.

- v3.8.1(April 09, 2024)

  - Reverted the change "Updated `write_pandas` to skip TABLE IF NOT EXISTS in truncate mode." introduced in v3.8.0 (yanked) as it's a breaking change. `write_pandas` will be fixed in the future in a non-breaking way.

- v3.8.0(April 04,2024)

  - Improved `externalbrowser` auth in containerized environments
    - Instruct browser to not fetch `/favicon` on success page
    - Simple retry strategy on empty socket.recv
    - Add `SNOWFLAKE_AUTH_SOCKET_REUSE_PORT` flag (usage: `SNOWFLAKE_AUTH_SOCKET_REUSE_PORT=true`) to set the underlying socket's `SO_REUSEPORT` flag (described in the [socket man page](https://man7.org/linux/man-pages/man7/socket.7.html))
      - Useful when the randomized port used in the localhost callback url is being followed before the container engine completes port forwarding to host
      - Statically map a port between your host and container and allow that port to be reused in rapid succession with:
         `SF_AUTH_SOCKET_PORT=3037 SNOWFLAKE_AUTH_SOCKET_REUSE_PORT=true poetry run python somescript.py`
    - Add `SNOWFLAKE_AUTH_SOCKET_MSG_DONTWAIT` flag (usage: `SNOWFLAKE_AUTH_SOCKET_MSG_DONTWAIT=true`) to make a non-blocking socket.recv call and retry on Error
      - Consider using this if running in a containerized environment and externalbrowser auth frequently hangs while waiting for callback
      - NOTE: this has not been tested extensively, but has been shown to improve the experience when using WSL
  - Added support for parsing structured type information in schema queries.
  - Bumped platformdirs from >=2.6.0,<4.0.0 to >=2.6.0,<5.0.0
  - Updated diagnostics to use system$allowlist instead of system$whitelist.
  - Updated `write_pandas` to skip TABLE IF NOT EXISTS in truncate mode.
  - Improved cleanup logic for connection to rely on interpreter shutdown instead of the `__del__` method.
  - Updated the logging level from INFO to DEBUG when logging the executed query using `SnowflakeCursor.execute`.
  - Fixed a bug that the truncated password in log is not masked.

- v3.7.1(February 21, 2024)

  - Bumped pandas dependency from >=1.0.0,<2.2.0 to >=1.0.0,<3.0.0.
  - Bumped cryptography dependency from <42.0.0,>=3.1.0 to >=3.1.0,<43.0.0.
  - Bumped pyOpenSSL dependency from >=16.2.0,<24.0.0 to >=16.2.0,<25.0.0.
  - Fixed a memory leak in decimal data conversion.
  - Fixed a bug where `write_pandas` wasn't truncating the target table.
  - Bumped keyring dependency lower bound to 23.1.0 to address security vulnerability.

- v3.7.0(January 25,2024)

  - Added a new boolean parameter `force_return_table` to `SnowflakeCursor.fetch_arrow_all` to force returning `pyarrow.Table` in case of zero rows.
  - Cleanup some C++ code warnings and performance issues.
  - Added support for Python 3.12
  - Make local testing more robust against implicit assumptions.
  - Fixed PyArrow Table type hinting
  - Added support for connecting using an existing connection via the session and master token.
  - Added support for connecting to Snowflake by authenticating with multiple SAML IDP using external browser.
  - Added support for structured types (OBJECT, MAP, ARRAY) to nanoarrow converters.
  - Fixed compilation issue due to missing cstdint header on gcc13.
  - Improved config permissions warning message.

- v3.6.0(December 09,2023)

  - Added support for Vector types
  - Changed urllib3 version pin to only affect Python versions < 3.10.
  - Support for `private_key_file` and `private_key_file_pwd` connection parameters
  - Added a new flag `expired` to `SnowflakeConnection` class, that keeps track of whether the connection's master token has expired.
  - Fixed a bug where date insertion failed when date format is set and qmark style binding is used.

- v3.5.0(November 13,2023)

  - Version 3.5.0 is the snowflake-connector-python purely built upon apache arrow-nanoarrow project.
    - Reduced the wheel size to ~1MB and installation size to ~5MB.
    - Removed a hard dependency on a specific version of pyarrow.
  - Deprecated the usage of the following class/variable/environment variable for the sake of pure nanoarrow converter:
    - Deprecated class `snowflake.connector.cursor.NanoarrowUsage`.
    - Deprecated environment variable `NANOARROW_USAGE`.
    - Deprecated module variable `snowflake.connector.cursor.NANOARROW_USAGE`.

- v3.4.1(November 08,2023)

  - Bumped vendored `urllib3` to 1.26.18
  - Bumped vendored `requests` to 2.31.0

- v3.4.0(November 03,2023)

  - Added support for `use_logical_type` in `write_pandas`.
  - Removed dependencies on pycryptodomex and oscrypto. All connections now go through OpenSSL via the cryptography library, which was already a dependency.
  - Fixed issue with ingesting files over 80 GB to S3.
  - Added the `backoff_policy` argument to `snowflake.connector.connect` allowing for configurable backoff policy between retries of failed requests. See available implementations in the `backoff_policies` module.
  - Added the `socket_timeout` argument to `snowflake.connector.connect` specifying socket read and connect timeout.
  - Fixed `login_timeout` and `network_timeout` behaviour. Retries of login and network requests are now properly halted after these timeouts expire.
  - Fixed bug for issue https://github.com/urllib3/urllib3/issues/1878 in vendored `urllib`.
  - Add User-Agent header for diagnostic report for tracking.

- v3.3.1(October 16,2023)

  - Added for non-Windows platforms command suggestions (chown/chmod) for insufficient file permissions of config files.
  - Fixed issue with connection diagnostics failing to complete certificate checks.
  - Fixed issue that arrow iterator causes `ImportError` when the c extensions are not compiled.

- v3.3.0(October 10,2023)

  - Updated to Apache arrow-nanoarrow project for result arrow data conversion.
  - Introduced the `NANOARROW_USAGE` environment variable to allows switching between the nanoarrow converter and the arrow converter. Valid values include:
    - `FOLLOW_SESSION_PARAMETER`, which uses the converter configured in the server.
    - `DISABLE_NANOARROW`, which uses arrow converter, overriding the server setting.
    - `ENABLE_NANOARROW`, which uses the nanoarrow converter, overriding the server setting.
  - Introduced the `snowflake.connector.cursor.NanoarrowUsage` enum, whose members include:
    - `NanoarrowUsage.FOLLOW_SESSION_PARAMETER`, which uses the converter configured in the server.
    - `NanoarrowUsage.DISABLE_NANOARROW`, which uses arrow converter, overriding the server setting.
    - `NanoarrowUsage.ENABLE_NANOARROW`, which uses the nanoarrow converter, overriding the server setting.
  - Introduced the `snowflake.connector.cursor.NANOARROW_USAGE` module variable to allow switching between the nanoarrow converter and the arrow converter. It works in conjunction with the `snowflake.connector.cursor.NanoarrowUsage` enum.
  - The newly-introduced environment variable, enum, and module variable are temporary. They will be removed in a future release when switch from arrow to nanoarrow for data conversion is complete.

- v3.2.1(September 26,2023)

  - Fixed a bug where url port and path were ignored in private link oscp retry.
  - Added thread safety in telemetry when instantiating multiple connections concurrently.
  - Bumped platformdirs dependency from >=2.6.0,<3.9.0 to >=2.6.0,<4.0.0.0 and made necessary changes to allow this.
  - Removed the deprecation warning from the vendored urllib3 about urllib3.contrib.pyopenssl deprecation.
  - Improved robustness in handling authentication response.

- v3.2.0(September 06,2023)

  - Made the ``parser`` -> ``manager`` renaming more consistent in ``snowflake.connector.config_manager`` module.
  - Added support for default values for ConfigOptions
  - Added default_connection_name to config.toml file

- v3.1.1(August 28,2023)

  - Fixed a bug in retry logic for okta authentication to refresh token.
  - Support `RSAPublicKey` when constructing `AuthByKeyPair` in addition to raw bytes.
  - Fixed a bug when connecting through SOCKS5 proxy, the attribute `proxy_header` is missing on `SOCKSProxyManager`.
  - Cherry-picked https://github.com/urllib3/urllib3/commit/fd2759aa16b12b33298900c77d29b3813c6582de onto vendored urllib3 (v1.26.15) to enable enforce_content_length by default.
  - Fixed a bug in tag generation of OOB telemetry event.

- v3.1.0(July 31,2023)

  - Added a feature that lets you add connection definitions to the `connections.toml` configuration file. A connection definition refers to a collection of connection parameters, for example, if you wanted to define a connection named `prod``:

    ```toml
    [prod]
    account = "my_account"
    user = "my_user"
    password = "my_password"
    ```
    By default, we look for the `connections.toml` file in the location specified in the `SNOWFLAKE_HOME` environment variable (default: `~/.snowflake`). If this folder does not exist, the Python connector looks for the file in the [platformdirs](https://github.com/platformdirs/platformdirs/blob/main/README.rst) location, as follows:

    - On Linux: `~/.config/snowflake/`,  but follows XDG settings
    - On Mac: `~/Library/Application Support/snowflake/`
    - On Windows: `%USERPROFILE%\AppData\Local\snowflake\`

    You can determine which file is used by running the following command:

    ```
    python -c "from snowflake.connector.constants import CONNECTIONS_FILE; print(str(CONNECTIONS_FILE))"
    ```
  - Bumped cryptography dependency from <41.0.0,>=3.1.0 to >=3.1.0,<42.0.0.
  - Improved OCSP response caching to remove tmp cache files on Windows.
  - Improved OCSP response caching to reduce the times of disk writing.
  - Added a parameter `server_session_keep_alive` in `SnowflakeConnection` that skips session deletion when client connection closes.
  - Tightened our pinning of platformdirs, to prevent their new releases breaking us.
  - Fixed a bug where SFPlatformDirs would incorrectly append application_name/version to its path.
  - Added retry reason for queries that are retried by the client.
  - Fixed a bug where `write_pandas` fails when user does not have the privilege to create stage or file format in the target schema, but has the right privilege for the current schema.
  - Remove Python 3.7 support.
  - Worked around a segfault which sometimes occurred during cache serialization in multi-threaded scenarios.
  - Improved error handling of connection reset error.
  - Fixed a bug about deleting the temporary files happened when running PUT command.
  - Allowed to pass `type_mapper` to `fetch_pandas_batches()` and `fetch_pandas_all()`.
  - Fixed a bug where pickle.dump segfaults during cache serialization in multi-threaded scenarios.
  - Improved retry logic for okta authentication to refresh token if authentication gets throttled.
  - Note that this release does not include the changes introduced in the previous 3.1.0a1 release. Those will be released at a later time.

- v3.0.4(May 23,2023)
  - Fixed a bug in which `cursor.execute()` could modify the argument statement_params dictionary object when executing a multistatement query.
  - Added the json_result_force_utf8_decoding connection parameter to force decoding JSON content in utf-8 when the result format is JSON.
  - Fixed a bug in which we cannot call `SnowflakeCursor.nextset` before fetching the result of the first query if the cursor runs an async multistatement query.
  - Bumped vendored library urllib3 to 1.26.15
  - Bumped vendored library requests to 2.29.0
  - Fixed a bug when `_prefetch_hook()` was not called before yielding results of `execute_async()`.
  - Fixed a bug where some ResultMetadata fields were marked as required when they were optional.
  - Bumped pandas dependency from <1.6.0,>=1.0.0 to >=1.0.0,<2.1.0
  - Fixed a bug where bulk insert converts date incorrectly.
  - Add support for Geometry types.

- v3.0.3(April 20, 2023)
  - Fixed a bug that prints error in logs for GET command on GCS.
  - Added a parameter that allows users to skip file uploads to stage if file exists on stage and contents of the file match.
  - Fixed a bug that occurred when writing a Pandas DataFrame with non-default index in `snowflake.connector.pandas_tool.write_pandas`.
  - Fixed a bug that occurred when writing a Pandas DataFrame with column names containing double quotes in `snowflake.connector.pandas_tool.write_pandas`.
  - Fixed a bug that occurred when writing a Pandas DataFrame with binary data in `snowflake.connector.pandas_tool.write_pandas`.
  - Improved type hint of `SnowflakeCursor.execute` method.
  - Fail instantly upon receiving `403: Forbidden` HTTP response for a login-request.
  - Improved GET logging to warn when downloading multiple files with the same name.

- v3.0.2(March 23, 2023)

  - Fixed a memory leak in the logging module of the Cython extension.
  - Fixed a bug where the `put` command on AWS raised `AttributeError` when uploading file composed of multiple parts.
  - Fixed a bug of incorrect type hints of `SnowflakeCursor.fetch_arrow_all` and `SnowflakeCursor.fetchall`.
  - Fixed a bug where `snowflake.connector.util_text.split_statements` swallows the final line break in the case when there are no space between lines.
  - Improved logging to mask tokens in case of errors.
  - Validate SSO URL before opening it in the browser for External browser authenticator.

- v3.0.1(February 28, 2023)

  - Improved the robustness of OCSP response caching to handle errors in cases of serialization and deserialization.
  - Updated async_executes method's doc-string.
  - Errors raised now have a query field that contains the SQL query that caused them when available.
  - Fixed a bug where MFA token caching would refuse to work until restarted instead of reauthenticating.
  - Replaced the dependency on setuptools in favor of packaging.
  - Fixed a bug where `AuthByKeyPair.handle_timeout` should pass keyword arguments instead of positional arguments when calling `AuthByKeyPair.prepare`.

- v3.0.0(January 26, 2023)

  - Fixed a bug where write_pandas did not use user-specified schema and database to create intermediate objects
  - Fixed a bug where HTTP response code of 429 were not retried
  - Fixed a bug where MFA token caching was not working
  - Bumped pyarrow dependency from >=8.0.0,<8.1.0 to >=10.0.1,<10.1.0
  - Bumped pyOpenSSL dependency from <23.0.0 to <24.0.0
  - During browser-based authentication, the SSO url is now printed before opening it in the browser
  - Increased the level of a log for when ArrowResult cannot be imported
  - Added a minimum MacOS version check when compiling C-extensions
  - Enabled `fetch_arrow_all` and `fetch_arrow_batches` to handle async query results

- v2.9.0(December 9, 2022)

  - Fixed a bug where the permission of the file downloaded via GET command is changed
  - Reworked authentication internals to allow users to plug custom key-pair authenticators
  - Multi-statement query execution is now supported through `cursor.execute` and `cursor.executemany`
    - The Snowflake parameter `MULTI_STATEMENT_COUNT` can be altered at the account, session, or statement level. An additional argument, `num_statements`, can be provided to `execute` to use this parameter at the statement level. It *must* be provided to `executemany` to submit a multi-statement query through the method. Note that bulk insert optimizations available through `executemany` are not available when submitting multi-statement queries.
      - By default the parameter is 1, meaning only a single query can be submitted at a time
      - Set to 0 to submit any number of statements in a multi-statement query
      - Set to >1 to submit the specified exact number of statements in a multi-statement query
    - Bindings are accepted in the same way for multi-statements as they are for single statement queries
    - Asynchronous multi-statement query execution is supported. Users should still use `get_results_from_sfqid` to retrieve results
    - To access the results of each query, users can call `SnowflakeCursor.nextset()` as specified in the DB 2.0 API (PEP-249), to iterate through each statements results
      - The first statement's results are accessible immediately after calling `execute` (or `get_results_from_sfqid` if asynchronous) through the existing `fetch*()` methods

- v2.8.3(November 28,2022)

  - Bumped cryptography dependency from <39.0.0 to <41.0.0
  - Fixed a bug where expired OCSP response cache caused infinite recursion during cache loading

- v2.8.2(November 18,2022)

  - Improved performance of OCSP response caching
  - During the execution of GET commands we no longer resolve target location on the local machine
  - Improved performance of regexes used for PUT/GET SQL statement detection. CVE-2022-42965

- v2.8.1(October 30,2022)

   - Bumped cryptography dependency from <37.0.0 to <39.0.0
   - Bumped pandas dependency from <1.5.0 to <1.6.0
   - Fixed a bug where write_pandas wouldn't write an empty DataFrame to Snowflake
   - When closing connection async query status checking is now parallelized
   - Fixed a bug where test logging would be enabled on Jenkins workers in non-Snowflake Jenkins machines
   - Enhanced the atomicity of write_pandas when overwrite is set to True

- v2.8.0(September 27,2022)

  - Fixed a bug where rowcount was deleted when the cursor was closed
  - Fixed a bug where extTypeName was used even when it was empty
  - Updated how telemetry entries are constructed
  - Added telemetry for imported root packages during run-time
  - Added telemetry for using write_pandas
  - Fixed missing dtypes when calling fetch_pandas_all() on empty result
  - The write_pandas function now supports providing additional arguments to be used by DataFrame.to_parquet
  - All optional parameters of write_pandas can now be provided to pd_writer and make_pd_writer to be used with DataFrame.to_sql

- v2.7.12(August 26,2022)

   - Fixed a bug where timestamps fetched as pandas.DataFrame or pyarrow.Table would overflow for the sake of unnecessary precision. In the case where an overflow cannot be prevented a clear error will be raised now.
   - Added in-file caching for OCSP response caching
   - The write_pandas function now supports transient tables through the new table_type argument which supersedes create_temp_table argument
   - Fixed a bug where calling fetch_pandas_batches incorrectly raised NotSupportedError after an async query was executed
   - Added support for OKTA Identity Engine

- v2.7.11(July 26,2022)

   - Added minimum version pin to typing_extensions

- v2.7.10(July 22,2022)

   - Release wheels are now built on manylinux2014
   - Bumped supported pyarrow version to >=8.0.0,<8.1.0
   - Updated vendored library versions requests to 2.28.1 and urllib3 to 1.26.10
   - Added in-memory cache to OCSP requests
   - Added overwrite option to write_pandas
   - Added attribute `lastrowid` to `SnowflakeCursor` in compliance with PEP249.
   - Fixed a bug where gzip compressed http requests might be garbled by an unflushed buffer
   - Added new connection diagnostics capabilities to snowflake-connector-python
   - Bumped numpy dependency from <1.23.0 to <1.24.0


- v2.7.9(June 26,2022)

   - Fixed a bug where errors raised during get_results_from_sfqid() were missing errno
   - Fixed a bug where empty results containing GEOGRAPHY type raised IndexError


- v2.7.8(May 28,2022)

   - Updated PyPi documentation link to python specific main page
   - Fixed an error message that appears when pandas optional dependency group is required but is not installed
   - Implemented the DB API 2 callproc() method
   - Fixed a bug where decryption took place before decompression when downloading files from stages
   - Fixed a bug where s3 accelerate configuration was handled incorrectly
   - Extra named arguments given executemany() are now forwarded to execute()
   - Automatically sets the application name to streamlit when streamlit is imported and application name was not explicitly set
   - Bumped pyopenssl dependency version to >=16.2.0,<23.0.0


- v2.7.7(April 30,2022)

   - Bumped supported pandas version to < 1.5.0
   - Fixed a bug where partner name (from SF_PARTNER environmental variable) was set after connection was established
   - Added a new _no_retry option to executing queries
   - Fixed a bug where extreme timestamps lost precision


- v2.7.6(March 17,2022)

   - Fixed missing python_requires tag in setup.cfg

- v2.7.5(March 17,2022)

   - Added an option for partners to inject their name through an environmental variable (SF_PARTNER)
   - Fixed a bug where we would not wait for input if a browser window couldn't be opened for SSO login
   - Deprecate support for Python 3.6
   - Exported a type definition for SnowflakeConnection
   - Fixed a bug where final Arrow table would contain duplicate index numbers when using fetch_pandas_all

- v2.7.4(February 05,2022)

   - Add Geography Types
   - Removing automated incident reporting code
   - Fixed a bug where circular reference would prevent garbage collection on some objects
   - Fixed a bug where `DatabaseError` was thrown when executing against a closed cursor instead of `InterfaceError`
   - Fixed a bug where calling `executemany` would crash if an iterator was suppli