Skip to content

Commit 0c3fc4d

Browse files
authored
Cast env var s3.connect-timeout to float (#259)
1 parent feafbf0 commit 0c3fc4d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pyiceberg/io/fsspec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def _s3(properties: Properties) -> AbstractFileSystem:
130130
config_kwargs["proxies"] = {"http": proxy_uri, "https": proxy_uri}
131131

132132
if connect_timeout := properties.get(S3_CONNECT_TIMEOUT):
133-
config_kwargs["connect_timeout"] = connect_timeout
133+
config_kwargs["connect_timeout"] = float(connect_timeout)
134134

135135
fs = S3FileSystem(client_kwargs=client_kwargs, config_kwargs=config_kwargs)
136136

pyiceberg/io/pyarrow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def _initialize_fs(self, scheme: str, netloc: Optional[str] = None) -> FileSyste
321321
if scheme in {"s3", "s3a", "s3n"}:
322322
from pyarrow.fs import S3FileSystem
323323

324-
client_kwargs = {
324+
client_kwargs: Dict[str, Any] = {
325325
"endpoint_override": self.properties.get(S3_ENDPOINT),
326326
"access_key": self.properties.get(S3_ACCESS_KEY_ID),
327327
"secret_key": self.properties.get(S3_SECRET_ACCESS_KEY),
@@ -333,7 +333,7 @@ def _initialize_fs(self, scheme: str, netloc: Optional[str] = None) -> FileSyste
333333
client_kwargs["proxy_options"] = proxy_uri
334334

335335
if connect_timeout := self.properties.get(S3_CONNECT_TIMEOUT):
336-
client_kwargs["connect_timeout"] = connect_timeout
336+
client_kwargs["connect_timeout"] = float(connect_timeout)
337337

338338
return S3FileSystem(**client_kwargs)
339339
elif scheme == "hdfs":

0 commit comments

Comments
 (0)