Repository navigation
Add error handling options to CloudPath.rmtree - #604
Merged
pjbull merged 2 commits intoOct 20, 2026
Merged
Conversation
terminalchai
requested a deployment
to
reviewed-live-cloud
October 15, 2026 22:16 — with
GitHub Actions
Waiting
terminalchai
requested a deployment
to
reviewed-live-cloud
October 15, 2026 22:16 — with
GitHub Actions
Waiting
terminalchai
requested a deployment
to
reviewed-live-cloud
October 15, 2026 22:16 — with
GitHub Actions
Waiting
terminalchai
requested a deployment
to
reviewed-live-cloud
October 15, 2026 22:16 — with
GitHub Actions
Waiting
terminalchai
requested a deployment
to
reviewed-live-cloud
October 15, 2026 22:16 — with
GitHub Actions
Waiting
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #604 +/- ##
========================================
- Coverage 96.3% 95.6% -0.7%
========================================
Files 30 30
Lines 2979 2988 +9
========================================
- Hits 2869 2857 -12
- Misses 110 131 +21
🚀 New features to boost your workflow:
|
pjbull
force-pushed
the
feat/rmtree-error-handling
branch
from
October 17, 2026 18:00
4b71f4e to
96f8695
Compare
pjbull
had a problem deploying
to
reviewed-live-cloud
October 17, 2026 18:00 — with
GitHub Actions
Failure
pjbull
force-pushed
the
feat/rmtree-error-handling
branch
from
October 20, 2026 16:30
96f8695 to
2c31a1f
Compare
This branch was successfully 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.
CloudPath.rmtree()currently rejectsignore_errorsand error callbacks, so cleanup code cannot suppress or handle a failed cloud deletion using the standard-library-style API requested in #270.Add
ignore_errors=False,onerror=None, and keyword-onlyonexc=Noneto the shared method. Existing calls keep propagating errors. Suppression takes precedence over callbacks;onexctakes precedence overonerror. Callback failures and control-flow exceptions still propagate. No backend SDK calls change.Callbacks receive the unbound
rmtreemethod, the cloud path and the exception (or the legacysys.exc_info()tuple), allowingfunction(path)to retry. This is operation-level handling: it covers the initial file check and the backend removal, and a backend may have removed some objects before failing. The docstring describes these semantics. Cloud SDK errors need not inheritOSError, so the opt-in handler acceptsException; local-onlydir_fdis not exposed.Closes #270.
Validation on Windows/Python 3.11:
git diff --checkpasses.Contributor checklist:
Prepared with AI assistance; the diff and test results were reviewed before submission.