fsspec / fsspec/filesystem_spec
Change to truncate=False in touch()?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 490
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 38
Description
Ref: https://github.com/dask/gcsfs/issues/364
Currently, fs.tuncate() will remove a pre-existing file and make a zero-size one, unless the caller explicitly says truncate=False. This proposal is to change the default.
Why yes:
- would be the safe option
- fits the normal posix understanding
Why no:
- many filesystems do not implement "update timestamp", so would get NotImplemented errors
- the most common usage is probably truncate=True (but this may be because of the default already)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the filesystem touch() implementation and reviewing the referenced gcsfs issue. Check how filesystem implementations handle timestamp updates and the truncate argument. Done means the default behavior is decided and consistently supported without unexpected NotImplemented errors, with the relevant behavior verified across affected filesystems.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100