Repository: fsspec/filesystem_spec

Issue:
info('/') doesn't seem to match ls('/') -- zip+http archive
Hi, I notice that the info method doesn't seem to be behaving as I would have expected expected (["returns a single dictionary, with exactly the same information as ``ls`` would with ``detail=True``."](https://github.com/fsspec/filesystem_spec/blob/b5b7429403447b058147f4c2528259131da064b8/fsspec/spec.py#L586)) with either 'zip' or 'libarchive' as shown below. Ultimately, I'm trying to leverage pyarrow's dataset via pyarrow's FSSpecHandler, the latter of which [calls fsspec.info('/')](https://github.com/apache/arrow/blob/7b5912deea1c0fc8e2ac801b99d2448f387fa98e/python/pyarrow/fs.py#L314) and returns FileNotFoundError in this case.

Is the below expected, or is a change needed so that info() on the root path returns the root file list, assuming that's reasonable?

Thank you!

```python
#!/usr/bin/env python3

import fsspec

sample_file = (
    "https://firstratedata.com/_data/_deploy/stocks-complete_bundle_sample.zip"
)
fsspec_fs = fsspec.filesystem("zip", fo=fsspec.open(sample_file))

fsspec_fs.ls("/")
# [
#     "AAPL_1hour_sample.txt",
#     "AAPL_1min_sample.txt",
#     "AAPL_30min_sample.txt",
#     "AAPL_5min_sample.txt",
#     ...
# ]

fsspec_fs.info("/")
# Traceback (most recent call last):
#   File "/fsspec_test.py", line 31, in <module>
#     fsspec_fs.info("/")
#   File "/.pyenv/versions/3.8.2/lib/python3.8/site-packages/fsspec/archive.py", line 44, in info
#     raise FileNotFoundError(path)
# FileNotFoundError
```

Comments:

Patch:
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
index 3044529..af54daa 100644
--- a/.github/workflows/main.yaml
+++ b/.github/workflows/main.yaml
@@ -13,7 +13,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        TOXENV: [py37, py38, py39, s3fs, gcsfs]
+        TOXENV: [py38, py39, py310, s3fs, gcsfs]
 
     env:
       TOXENV: ${{ matrix.TOXENV }}
@@ -42,7 +42,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        TOXENV: [py38]
+        TOXENV: [py39]
 
     env:
       TOXENV: ${{ matrix.TOXENV }}
diff --git a/fsspec/archive.py b/fsspec/archive.py
index f83d040..07d169e 100644
--- a/fsspec/archive.py
+++ b/fsspec/archive.py
@@ -34,6 +34,8 @@ class AbstractArchiveFileSystem(AbstractFileSystem):
     def info(self, path, **kwargs):
         self._get_dirs()
         path = self._strip_protocol(path)
+        if path in {"", "/"} and self.dir_cache:
+            return {"name": "/", "type": "directory", "size": 0}
         if path in self.dir_cache:
             return self.dir_cache[path]
         elif path + "/" in self.dir_cache:
diff --git a/tox.ini b/tox.ini
index e33159c..09abb6c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
 # content of: tox.ini , put in same dir as setup.py
 [tox]
-envlist = {py37,py38,py39}
+envlist = {py38,py39,py310}
 
 [core]
 conda_channels=
@@ -41,7 +41,6 @@ conda_deps=
 deps=
     hadoop-test-cluster==0.1.0
     smbprotocol
-    py37: importlib_metadata
 
 [testenv]
 description=Run test suite against target versions.


Test patch:
diff --git a/fsspec/implementations/tests/test_zip.py b/fsspec/implementations/tests/test_zip.py
index 0aab4a2..6be4013 100644
--- a/fsspec/implementations/tests/test_zip.py
+++ b/fsspec/implementations/tests/test_zip.py
@@ -39,3 +39,10 @@ def test_not_cached():
         fs = fsspec.filesystem("zip", fo=z)
         fs2 = fsspec.filesystem("zip", fo=z)
         assert fs is not fs2
+
+
+def test_root_info():
+    with tempzip(archive_data) as z:
+        fs = fsspec.filesystem("zip", fo=z)
+        assert fs.info("/") == {"name": "/", "type": "directory", "size": 0}
+        assert fs.info("") == {"name": "/", "type": "directory", "size": 0}