-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate ADLFS prefix in favor of ADLS #961
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! Just some minor comments
pyiceberg/io/__init__.py
Outdated
ADLFS_CONNECTION_STRING = "adls.connection-string" | ||
ADLFS_ACCOUNT_NAME = "adls.account-name" | ||
ADLFS_ACCOUNT_KEY = "adls.account-key" | ||
ADLFS_SAS_TOKEN = "adls.sas-token" | ||
ADLFS_TENANT_ID = "adls.tenant-id" | ||
ADLFS_CLIENT_ID = "adls.client-id" | ||
ADLFS_ClIENT_SECRET = "adls.client-secret" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
ADLS_CONNECTION_STRING = "adls.connection-string"
...
for new adls.*
properties and leave ADLFS_*
properties unchanged to remain backward compatible? This could make the constants naming more consistent.
pyiceberg/io/fsspec.py
Outdated
deprecated_in="0.7.0", | ||
removed_in="0.8.0", | ||
help_message=f"The property {property_name} is deprecated. Please use properties that start with adls.", | ||
)(lambda: None)() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pyiceberg/io/fsspec.py
Outdated
tenant_id=properties.get(ADLFS_TENANT_ID), | ||
client_id=properties.get(ADLFS_CLIENT_ID), | ||
client_secret=properties.get(ADLFS_ClIENT_SECRET), | ||
connection_string=PropertyUtil.get_first_property_value( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] For TableProperties
and PropertyUtil
, we usually do inline import:
iceberg-python/pyiceberg/io/fsspec.py
Lines 128 to 132 in 4fc7589
def _s3(properties: Properties) -> AbstractFileSystem: | |
from s3fs import S3FileSystem | |
from pyiceberg.table import PropertyUtil | |
5f37c08
to
652c453
Compare
652c453
to
6a3569a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, looks like you cover all the s/adlfs/adls
minor comment on the deprecation message
6a3569a
to
752f925
Compare
@ndrluis do you mind rebasing this PR? Looks like its almost good to go |
752f925
to
bc47da9
Compare
@kevinjqliu Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/search?q=repo%3Aapache%2Ficeberg-python%20adlfs&type=code
there are a couple more instances of adlfs
in the repo
862b00b
to
127535a
Compare
Thank you for working on this fix @ndrluis and thank you @kevinjqliu and @HonahX for the reviews! |
* Deprecate ADLFS prefix in favor of ADLS * Add missing renaming
* Deprecate ADLFS prefix in favor of ADLS * Add missing renaming
Solves #866