-
Notifications
You must be signed in to change notification settings - Fork 104
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
put_file: default to overwrite=True #419
Conversation
Thanks for the PR. I agree that we should match fsspec's default behavior here. I don't think this should depend on whether or not the filesystem is version aware or not. And it's a bit of a hassle, but I think we should deprecate the current behavior first, by setting the default to |
ef49fa0
to
1d72fa0
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.
We can clean this up if we're just changing stuff to overwrite=True
.
We'll need a note in the changelog. Maybe a versionchanged in the docstring too.
1d72fa0
to
0c3d5ac
Compare
Updated the PR as requested |
adlfs
put_file()
currently raisesFileExistsError
by default if the specified blob already exists. In version aware contextsput_file
should default to succeeding even if the specified blob already exists, so that put_file creates a new version of the blob.I should also note that as far as I can tell every other fsspec
put_file
implementation defaults to overwriting an existing file, so I'm also wondering whether the current adlfsoverwrite=False
default should be changed in all contexts (regardless of whether or not the fs is version aware)?