Repository: fsspec/gcsfs (python)

Issue:
__init__() got multiple values for keyword argument 'listings_expiry_time'
fsspec says you can use `listings_expiry_time` when creating a filesystem: https://github.com/fsspec/filesystem_spec/blob/e180aa859ef081215882b2d1b67d4bc33c040330/fsspec/spec.py#L126

But:
```
>>> fsspec.filesystem('gs', listings_expiry_time=60)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jobevers/.../lib/python3.7/site-packages/fsspec/registry.py", line 252, in filesystem
    return cls(**storage_options)
  File "/home/jobevers/.../lib/python3.7/site-packages/fsspec/spec.py", line 76, in __call__
    obj = super().__call__(*args, **kwargs)
  File "/home/jobevers/.../lib/python3.7/site-packages/gcsfs/core.py", line 280, in __init__
    **kwargs,
TypeError: __init__() got multiple values for keyword argument 'listings_expiry_time'
```



Pull request description:
Cache expiry duplicated
Fixes #544

Patch:
diff --git a/gcsfs/core.py b/gcsfs/core.py
index 6290730..6f7435f 100644
--- a/gcsfs/core.py
+++ b/gcsfs/core.py
@@ -284,9 +284,10 @@ class GCSFileSystem(AsyncFileSystem):
         version_aware=False,
         **kwargs,
     ):
+        if cache_timeout:
+            kwargs["listings_expiry_time"] = cache_timeout
         super().__init__(
             self,
-            listings_expiry_time=cache_timeout,
             asynchronous=asynchronous,
             loop=loop,
             **kwargs,


Test patch:
diff --git a/gcsfs/tests/test_core.py b/gcsfs/tests/test_core.py
index 0d5c4a3..7fce5ec 100644
--- a/gcsfs/tests/test_core.py
+++ b/gcsfs/tests/test_core.py
@@ -1364,3 +1364,10 @@ def test_multiglob(gcs):
     assert gcs.ls(gparent, detail=False) == [f"{root}/t1/t2/t3"]
     gcs.glob(ggparent + "/")
     assert gcs.ls(gparent, detail=False) == [f"{root}/t1/t2/t3"]
+
+
+def test_expiry_keyword():
+    gcs = GCSFileSystem(listings_expiry_time=1, token="anon")
+    assert gcs.dircache.listings_expiry_time == 1
+    gcs = GCSFileSystem(cache_timeout=1, token="anon")
+    assert gcs.dircache.listings_expiry_time == 1