From 02f5297e1e7811a53696295c272100eb15272330 Mon Sep 17 00:00:00 2001 From: Andrew Argeros <56045876+andrewargeros@users.noreply.github.com> Date: Fri, 14 Jun 2024 11:21:33 -0500 Subject: [PATCH 1/2] force timeout to int --- redshift_connector/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redshift_connector/core.py b/redshift_connector/core.py index 7c3befb..bacea11 100644 --- a/redshift_connector/core.py +++ b/redshift_connector/core.py @@ -618,7 +618,7 @@ def get_calling_module() -> str: raise ProgrammingError("one of host or unix_sock must be provided") if timeout is not None: _logger.debug("set socket timeout=%s", timeout) - self._usock.settimeout(timeout) + self._usock.settimeout(int(timeout)) if unix_sock is None and host is not None: hostport: typing.Tuple[str, int] = Connection.__get_host_address_info(host, port) From a853f9d767345ed99d6694faed5e97ddccaf3854 Mon Sep 17 00:00:00 2001 From: Andrew Argeros <56045876+andrewargeros@users.noreply.github.com> Date: Fri, 14 Jun 2024 11:22:51 -0500 Subject: [PATCH 2/2] force idp_response_timeout to int --- .../plugin/browser_azure_oauth2_credentials_provider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redshift_connector/plugin/browser_azure_oauth2_credentials_provider.py b/redshift_connector/plugin/browser_azure_oauth2_credentials_provider.py index 4ee62c0..cb5c435 100644 --- a/redshift_connector/plugin/browser_azure_oauth2_credentials_provider.py +++ b/redshift_connector/plugin/browser_azure_oauth2_credentials_provider.py @@ -68,7 +68,7 @@ def check_required_parameters(self: "BrowserAzureOAuth2CredentialsProvider") -> BrowserAzureOAuth2CredentialsProvider.handle_missing_required_property("idp_tenant") if not self.client_id: BrowserAzureOAuth2CredentialsProvider.handle_missing_required_property("client_id") - if not self.idp_response_timeout or self.idp_response_timeout < 10: + if not self.idp_response_timeout or int(self.idp_response_timeout) < 10: BrowserAzureOAuth2CredentialsProvider.handle_invalid_property_value( "idp_response_timeout", "Must be 10 seconds or greater" )