From 7dc0c9d1f13fb9c8d849ed65a6dfe9e043ba755a Mon Sep 17 00:00:00 2001 From: Alexander Mazurov Date: Mon, 6 Oct 2025 00:25:41 +0200 Subject: [PATCH] Make WebHDFS ls() method compatible with newer JupyterFS by supporting **kwargs The current WebHDFS.ls() implementation does not accept additional parameters, which breaks compatibility with newer versions of JupyterFS (e.g., jupyterfs==1.1.0). Since we abstract filesystem interfaces, all common methods (such as ls, info, etc.) should accept **kwargs to ensure forward compatibility with upstream fsspec and JupyterFS expectations. For example, JupyterFS 1.1.0 calls fs.ls(..., refresh=True) internally, which raises: TypeError: WebHDFS.ls() got an unexpected keyword argument 'refresh' Reference: https://github.com/jpmorganchase/jupyter-fs/blob/6fac72f9a047871de48b757c5634317f88b5ac77/jupyterfs/manager/fsspec.py#L188 Proposed fix: - Update WebHDFS.ls() signature to accept **kwargs as it implemented for other filesystems (e.g. local) --- fsspec/implementations/webhdfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsspec/implementations/webhdfs.py b/fsspec/implementations/webhdfs.py index c6e0d8446..12cb23d1d 100644 --- a/fsspec/implementations/webhdfs.py +++ b/fsspec/implementations/webhdfs.py @@ -268,7 +268,7 @@ def info(self, path): info["name"] = path return self._process_info(info) - def ls(self, path, detail=False): + def ls(self, path, detail=False, **kwargs): out = self._call("LISTSTATUS", path=path) infos = out.json()["FileStatuses"]["FileStatus"] for info in infos: