diff --git a/s3fs/core.py b/s3fs/core.py index 4e59997d..1777940d 100644 --- a/s3fs/core.py +++ b/s3fs/core.py @@ -1271,7 +1271,7 @@ async def _upload_chunk(chunk, part_number): return out async def _get_file( - self, rpath, lpath, callback=_DEFAULT_CALLBACK, version_id=None + self, rpath, lpath, callback=_DEFAULT_CALLBACK, version_id=None, **kwargs ): if os.path.isdir(lpath): return diff --git a/s3fs/tests/test_s3fs.py b/s3fs/tests/test_s3fs.py index ffbf3d3e..d3d90899 100644 --- a/s3fs/tests/test_s3fs.py +++ b/s3fs/tests/test_s3fs.py @@ -991,6 +991,15 @@ def test_get_file_with_callback(s3, tmpdir): assert cb.value == cb.size +def test_get_file_with_kwargs(s3, tmpdir): + test_file = str(tmpdir.join("test.json")) + + get_file_kwargs = {"max_concurency": 1, "random_kwarg": "value"} + s3.get_file( + test_bucket_name + "/test/accounts.1.json", test_file, **get_file_kwargs + ) + + @pytest.mark.parametrize("size", [2**10, 10 * 2**20]) def test_put_file_with_callback(s3, tmpdir, size): test_file = str(tmpdir.join("test.json"))