Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
88 changes: 0 additions & 88 deletions docs/source/python/filesystems_deprecated.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/python/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ files into Arrow structures.
memory
ipc
filesystems
filesystems_deprecated
numpy
pandas
interchange_protocol
Expand Down
1 change: 0 additions & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,6 @@ set(CYTHON_EXTENSIONS
_csv
_feather
_fs
_hdfsio
_json
_pyarrow_cpp_tests)
set_source_files_properties(pyarrow/lib.pyx PROPERTIES CYTHON_API TRUE)
Expand Down
47 changes: 2 additions & 45 deletions python/pyarrow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,8 @@ def print_entry(label, value):
BufferReader, BufferOutputStream,
OSFile, MemoryMappedFile, memory_map,
create_memory_map, MockOutputStream,
input_stream, output_stream)

from pyarrow._hdfsio import HdfsFile, have_libhdfs
input_stream, output_stream,
have_libhdfs)

from pyarrow.lib import (ChunkedArray, RecordBatch, Table, table,
concat_arrays, concat_tables, TableGroupBy,
Expand All @@ -276,54 +275,12 @@ def print_entry(label, value):
ArrowTypeError,
ArrowSerializationError)

import pyarrow.hdfs as hdfs

from pyarrow.ipc import serialize_pandas, deserialize_pandas
import pyarrow.ipc as ipc

import pyarrow.types as types


# deprecated top-level access


from pyarrow.filesystem import FileSystem as _FileSystem
from pyarrow.filesystem import LocalFileSystem as _LocalFileSystem
from pyarrow.hdfs import HadoopFileSystem as _HadoopFileSystem


_localfs = _LocalFileSystem._get_instance()


_msg = (
"pyarrow.{0} is deprecated as of 2.0.0, please use pyarrow.fs.{1} instead."
)

_serialization_msg = (
"'pyarrow.{0}' is deprecated and will be removed in a future version. "
"Use pickle or the pyarrow IPC functionality instead."
)

_deprecated = {
"localfs": (_localfs, "LocalFileSystem"),
"FileSystem": (_FileSystem, "FileSystem"),
"LocalFileSystem": (_LocalFileSystem, "LocalFileSystem"),
"HadoopFileSystem": (_HadoopFileSystem, "HadoopFileSystem"),
}


def __getattr__(name):
if name in _deprecated:
obj, new_name = _deprecated[name]
_warnings.warn(_msg.format(name, new_name),
FutureWarning, stacklevel=2)
return obj

raise AttributeError(
"module 'pyarrow' has no attribute '{0}'".format(name)
)


# ----------------------------------------------------------------------
# Deprecations

Expand Down
Loading