4040from pyiceberg .catalog import TOKEN
4141from pyiceberg .exceptions import SignError
4242from pyiceberg .io import (
43- ADLFS_ACCOUNT_KEY ,
44- ADLFS_ACCOUNT_NAME ,
45- ADLFS_CLIENT_ID ,
46- ADLFS_CONNECTION_STRING ,
47- ADLFS_PREFIX ,
48- ADLFS_SAS_TOKEN ,
49- ADLFS_TENANT_ID ,
5043 ADLS_ACCOUNT_KEY ,
5144 ADLS_ACCOUNT_NAME ,
5245 ADLS_CLIENT_ID ,
6154 GCS_CACHE_TIMEOUT ,
6255 GCS_CONSISTENCY ,
6356 GCS_DEFAULT_LOCATION ,
64- GCS_ENDPOINT ,
6557 GCS_PROJECT_ID ,
6658 GCS_REQUESTER_PAYS ,
6759 GCS_SERVICE_HOST ,
7870 S3_SIGNER_ENDPOINT ,
7971 S3_SIGNER_ENDPOINT_DEFAULT ,
8072 S3_SIGNER_URI ,
81- ADLFS_ClIENT_SECRET ,
8273 ADLS_ClIENT_SECRET ,
8374 FileIO ,
8475 InputFile ,
8778 OutputStream ,
8879)
8980from pyiceberg .typedef import Properties
90- from pyiceberg .utils .deprecated import deprecation_message
9181from pyiceberg .utils .properties import get_first_property_value , property_as_bool
9282
9383logger = logging .getLogger (__name__ )
@@ -172,12 +162,6 @@ def _gs(properties: Properties) -> AbstractFileSystem:
172162 # https://gcsfs.readthedocs.io/en/latest/api.html#gcsfs.core.GCSFileSystem
173163 from gcsfs import GCSFileSystem
174164
175- if properties .get (GCS_ENDPOINT ):
176- deprecation_message (
177- deprecated_in = "0.8.0" ,
178- removed_in = "0.9.0" ,
179- help_message = f"The property { GCS_ENDPOINT } is deprecated, please use { GCS_SERVICE_HOST } instead" ,
180- )
181165 return GCSFileSystem (
182166 project = properties .get (GCS_PROJECT_ID ),
183167 access = properties .get (GCS_ACCESS , "full_control" ),
@@ -186,7 +170,7 @@ def _gs(properties: Properties) -> AbstractFileSystem:
186170 cache_timeout = properties .get (GCS_CACHE_TIMEOUT ),
187171 requester_pays = property_as_bool (properties , GCS_REQUESTER_PAYS , False ),
188172 session_kwargs = json .loads (properties .get (GCS_SESSION_KWARGS , "{}" )),
189- endpoint_url = get_first_property_value ( properties , GCS_SERVICE_HOST , GCS_ENDPOINT ),
173+ endpoint_url = properties . get ( GCS_SERVICE_HOST ),
190174 default_location = properties .get (GCS_DEFAULT_LOCATION ),
191175 version_aware = property_as_bool (properties , GCS_VERSION_AWARE , False ),
192176 )
@@ -195,50 +179,14 @@ def _gs(properties: Properties) -> AbstractFileSystem:
195179def _adls (properties : Properties ) -> AbstractFileSystem :
196180 from adlfs import AzureBlobFileSystem
197181
198- for property_name in properties :
199- if property_name .startswith (ADLFS_PREFIX ):
200- deprecation_message (
201- deprecated_in = "0.8.0" ,
202- removed_in = "0.9.0" ,
203- help_message = f"The property { property_name } is deprecated. Please use properties that start with adls." ,
204- )
205-
206182 return AzureBlobFileSystem (
207- connection_string = get_first_property_value (
208- properties ,
209- ADLS_CONNECTION_STRING ,
210- ADLFS_CONNECTION_STRING ,
211- ),
212- account_name = get_first_property_value (
213- properties ,
214- ADLS_ACCOUNT_NAME ,
215- ADLFS_ACCOUNT_NAME ,
216- ),
217- account_key = get_first_property_value (
218- properties ,
219- ADLS_ACCOUNT_KEY ,
220- ADLFS_ACCOUNT_KEY ,
221- ),
222- sas_token = get_first_property_value (
223- properties ,
224- ADLS_SAS_TOKEN ,
225- ADLFS_SAS_TOKEN ,
226- ),
227- tenant_id = get_first_property_value (
228- properties ,
229- ADLS_TENANT_ID ,
230- ADLFS_TENANT_ID ,
231- ),
232- client_id = get_first_property_value (
233- properties ,
234- ADLS_CLIENT_ID ,
235- ADLFS_CLIENT_ID ,
236- ),
237- client_secret = get_first_property_value (
238- properties ,
239- ADLS_ClIENT_SECRET ,
240- ADLFS_ClIENT_SECRET ,
241- ),
183+ connection_string = properties .get (ADLS_CONNECTION_STRING ),
184+ account_name = properties .get (ADLS_ACCOUNT_NAME ),
185+ account_key = properties .get (ADLS_ACCOUNT_KEY ),
186+ sas_token = properties .get (ADLS_SAS_TOKEN ),
187+ tenant_id = properties .get (ADLS_TENANT_ID ),
188+ client_id = properties .get (ADLS_CLIENT_ID ),
189+ client_secret = properties .get (ADLS_ClIENT_SECRET ),
242190 )
243191
244192
0 commit comments