Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions python/pyarrow/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@


import os
import inspect
import posixpath
import sys
import urllib.parse
Expand Down Expand Up @@ -319,6 +318,10 @@ class DaskFileSystem(FileSystem):
"""

def __init__(self, fs):
warnings.warn(
"The pyarrow.filesystem.DaskFileSystem/S3FSWrapper are deprecated "
"as of pyarrow 3.0.0, and will be removed in a future version.",
DeprecationWarning, stacklevel=2)
self.fs = fs

@implements(FileSystem.isdir)
Expand Down Expand Up @@ -451,10 +454,6 @@ def _ensure_filesystem(fs):
# filesystems (which should be compatible with our legacy fs)
return fs

for mro in inspect.getmro(fs_type):
if mro.__name__ == 'S3FileSystem':
return S3FSWrapper(fs)

raise OSError('Unrecognized filesystem: {}'.format(fs_type))
else:
return fs
Expand Down
7 changes: 6 additions & 1 deletion python/pyarrow/tests/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -2223,9 +2223,14 @@ def test_read_partitioned_directory_s3fs_wrapper(
s3_example_s3fs, use_legacy_dataset
):
from pyarrow.filesystem import S3FSWrapper
import s3fs

if s3fs.__version__ >= LooseVersion("0.5"):
pytest.skip("S3FSWrapper no longer working for s3fs 0.5+")

fs, path = s3_example_s3fs
wrapper = S3FSWrapper(fs)
with pytest.warns(DeprecationWarning):
wrapper = S3FSWrapper(fs)
_partition_test_for_filesystem(wrapper, path)

# Check that we can auto-wrap
Expand Down