martindurant commented on a change in pull request #7545:
URL: https://github.com/apache/arrow/pull/7545#discussion_r450835383



##########
File path: python/pyarrow/fs.py
##########
@@ -63,6 +63,31 @@ def __getattr__(name):
     )
 
 
+def _ensure_filesystem(filesystem, use_mmap=False):
+    if isinstance(filesystem, FileSystem):
+        return filesystem
+
+    # handle fsspec-compatible filesystems
+    try:
+        import fsspec
+        if isinstance(filesystem, fsspec.AbstractFileSystem):

Review comment:
       Agree completely. So far, all implementations II know about are 
subclasses, but it's not required. I have not yet got around to implementing an 
entrypoints way to declare implementations. 
   So, you could try to look for some specific methods, but I'm not sure what 
we could guarantee was specific to fsspec.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to