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 theprod
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 theSNOWFLAKE_HOME
environment variable (default:~/.snowflake
). If this folder does not exist, the Python connector looks for the file in theplatformdirs
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))"
- On Linux:
-
Bumped cryptography dependency from <41.0.0,>=3.1.0 to >=3.1.0,<42.0.0.
-
Allowed to pass
type_mapper
tofetch_pandas_batches()
andfetch_pandas_all()
. -
Added a parameter
server_session_keep_alive
inSnowflakeConnection
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.