API: Clarify the type of AbstractFileSystem.protocol
See original GitHub issueIt 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:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is on my todo list for this week, thanks for outlining these steps @TomAugspurger!
Using
__subclass_init__
would restrictfsspec
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?Dropping 3.5 is fine by me.
On Wed, Nov 13, 2019 at 11:38 AM James Bourbeau notifications@github.com wrote: