Skip to content

Commit 7dfde67

Browse files
sfc-gh-pczajkasfc-gh-fpawlowski
authored andcommitted
Fix #2290 async implementation
1 parent b22fb9a commit 7dfde67

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/snowflake/connector/aio/_connection.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
from ..constants import (
3434
_CONNECTIVITY_ERR_MSG,
3535
ENV_VAR_EXPERIMENTAL_AUTHENTICATION,
36-
ENV_VAR_PARTNER,
3736
PARAMETER_AUTOCOMMIT,
3837
PARAMETER_CLIENT_PREFETCH_THREADS,
3938
PARAMETER_CLIENT_REQUEST_MFA_TOKEN,
@@ -527,10 +526,9 @@ def _init_connection_parameters(
527526
is_kwargs_empty = not connection_init_kwargs
528527

529528
if "application" not in connection_init_kwargs:
530-
if ENV_VAR_PARTNER in os.environ.keys():
531-
connection_init_kwargs["application"] = os.environ[ENV_VAR_PARTNER]
532-
elif "streamlit" in sys.modules:
533-
connection_init_kwargs["application"] = "streamlit"
529+
app = self._detect_application()
530+
if app:
531+
connection_init_kwargs["application"] = app
534532

535533
if "insecure_mode" in connection_init_kwargs:
536534
warn_message = "The 'insecure_mode' connection property is deprecated. Please use 'disable_ocsp_checks' instead"

0 commit comments

Comments
 (0)