Repository navigation
Conversation
Author
|
Additional validation on fade86d with Python 3.12.14 and fsspec 2026.9.0:
Exclusions:
A run without these exclusions on base 8c94567 failed the same two tests in the minimal environment, with 67 tests and 154 subtests passing. Restoring the previous open implementation also caused all eight UTF-8 regressions to fail while the four binary tests continued to pass. |
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.
Problem
Backend.open()promises UTF-8 text I/O, and the OS backend explicitly uses UTF-8. The fsspec backend currently omits the encoding, so fsspec falls back to the system locale. On non-UTF-8 systems this can reject non-ASCII text or decode UTF-8 files incorrectly.Change
Pass
encoding='utf-8'for fsspec text modes andNonefor binary modes. Add regression coverage for reading, writing, appending, and exclusive creation in text and binary modes.Fixes #817.
Validation
A focused regression run using fsspec's local filesystem produced 8 Unicode failures with the previous implementation and passed all 12 cases with this change.
The full pytest suite was not run locally because the test dependency download timed out; CI should provide the complete validation.