Skip to content

test: handle FileNotFoundError from archive ls in TestFileSet - #437

Merged
olemke merged 1 commit into
atmtools:masterfrom
olemke:fix-fspec-error
Oct 28, 2026
Merged

olemke merged 1 commit into
atmtools:masterfrom
olemke:fix-fspec-error

Conversation

@olemke

@olemke olemke commented Oct 28, 2026

Copy link
Copy Markdown
Member

With fsspec >= 2026.9.0, archive filesystems raise FileNotFoundError when listing a path that is not present in the archive, instead of returning an empty listing. This broke the zip-parametrized TestFileSet tests, because _refdir_for_fs lists the test files directory to decide whether to strip a leading separator or a Windows drive prefix. This PR makes the helper tolerant of both behaviors and cleans up the fallback logic so zip entries, which never contain a drive letter, resolve correctly.

fsspec 2026.9.0 raises FileNotFoundError for paths missing from
an archive instead of returning an empty listing. The zip tests on
Windows relied on the empty listing to strip the drive prefix from
the testfiles path, so catch the exception and keep the existing
fallback. Zip entries never contain the drive letter, so the
resulting path handling is otherwise unchanged.
@olemke
olemke merged commit dbc6635 into atmtools:master Oct 28, 2026
9 checks passed
@olemke
olemke deleted the fix-fspec-error branch October 28, 2026 12:38
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.

1 participant