-
Notifications
You must be signed in to change notification settings - Fork 364
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
fs.glob("/dir/**/*")
is inconsitent with glob.glob
#1394
Comments
Does #1382 fix the situation? |
It does not -- I just checked it out 046edda locally and you get: In [1]: import fsspec
In [2]: fs, __ = fsspec.core.url_to_fs("memory://")
...: fs.touch("/a/1")
...: fs.touch("/a/2")
...: fs.touch("/a/b/1")
...: fs.touch("/a/b/2")
...:
...: print(fs.glob("/a/**/*"))
['/a/1', '/a/2', '/a/b', '/a/b/1', '/a/b/2']
In [3]: fsspec.__version__
Out[3]: '2021.11.1+324.g046edda' |
Switching to the non-recursive mode would be a big breaking change for |
This is the posix behaviour, suggesting fsspec is getting this right
|
Yeah, I think it's reasonable to say that this is expected behavior -- I was just surprised that the behavior changed from 2023.5 to 2023.9. Happy to close this as "working as expected". |
Summary: Need to update code for fsspec/filesystem_spec#1394. Reviewed By: stepanhruda Differential Revision: D50388544 fbshipit-source-id: 49944758ac7c87e828950d997ad1d6a386b125d2
Summary: Need to update code for fsspec/filesystem_spec#1394. Reviewed By: stepanhruda Differential Revision: D50388544
If you run the following code:
you will get different ansewrs -- on fsspec 2023.5, you get
['/a/b/1', '/a/b/2']
but in fsspec 2023.9 you get['/a/1', '/a/2', '/a/b', '/a/b/1', '/a/b/2']
.I believe the 2023.5 behavior is more consistent with how Python's
glob.glob
works, but don't have a strong opinion.I believe this separate from #1380, since this has to do with the behavior of
/dir/**/*
, not the behavior of**/
, but happy to be corrected!The text was updated successfully, but these errors were encountered: