From 31969f56b521eec599013541879aed8c666df615 Mon Sep 17 00:00:00 2001 From: Varun Chawla Date: Sat, 7 Feb 2026 23:07:53 -0800 Subject: [PATCH] fix: correctly handle empty scheme in trino backend connect The walrus operator in the auth string check was evaluating to False when urlparse(host).scheme returned an empty string, preventing BasicAuthentication from being set up correctly. Changed to explicitly check 'is not None' to handle hosts without scheme prefixes. Fixes #11841 --- ibis/backends/trino/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ibis/backends/trino/__init__.py b/ibis/backends/trino/__init__.py index cd0938efe853..20a6286fb5c0 100644 --- a/ibis/backends/trino/__init__.py +++ b/ibis/backends/trino/__init__.py @@ -298,7 +298,7 @@ def do_connect( """ if ( isinstance(auth, str) - and (scheme := urlparse(host).scheme) + and (scheme := urlparse(host).scheme) is not None and scheme != "http" ): auth = BasicAuthentication(user, auth)