Skip to content

Commit

Permalink
SNOW-802807 SNOWFLAKE_HOME config file resolution bug (#1611)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mkeller authored Jun 23, 2023
1 parent 51749d2 commit 48d8d3f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
- Improved OCSP response caching to remove tmp cache files on Windows.
- 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.

- 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.
Expand Down
2 changes: 1 addition & 1 deletion src/snowflake/connector/sf_dirs.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __init__(
@property
def user_data_dir(self) -> str:
"""data directory tied to to the user"""
return self._append_app_name_and_version(self.single_dir)
return self.single_dir

@property
def site_data_dir(self) -> str:
Expand Down
6 changes: 1 addition & 5 deletions test/unit/test_configmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,6 @@ def test_error_missing_fp_retrieve():
)
def test_sf_dirs(tmp_path, method, version):
appname = random_string(5)
single_dir = tmp_path / appname
if version is not None:
single_dir = single_dir / version
assert getattr(
SFPlatformDirs(
str(tmp_path),
Expand All @@ -285,8 +282,7 @@ def test_sf_dirs(tmp_path, method, version):
ensure_exists=True,
),
method,
) == str(single_dir)
assert single_dir.exists() and not single_dir.is_file()
) == str(tmp_path)


def test_config_file_resolution_sfdirs_default():
Expand Down

0 comments on commit 48d8d3f

Please sign in to comment.