Skip to content

Report DirFileSystem async support from its backend - #2213

Merged
martindurant merged 1 commit into
fsspec:masterfrom
charan-rathore:fix-1709-dirfs-async-impl
Oct 1, 2026
Merged

martindurant merged 1 commit into
fsspec:masterfrom
charan-rathore:fix-1709-dirfs-async-impl

Conversation

@charan-rathore

Copy link
Copy Markdown
Contributor

DirFileSystem inherits async_impl=True from AsyncFileSystem even when it wraps a synchronous filesystem. That makes instance capability checks report support the wrapped filesystem does not provide.

Set async_impl on each DirFileSystem instance from its backend, following the direction discussed in #1709. This leaves asynchronous context validation unchanged and keeps True for async backends, including those used through their synchronous interface.

Regression tests cover memory, local and nested directory backends, plus AsyncFileSystemWrapper over memory in both sync and async contexts. They also exercise file reads and writes. Add a changelog entry.

Addresses #1709. This does not change cache filesystem behavior or revise the broader async documentation questions in that issue.

Validation:

Fresh clone with an editable install on Python 3.12:

  • Baseline regressions: 3 failed, 2 passed (memory/local/nested dir falsely report async support).
  • Patched DirFileSystem, async wrapper and cache suites: 309 passed, 32 skipped.
  • Ruff 0.14.3 check and format checks pass. git diff --check passes.
  • Broader downstream/service integration tests not run; repository guidance says backend-focused tests suffice locally. Skips reflect optional backend dependencies.

@martindurant
martindurant merged commit b8b0109 into fsspec:master Oct 1, 2026
11 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.

2 participants