send2trash is buggy, and _check_trash check also invalid (at least on GPFS)
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
It appears that `send2trash` assumes that `os.rename` can be used across filesystems, which is not true. It also appears that this probably isn't going to get fixed any time soon. (see https://github.com/arsenetar/send2trash/issues/26)
The `_check_trash` function seems to be trying to work around this, but the check it's using isn't generally valid (at least not on GPFS), preventing users from deleting files.
https://github.com/jupyter/notebook/blob/0c83c9d59f5ba22b3a09b7db4ebcf3af881ffc53/notebook/services/contents/filemanager.py#L515-L524
Possible solutions: remove send2trash entirely, or don't use it by default.
Contributor guide
Research direction
Start by reading notebook/services/contents/filemanager.py around lines 515-524 and trace how _check_trash is used during deletion. Validate the cross-filesystem behavior described for GPFS, then resolve the open choice between removing send2trash and not using it by default. Done means deletion is no longer incorrectly blocked on affected filesystems.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100