fsspec / fsspec/filesystem_spec

Implementation mkdir not accepting AbstractFileSystem parameters

Open
#792 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.4k
Forks
490
Avg merge
2d 3h
Merged PRs (30d)
38

Description

Some implementations (such as SFTPFileSystem) do not accept create_parents parameter, which is part of the AbstractFileSystem specification for mkdir. While this is OK for typical use cases, it breaks the abstraction logic for users of fsspec.

An example issue appears when these implementation classes are used together with pyarrow's PyFileSystem. FSSpecHandler translates its create_dir(self, path, recursive) calls into mkdir(path, create_parents=recursive) following AbstractFileSystem standards and it fails due to missing parameter in implementation.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing AbstractFileSystem.mkdir with SFTPFileSystem.mkdir and other filesystem implementations, then trace how pyarrow's FSSpecHandler.create_dir calls mkdir. Done means implementations accept the AbstractFileSystem mkdir parameters and the PyFileSystem integration no longer fails when creating directories recursively.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.