-
Notifications
You must be signed in to change notification settings - Fork 276
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
BUG: the find() method is now also returning the specified directory to search #393
Comments
Can you form this into a specific test for s3fs, so we can include it in a PR with a fix? |
Note the test itself is already s3fs specific, it's only the parametrization/fixture that uses MinIO for interacting with S3. I suppose that could be quite easily changed to use the |
@martindurant are there any instructions about running the s3fs tests?
|
You need to set the key and secret variables to anything at all (see the CI script) |
Can you check if this is still failing with master versions, please? |
Yes, for me it's still failing with s3fs master (edit: and with fsspec master as well) |
Compared to s3fs 0.4, the new 0.5 release changed the behaviour of
S3FileSystem.find()
. This has been partly fixed already on master I think (eg #378, to respect again themaxdepth
keyword (to allow non-recursive finds), and the fix for this also seems to have fixed other things for pyarrow, i.e. to include sub-directories in the output, and not only the files).But from testing it with pyarrow, I noticed another difference that is still present on master: it now also returns the "current" directory that is passed to
find(..)
.So when doing
fs.find(base_dir)
, this gives a list of files/directories in "base_dir". But with s3fs 0.5/master, this now also includes "base_dir" itself.That behaviour is in contrast with s3fs0.4, but also with eg fsspec's LocalFileSystem.
I have a reproducible test script included below, but this is using a slimmed down and adapted version of a pyarrow test, so using pyarrows test machinery (with a fixture to set up minio to test), so this will need some edits to be includable in the s3fs tests.
The text was updated successfully, but these errors were encountered: