fsspec / fsspec/filesystem_spec

spec: add sync/async connect/disconnect

Open
#865 0 comments 1 reaction 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

From discussion in #864

Currently, fsspec doesn't define any connect/disconnect methods in sync or async specs, which results in some implementations implementing things like set_session/connect/etc or even simply creating a connection automatically and using weakref to close it.

This issue is meant to try to start the discussion about the proper common API that all implementations could comply with.

  1. connect/disconnect (possible better names?) with async versions

  2. sync and async context managers?

  3. clearly automatic connection is a very handy thing and most of filesystems already do it. Please correct me if I'm wrong, but it looks like this is not documented (but I'm not sure if it even needs to be, since it is kinda given from the examples).

  4. a bit unrelated, but we currently use _ prefix for async methods, which looks unofficial to users and linters 🙂 Maybe time to also support async_ to make it official?

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 with the discussion in issue #864 and inspect the existing synchronous and asynchronous filesystem specifications. Define the common connect/disconnect API, context-manager expectations, automatic connection behavior, and possible async_ naming, with agreement on the resulting specification as done.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.