Conversation
There is a bug in `fsspec==2024.12.0` that causes the `ReferenceFileSystem` to incorrectly make `fs._open` return a coroutine object instead of a file-like object. (See a proposed PR to fix this issue: fsspec/filesystem_spec#1769.) We have a test for the expected behavior (`test_arrow_generator_partitioned` in `tests/unit/lib/test_arrow.py`) running in the CI environment. But that does not fail because the latest version of `fsspec` does not get installed in the CI due to the upper limit set by the `datasets` library. The `datasets` library is only installed as part of the `hf` and `tests` extras, so the default installation of `datachain` will encounter this issue. Fixes #806.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #823 +/- ##
=======================================
Coverage 87.50% 87.50%
=======================================
Files 128 128
Lines 11344 11344
Branches 1538 1538
=======================================
Hits 9926 9926
Misses 1031 1031
Partials 387 387
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
shcheklein
approved these changes
Jan 16, 2025
dreadatour
pushed a commit
that referenced
this pull request
Jan 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is a bug in
fsspec==2024.12.0that causes theReferenceFileSystemto incorrectly makefs._openreturn a coroutine object instead of a file-like object. (See a proposed PR to fix this issue: fsspec/filesystem_spec#1769.)We have a test for the expected behavior (
test_arrow_generator_partitionedintests/unit/lib/test_arrow.py) running in the CI environment.But that does not fail because the latest version of
fsspecdoes not get installed in the CI due to the upper limit set by thedatasetslibrary.The
datasetslibrary is only installed as part of thehfandtestsextras, so the default installation ofdatachainwill encounter this issue.How has this been tested?
I have tested this PR with older and newer version of fsspec and the test passes on both. And the test fails with the latest version of fsspec without this patch.
Fixes #806.