Skip to content
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

Allow file mode="x" with get_fs_token_paths #1333

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

GenevieveBuckley
Copy link
Contributor

Closes #1332
Related: dask/dask#10442

fsspec does not always behave correctly when file mode="x" is used. This PR addresses one particular instance that is causing flow-on problems for dask.

@martindurant
Copy link
Member

I am fine with this, but ... mode x isn't actually enforced on remote filesystems. On local, the mode is passed on to the OS so you get the expected behaviour. Is this a problem?

@GenevieveBuckley
Copy link
Contributor Author

It's a problem for dask users using the default local cluster. Here is Hendrik explaining how he can't save a dataframe to csv using mode="x", where mode="w" works well: dask/dask#10442

@martindurant
Copy link
Member

Yes, but my point is that this will probably fail anyway on, for example, gcs. Either way, expand should do the right thing, so this change is worthwhile.

@martindurant martindurant merged commit a988ce5 into fsspec:master Aug 16, 2023
11 checks passed
@GenevieveBuckley GenevieveBuckley deleted the file-mode-x branch August 18, 2023 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exclusive file creation mode="x" does not work well with get_fs_token_paths
2 participants