Ejemplo n.º 1
0
def _deprecate_scalar(ty, symbol):
    return _deprecate_class("{}Value".format(ty), symbol, "1.0.0")
Ejemplo n.º 2
0
get_tensor_size = _deprecate_api("get_tensor_size", "ipc.get_tensor_size",
                                 ipc.get_tensor_size, "0.17.0")

open_stream = _deprecate_api("open_stream", "ipc.open_stream", ipc.open_stream,
                             "0.17.0")

open_file = _deprecate_api("open_file", "ipc.open_file", ipc.open_file,
                           "0.17.0")


def _deprecate_scalar(ty, symbol):
    return _deprecate_class("{}Value".format(ty), symbol, "1.0.0")


ArrayValue = _deprecate_class("ArrayValue", Scalar, "1.0.0")
NullType = _deprecate_class("NullType", NullScalar, "1.0.0")

BooleanValue = _deprecate_scalar("Boolean", BooleanScalar)
Int8Value = _deprecate_scalar("Int8", Int8Scalar)
Int16Value = _deprecate_scalar("Int16", Int16Scalar)
Int32Value = _deprecate_scalar("Int32", Int32Scalar)
Int64Value = _deprecate_scalar("Int64", Int64Scalar)
UInt8Value = _deprecate_scalar("UInt8", UInt8Scalar)
UInt16Value = _deprecate_scalar("UInt16", UInt16Scalar)
UInt32Value = _deprecate_scalar("UInt32", UInt32Scalar)
UInt64Value = _deprecate_scalar("UInt64", UInt64Scalar)
HalfFloatValue = _deprecate_scalar("HalfFloat", HalfFloatScalar)
FloatValue = _deprecate_scalar("Float", FloatScalar)
DoubleValue = _deprecate_scalar("Double", DoubleScalar)
ListValue = _deprecate_scalar("List", ListScalar)
Ejemplo n.º 3
0
localfs = LocalFileSystem.get_instance()

# Entry point for starting the plasma store


def _plasma_store_entry_point():
    """Entry point for starting the plasma store.

    This can be used by invoking e.g.
    ``plasma_store -s /tmp/plasma -m 1000000000``
    from the command line and will start the plasma_store executable with the
    given arguments.
    """
    import os
    import pyarrow
    import subprocess
    import sys
    plasma_store_executable = os.path.join(pyarrow.__path__[0], "plasma_store")
    process = subprocess.Popen([plasma_store_executable] + sys.argv[1:])
    process.wait()


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

from pyarrow.util import _deprecate_class

# Backwards compatibility with pyarrow < 0.6.0
HdfsClient = _deprecate_class('HdfsClient', 'pyarrow.hdfs.connect',
                              hdfs.connect, '0.6.0')
Ejemplo n.º 4
0
def _plasma_store_entry_point():
    """Entry point for starting the plasma store.

    This can be used by invoking e.g.
    ``plasma_store -s /tmp/plasma -m 1000000000``
    from the command line and will start the plasma_store executable with the
    given arguments.
    """
    import os
    import pyarrow
    import subprocess
    import sys
    plasma_store_executable = os.path.join(pyarrow.__path__[0], "plasma_store")
    process = subprocess.Popen([plasma_store_executable] + sys.argv[1:])
    process.wait()


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

from pyarrow.util import _deprecate_class

FixedSizeBufferOutputStream = (_deprecate_class('FixedSizeBufferOutputStream',
                                                'FixedSizeBufferWriter',
                                                FixedSizeBufferWriter,
                                                '0.7.0'))

# Backwards compatibility with pyarrow < 0.6.0
HdfsClient = _deprecate_class('HdfsClient', 'pyarrow.hdfs.connect',
                              hdfs.connect, '0.6.0')
Ejemplo n.º 5
0
from pyarrow.ipc import (Message, MessageReader, RecordBatchFileReader,
                         RecordBatchFileWriter, RecordBatchStreamReader,
                         RecordBatchStreamWriter, read_message,
                         read_record_batch, read_tensor, write_tensor,
                         get_record_batch_size, get_tensor_size, open_stream,
                         open_file, serialize_pandas, deserialize_pandas)

localfs = LocalFileSystem.get_instance()

# ----------------------------------------------------------------------
# 0.4.0 deprecations

from pyarrow.util import _deprecate_class

FileReader = _deprecate_class('FileReader', 'RecordBatchFileReader',
                              RecordBatchFileReader, '0.5.0')

FileWriter = _deprecate_class('FileWriter', 'RecordBatchFileWriter',
                              RecordBatchFileWriter, '0.5.0')

StreamReader = _deprecate_class('StreamReader', 'RecordBatchStreamReader',
                                RecordBatchStreamReader, '0.5.0')

StreamWriter = _deprecate_class('StreamWriter', 'RecordBatchStreamWriter',
                                RecordBatchStreamWriter, '0.5.0')

InMemoryOutputStream = _deprecate_class('InMemoryOutputStream',
                                        'BufferOutputStream',
                                        BufferOutputStream, '0.5.0')

# Backwards compatibility with pyarrow < 0.6.0