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