Skip to content

SNOW-3020359 expand tilde to key file path in connection - #2759

Merged
sfc-gh-turbaszek merged 11 commits into
mainfrom
SNOW-3020359-expand-tilde-in-connection-too
Feb 11, 2026
Merged

sfc-gh-turbaszek merged 11 commits into
mainfrom
SNOW-3020359-expand-tilde-in-connection-too

Conversation

@sfc-gh-dszmolka

@sfc-gh-dszmolka sfc-gh-dszmolka commented Feb 2, 2026 •

Copy link
Copy Markdown
Contributor

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    This fix aims to address issue SNOW-3020359: Automatically expand tilde (~) to $HOME in private_key_file path #2746, where we do not expand tilde (~) in Connection for private_key_file configuration, thus the driver cannot read the key file for keypair auth in such cases.

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency
  3. Please describe how your code solves the related issue.

    Using pathlib.Path(path_to_key).expanduser(), which should work on both Unix and Windows bases systems, and even work without HOME envvar set (and for Linux, read it from /etc/passwd)

    Besides adding an automated test, also manually tested on Linux and Windows (latter both with \\ and / style path separator)

  4. (Optional) PR for stored-proc connector:

@github-actions

github-actions Bot commented Feb 2, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@sfc-gh-dszmolka

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Comment thread src/snowflake/connector/util_text.py Outdated
@sfc-gh-turbaszek
sfc-gh-turbaszek merged commit f087cf6 into main Feb 11, 2026
110 of 116 checks passed
@sfc-gh-turbaszek
sfc-gh-turbaszek deleted the SNOW-3020359-expand-tilde-in-connection-too branch February 11, 2026 10:19
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants