Skip to content

AbstractFileSystem is not abstract #1446

Open
@TomNicholas

Description

@TomNicholas

I'm trying to learn more about how fsspec works (so I can better understand the IO part of the Pangeo stack), but I'm confused by the structure of fsspec/filesystem_spec.

Despite the name, it seems AbstractFileSystem is not an abstract base class (nor is AbstractBufferedFile) - I'm able to import and instantiate it directly. It contains lots of actual code that does things.

Neither is there a typing.Protocol that subclasses could conform to that could play the same role. (In fact there is no typing at all, which seems like an issue for a project whose purpose is to ensure interface compatibility. Wouldn't it help solve issues like #1411?)

Finally I can't find a written spec document either, at least not one that conforms to RFC 2119 like the Zarr Spec does for example. The fsspec documentation just points me to fsspec/spec.py.

As a new user / potential developer using fsspec, how am I supposed to know which parts of AbstractFileSystem are implementation details that can be overridden, and which are actual requirements? Is there some reason why this lack of a distinct specification doesn't cause problems in practice? Apologies if I have missed something here, I am new to this whole area.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions