question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

API: Clarify the type of AbstractFileSystem.protocol

See original GitHub issue

It seems like AbstractFileSystem.protocol can be either a str or a Tuple[str], for subclasses that use multiple proctocols like gcs or gs.

I think it’d be cleaner to have protocol always be a str, and add a property protocols for cases where we need to refer to them all.

def protocols(self) -> Tuple[str]:
    """A tuple of protocols for this FileSystem. Just `self.protocol` by default."""
    return (self.protocol,)

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jrbourbeaucommented, Nov 13, 2019

This is on my todo list for this week, thanks for outlining these steps @TomAugspurger!

Using __subclass_init__ would restrict fsspec to Python 3.6+ (which is fine by me as it seems several other packages in the community, e.g. pandas, dask, distributed, any packages that are following NEP 29, have all dropped support for 3.5). @martindurant @TomAugspurger do you have thoughts on dropping Python 3.5 here?

0reactions
TomAugspurgercommented, Nov 13, 2019

Dropping 3.5 is fine by me.

On Wed, Nov 13, 2019 at 11:38 AM James Bourbeau notifications@github.com wrote:

This is on my todo list for this week, thanks for outlining these steps @TomAugspurger https://github.com/TomAugspurger!

Using subclass_init would restrict fsspec to Python 3.6+ (which is fine by me as it seems several other packages in the community, e.g. pandas, dask, distributed, any packages that are following NEP 29 https://numpy.org/neps/nep-0029-deprecation_policy.html, have all dropped support for 3.5). @martindurant https://github.com/martindurant @TomAugspurger https://github.com/TomAugspurger do you have thoughts on dropping Python 3.5 here?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/intake/filesystem_spec/issues/179?email_source=notifications&email_token=AAKAOIXEH4PCUYINFTE7BWLQTQ3SFA5CNFSM4JKSDU3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED7ALMY#issuecomment-553518515, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKAOISD5MITLPRQBHF7MULQTQ3SFANCNFSM4JKSDU3A .

Read more comments on GitHub >

github_iconTop Results From Across the Web

API: Clarify the type of AbstractFileSystem.protocol · Issue #179
It seems like AbstractFileSystem.protocol can be either a str or a Tuple[str], for subclasses that use multiple proctocols like gcs or gs.
Read more >
API Reference — fsspec 2022.11.0+13.g0974514.dirty ...
Given a path or paths, return one OpenFile object. Parameters. urlpath: string or list. Absolute or relative filepath. Prefix with a protocol like...
Read more >
fsspec Documentation - Read the Docs
The only async implementation built into fsspec is HTTPFileSystem. 4.5.1 Synchronous API. The methods of AbstractFileSystem are available and can be called from ......
Read more >
Types Of API Calls & REST API Protocol - Stoplight
Discussing different types of APIs, alongside protocols and standards, such as Open APIs, Internal APIs, Partner APIs, Composite APIs, RESTFUL, JSON-RPC, XML- ...
Read more >
Filesystem Interface — Apache Arrow v10.0.1
PyArrow comes with an abstract filesystem interface, as well as concrete implementations for various storage types. The filesystem interface provides input ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found