From 67b0c2203af74679de72b8dc185d512b48b1b863 Mon Sep 17 00:00:00 2001 From: Pazuzzu Date: Mon, 1 Jun 2026 11:23:38 +0200 Subject: [PATCH 1/2] fix(hostname): replace underscores with hyphens in account identifier --- src/snowflake/connector/util_text.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/snowflake/connector/util_text.py b/src/snowflake/connector/util_text.py index 6a62f422b8..41622aa43e 100644 --- a/src/snowflake/connector/util_text.py +++ b/src/snowflake/connector/util_text.py @@ -306,6 +306,8 @@ def _concatenate_statements( def construct_hostname(region: str | None, account: str) -> str: """Constructs hostname from region and account.""" + # RFC 952: underscores are not valid in hostnames + account = account.replace("_", "-") def _is_china_region(r: str) -> bool: # This is consistent with the Go driver: From b8677c8af31e9a1b593822f4e358a66a6f0c4949 Mon Sep 17 00:00:00 2001 From: Pazuzzu Date: Mon, 1 Jun 2026 16:52:03 +0200 Subject: [PATCH 2/2] chore: Add changelog entry --- DESCRIPTION.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DESCRIPTION.md b/DESCRIPTION.md index ad9f2156d1..02aacc0186 100644 --- a/DESCRIPTION.md +++ b/DESCRIPTION.md @@ -7,6 +7,9 @@ https://docs.snowflake.com/ Source code is also available at: https://github.com/snowflakedb/snowflake-connector-python # Release Notes +- v4.6.1(TBD) + - Fixed SSL hostname mismatch when using the async connector with account names containing underscores (#1839). + - v4.6.0(May 28,2026) - Dropped support for Python 3.9. The minimum supported version is now Python 3.10. - Fixed sdist to only install the minicore binary matching the current platform (SNOW-3526469). Previous 4.x releases copied every platform's minicore `.so`/`.dylib`/`.dll` into the install prefix, breaking downstream packagers (e.g. Homebrew) whose audits reject foreign-arch binaries.