Skip to content

Releases: snowflakedb/snowflake-connector-python

Release

07 Sep 19:54
d0e00ad
Compare
Choose a tag to compare
  • 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

Release

29 Aug 18:07
4da2a61
Compare
Choose a tag to compare

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 urllib3/urllib3@fd2759a onto vendored urllib3 (v1.26.15) to enable enforce_content_length by default.
  • Fixed a bug in tag generation of OOB telemetry event.

Release

01 Aug 18:13
0da61a3
Compare
Choose a tag to compare
Release Pre-release
Pre-release

Version 3.1.0a2 is built on top of 3.1.0a1, including all the latest changes in the released GA version 3.1.0.

Release

31 Jul 23:02
1380e41
Compare
Choose a tag to compare

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``:

    [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 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.

Please check our community page for release notes.

Release

26 Jul 00:07
Compare
Choose a tag to compare
Release Pre-release
Pre-release

Version 3.1.0a1 is our first efforts to build snowflake-connector-python based on apache nanoarrow project, which reduces the package size as well as removes a hard dependency on a specific version of pyarrow. This version also includes the following features and bug fixes from the unreleased v3.0.5:

New Features and Improvements

  • Added a feature that lets you add connection definitions to the config.toml configuration file. A connection definition refers to a collection of connection parameters. The connection configuration name must begin with connections, similar to the following that defines the parameters for the prod connection:

      [connections.prod]
      account = "my_account"
      user = "my_user"
      password = "my_password"

    By default, we look for the config.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 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 CONFIG_FILE; print(str(CONFIG_FILE))"
    
  • Bumped cryptography dependency from <41.0.0,>=3.1.0 to >=3.1.0,<42.0.0.

  • Allowed to pass type_mapper to fetch_pandas_batches() and fetch_pandas_all().

  • Added a parameter server_session_keep_alive in SnowflakeConnection that skips session deletion when client connection closes.

  • Added retry reason for queries that are retried by the client.

  • Improved error handling of connection reset error.

  • Improved OCSP response caching to remove tmp cache files on Windows.

  • Improved OCSP response caching to reduce the times of disk writing.

  • Tightened our pinning of platformdirs, to prevent their new releases breaking us.

  • Remove Python 3.7 support.

Bug Fixes

  • Fixed a bug where SFPlatformDirs would incorrectly append application_name/version to its path.
  • 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.
  • Fixed a bug about deleting the temporary files happened when running PUT command.
  • Fixed a bug where pickle.dump segfaults during cache serialization in multi-threaded scenarios.
  • Worked around a segfault which sometimes occurred during cache serialization in multi-threaded scenarios.

Release

25 May 17:56
36e20a0
Compare
Choose a tag to compare

New Features and Improvements

  • Added the json_result_force_utf8_decoding connection parameter to force decoding JSON content in utf-8 when the result format is JSON.
  • Bumped vendored library urllib3 to 1.26.15
  • Bumped vendored library requests to 2.29.0
  • Bumped pandas dependency from <1.6.0,>=1.0.0 to >=1.0.0,<2.1.0
  • Add support for Geometry types.

Bug Fixes

  • Fixed a bug in which cursor.execute() could modify the argument statement_params dictionary object when executing a multistatement query.
  • 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.
  • 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.
  • Fixed a bug where bulk insert converts date incorrectly.

Please check our community page for release notes.

Release

20 Apr 23:20
fbf5954
Compare
Choose a tag to compare

New Features and Improvements

  • Added a parameter that allows users to skip file uploads to stage if file exists on stage and contents of the file match.
  • Improved type hint of SnowflakeCursor.execute method.
  • Improved GET logging to warn when downloading multiple files with the same name.

Bug Fixes

  • Fixed a bug that prints error in logs for GET command on GCS.
  • 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.

Please check our community page for release notes.

Release

23 Mar 23:39
eda6206
Compare
Choose a tag to compare

New Features

  • Improved logging to mask tokens in case of errors.
  • Validate SSO URL before opening it in the browser for External browser authenticator.

Bug Fixes

  • 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.

Please check our community page for release notes.

Release

01 Mar 19:38
ec95c56
Compare
Choose a tag to compare

New Features

  • Improved the robustness of OCSP response caching to handle errors in cases of serialization and deserialization.
  • Replaced the dependency on setuptools in favor of packaging.
  • Updated async_executes method's doc-string.
  • Errors raised now have a query field that contains the SQL query that caused them when available.

Bug Fixes

  • Fixed a bug where AuthByKeyPair.handle_timeout should pass keyword arguments instead of positional arguments when calling AuthByKeyPair.prepare.
  • Fixed a bug where MFA token caching would refuse to work until restarted instead of reauthenticating.
    Please check our community page for release notes.

Release

27 Jan 21:10
1885b3e
Compare
Choose a tag to compare

Behavior Changes

  • Fixed a bug where write_pandas did not use user-specified schemas and databases to create intermediate objects

New Features and Updates

  • 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

Bug Fixes

  • Fixed a bug where the HTTP 429 response code was not retried
  • Fixed a bug where MFA token caching was not working

Please check our community page for release notes.