Skip to content

fix: synchronous rmdir() fails silently - #85

Merged
shcheklein merged 3 commits into
fsspec:mainfrom
Rainyyyyyyy111:oss-contributor/issue-38
Nov 29, 2026
Merged

shcheklein merged 3 commits into
fsspec:mainfrom
Rainyyyyyyy111:oss-contributor/issue-38

Conversation

@Rainyyyyyyy111

Copy link
Copy Markdown
Contributor

Fixes #38

SSHFileSystem inherits the no-op rmdir because _rmdir lacks a synchronous wrapper.

Wrap _rmdir for synchronous directory removal; cover plain, SSH and SFTP paths, missing directories and recursive removal.

Validation: the regression fails on the original code and passes with the fix; the configured test suite and checks pass.

AI-assisted with Codex; independently tested by OSS Contributor.

OSS-Contributor-Artifact: 679ddc0a35296cf762b24d17c4b87bdaba100df8da492fcf82efcb739ccd2836
@codecov-commenter

codecov-commenter commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.78%. Comparing base (15aac74) to head (2608949).
⚠️ Report is 30 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #85      +/-   ##
==========================================
+ Coverage   94.30%   97.78%   +3.47%     
==========================================
  Files          13       13              
  Lines         738     1130     +392     
==========================================
+ Hits          696     1105     +409     
+ Misses         42       25      -17     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

shcheklein and others added 2 commits November 29, 2026 09:39
The other filesystem tests live in test_sshfs.py, so the rmdir test
moves there from its own module, which had to import the fixtures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shcheklein

Copy link
Copy Markdown
Collaborator

Thanks for the fix! I merged main and moved the test into tests/test_sshfs.py, next to test_rm. The other filesystem tests live there, and the separate module had to import the fixtures from it. The test itself is unchanged.

The macOS jobs in the earlier CI run were cancelled after 15 minutes without a test failure. With main merged, the suite passes locally on asyncssh 2.24.1 and 2.24.2, and the test fails without the fix.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the fix connecting synchronous directory removal to its asynchronous implementation.

No open issues 🎉

What changed in this PR

Fixes #38 by connecting SSHFileSystem.rmdir() to its asynchronous implementation, replacing the inherited no-op behavior.

Changes:

  • Adds a synchronous wrapper for _rmdir.
  • Adds regression coverage for empty-directory removal, missing-directory errors, and recursive removal.
File Description
tests/​test_sshfs.py Adds regression tests for synchronous directory removal.
sshfs/​spec.py Exposes _rmdir through a synchronous rmdir wrapper.

Review effort: Balanced

@shcheklein
shcheklein merged commit 443361a into fsspec:main Nov 29, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

synchronous rmdir() fails silently

4 participants