Repository navigation
Conversation
Add a KDE-aware trash backend that uses kioclient/KIO on Linux when running in a KDE session and a usable KIO worker is available. KIO is more reliable when using BTRFS mounts, where GIO currently returns an error: "Trashing on system internal mounts is not supported".
Owner
|
Gave this an AI review that raised a few things, and looking over them seem like several should be addressed: 🔴 Bugs / CI breakers
🟡 Design concerns
🟢 Minor
|
Resolve and cache the trash backend on first use to avoid spawning kioclient during import. Preserve non-UTF-8 filename bytes in file URLs and raise FileNotFoundError when kioclient is missing. Gate KIO tests to Freedesktop platforms, isolate cached lookups and environment variables, and cover lazy dispatch and backend fallbacks. Normalize formatting and document KIO's error-mapping limitation.
Author
|
Thanks for the review. Addressed the following:
For Validation: 32 tests passed, 1 skipped; Black, flake8, and whitespace checks passed for the changed files. I tested the changes with this small script (my from pathlib import Path
from send2trash import send2trash
def main():
path = Path("/data/test_file")
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text("send2trash snippet test\n", encoding="utf-8")
send2trash(path)
if __name__ == "__main__":
main() |
This branch has not been deployed
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.
Add a KDE-aware trash backend that uses kioclient/KIO on Linux when running in a KDE session and a usable KIO worker is available. KIO is more reliable when using BTRFS mounts, where GIO currently returns an error: "Trashing on system internal mounts is not supported".
Fixes #111