kevinjqliu commented on code in PR #1007:
URL: https://github.com/apache/iceberg-python/pull/1007#discussion_r1830086971
##########
pyiceberg/io/pyarrow.py:
##########
@@ -390,7 +391,14 @@ def _initialize_fs(self, scheme: str, netloc:
Optional[str] = None) -> FileSyste
gcs_kwargs["credential_token_expiration"] =
millis_to_datetime(int(expiration))
if bucket_location := self.properties.get(GCS_DEFAULT_LOCATION):
gcs_kwargs["default_bucket_location"] = bucket_location
- if endpoint := self.properties.get(GCS_ENDPOINT):
+ if (endpoint := self.properties.get(GCS_ENDPOINT)) and
GCS_SERVICE_HOST not in self.properties:
+ deprecation_message(
+ deprecated_in="0.8.0",
+ removed_in="0.9.0",
+ help_message=f"The property {GCS_ENDPOINT} is deprecated,
please use {GCS_SERVICE_HOST} instead",
+ )
+ self.properties[GCS_SERVICE_HOST] = endpoint
+ if endpoint := self.properties.get(GCS_SERVICE_HOST):
Review Comment:
```suggestion
if endpoint := get_first_property_value(self.properties,
GCS_SERVICE_HOST, GCS_ENDPOINT):
if self.properties.get(GCS_ENDPOINT):
deprecation_message(
deprecated_in="0.8.0",
removed_in="0.9.0",
help_message=f"The property {GCS_ENDPOINT} is
deprecated, please use {GCS_SERVICE_HOST} instead",
)
```
wdyt?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]