fsspec / fsspec/filesystem_spec

open_local not returning the file handle

Open
#1,109 0 comments 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

The doc for open_local says "Open file(s) which can be resolved to local". But looking at the source-code then it returns a local file paths.

I find this a little misleading. I thought open..() means, it returns a (local) file handle. And looking at the source-code, then it calls open_files() and actually opens the file(s), but it is not returning it.

May I suggest to either rename the function, or return the local file handle (my preference)

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

Read the open_local documentation and its implementation in fsspec/core.py, including the use of open_files(). Resolve whether the API should return paths or handles, then update the chosen contract and add or adjust coverage so the documented return value is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.