This is an automated email from the ASF dual-hosted git repository.

blue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/master by this push:
     new 4d4392ae07 Python: Move adlfs import inline (#6497)
4d4392ae07 is described below

commit 4d4392ae07d36e0afc56ad20eeda602bc62e5e0f
Author: Fokko Driesprong <[email protected]>
AuthorDate: Fri Dec 30 19:54:01 2022 +0100

    Python: Move adlfs import inline (#6497)
---
 python/pyiceberg/io/fsspec.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/python/pyiceberg/io/fsspec.py b/python/pyiceberg/io/fsspec.py
index 9624562cb1..c5acaadade 100644
--- a/python/pyiceberg/io/fsspec.py
+++ b/python/pyiceberg/io/fsspec.py
@@ -28,12 +28,10 @@ from typing import (
 from urllib.parse import urlparse
 
 import requests
-from adlfs import AzureBlobFileSystem
 from botocore import UNSIGNED
 from botocore.awsrequest import AWSRequest
 from fsspec import AbstractFileSystem
 from requests import HTTPError
-from s3fs import S3FileSystem
 
 from pyiceberg.catalog import TOKEN
 from pyiceberg.exceptions import SignError
@@ -81,6 +79,8 @@ SIGNERS: Dict[str, Callable[[Properties, AWSRequest], 
AWSRequest]] = {"S3V4RestS
 
 
 def _s3(properties: Properties) -> AbstractFileSystem:
+    from s3fs import S3FileSystem
+
     client_kwargs = {
         "endpoint_url": properties.get("s3.endpoint"),
         "aws_access_key_id": properties.get("s3.access-key-id"),
@@ -110,6 +110,8 @@ def _s3(properties: Properties) -> AbstractFileSystem:
 
 
 def _adlfs(properties: Properties) -> AbstractFileSystem:
+    from adlfs import AzureBlobFileSystem
+
     fs = AzureBlobFileSystem(**properties)
     return fs
 

Reply via email to