-
Notifications
You must be signed in to change notification settings - Fork 361
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
Set expand to True by default but make configurable #1558
Conversation
I propose this should not be the default. expand should not be the default as it seems like a footgun to use this feature without explicitly enabling it. |
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 really should not have open_expand=True
. It was a defect before and we shouldn't complicate future support just for the sake of bw compatibility for an unsupported edgecase in one popular library (pandas)
.
Finally, the old behavior, even when working properly is a footgun. Even if the glob is expanded, it's unexpected that will it open the first file it matches without erroring. What if I want to |
This is reasonable: catch FileNotFound in open(), and if there are any special characters, add extra information to the exception saying they might want to try expand=True. |
Everyone happy with the wording and test here? |
I think this is the best trade-off having learnt that the old behavior was an unintended one. |
Fixes fsspec/gcsfs#616 and perhaps others
cc @Skylion007 - this is what I was proposing, so you can override with argument to open(), for the whole session using the config, or temporarily using the module variable. The only question: should the same default chain exist in open_files?