/
usr
/
local
/
lib64
/
python3.6
/
site-packages
/
pyarrow
/
/usr/local/lib64/python3.6/site-packages/pyarrow
mkdir
upload
Name
Size
Mode
Actions
include/
-
0755
rm
includes/
-
0755
rm
tensorflow/
-
0755
rm
tests/
-
0755
rm
vendored/
-
0755
rm
__pycache__/
-
0755
rm
array.pxi
79609
0644
edit
dl
rm
benchmark.pxi
869
0644
edit
dl
rm
benchmark.py
856
0644
edit
dl
rm
builder.pxi
2688
0644
edit
dl
rm
cffi.py
2178
0644
edit
dl
rm
compat.pxi
1810
0644
edit
dl
rm
compat.py
1076
0644
edit
dl
rm
compute.py
22837
0644
edit
dl
rm
config.pxi
2613
0644
edit
dl
rm
csv.py
962
0644
edit
dl
rm
cuda.py
1087
0644
edit
dl
rm
dataset.py
33333
0644
edit
dl
rm
error.pxi
7807
0644
edit
dl
rm
feather.py
9258
0644
edit
dl
rm
filesystem.py
14468
0644
edit
dl
rm
flight.py
1794
0644
edit
dl
rm
fs.py
13444
0644
edit
dl
rm
gandiva.pyx
18447
0644
edit
dl
rm
hdfs.py
7527
0644
edit
dl
rm
io.pxi
64495
0644
edit
dl
rm
ipc.pxi
28821
0644
edit
dl
rm
ipc.py
8029
0644
edit
dl
rm
json.py
858
0644
edit
dl
rm
jvm.py
9593
0644
edit
dl
rm
lib.cpython-36m-x86_64-linux-gnu.so
3760528
0755
edit
dl
rm
lib.pxd
14442
0644
edit
dl
rm
lib.pyx
4373
0644
edit
dl
rm
libarrow.so.600
48162600
0755
edit
dl
rm
libarrow_dataset.so.600
2541120
0755
edit
dl
rm
libarrow_flight.so.600
12999784
0755
edit
dl
rm
libarrow_python.so.600
1848920
0755
edit
dl
rm
libarrow_python_flight.so.600
112728
0755
edit
dl
rm
libparquet.so.600
4458552
0755
edit
dl
rm
libplasma.so.600
251296
0755
edit
dl
rm
lib_api.h
19153
0644
edit
dl
rm
memory.pxi
7451
0644
edit
dl
rm
orc.py
5269
0644
edit
dl
rm
pandas-shim.pxi
7987
0644
edit
dl
rm
pandas_compat.py
42243
0644
edit
dl
rm
parquet.py
86844
0644
edit
dl
rm
plasma-store-server
482776
0755
edit
dl
rm
plasma.py
6075
0644
edit
dl
rm
public-api.pxi
12814
0644
edit
dl
rm
scalar.pxi
29182
0644
edit
dl
rm
serialization.pxi
19086
0644
edit
dl
rm
serialization.py
18202
0644
edit
dl
rm
table.pxi
72277
0644
edit
dl
rm
tensor.pxi
34311
0644
edit
dl
rm
types.pxi
79432
0644
edit
dl
rm
types.py
10381
0644
edit
dl
rm
util.py
5001
0644
edit
dl
rm
_compute.cpython-36m-x86_64-linux-gnu.so
717312
0755
edit
dl
rm
_compute.pxd
1149
0644
edit
dl
rm
_compute.pyx
41759
0644
edit
dl
rm
_csv.cpython-36m-x86_64-linux-gnu.so
312168
0755
edit
dl
rm
_csv.pxd
1602
0644
edit
dl
rm
_csv.pyx
39297
0644
edit
dl
rm
_cuda.pxd
1922
0644
edit
dl
rm
_cuda.pyx
34731
0644
edit
dl
rm
_dataset.cpython-36m-x86_64-linux-gnu.so
1080168
0755
edit
dl
rm
_dataset.pxd
1644
0644
edit
dl
rm
_dataset.pyx
120054
0644
edit
dl
rm
_dataset_orc.cpython-36m-x86_64-linux-gnu.so
52536
0755
edit
dl
rm
_dataset_orc.pyx
1345
0644
edit
dl
rm
_feather.cpython-36m-x86_64-linux-gnu.so
94280
0755
edit
dl
rm
_feather.pyx
3623
0644
edit
dl
rm
_flight.cpython-36m-x86_64-linux-gnu.so
1124664
0755
edit
dl
rm
_flight.pyx
93532
0644
edit
dl
rm
_fs.cpython-36m-x86_64-linux-gnu.so
469992
0755
edit
dl
rm
_fs.pxd
2484
0644
edit
dl
rm
_fs.pyx
40017
0644
edit
dl
rm
_generated_version.py
142
0644
edit
dl
rm
_hdfs.cpython-36m-x86_64-linux-gnu.so
127352
0755
edit
dl
rm
_hdfs.pyx
5471
0644
edit
dl
rm
_hdfsio.cpython-36m-x86_64-linux-gnu.so
208096
0755
edit
dl
rm
_hdfsio.pyx
13681
0644
edit
dl
rm
_json.cpython-36m-x86_64-linux-gnu.so
90616
0755
edit
dl
rm
_json.pyx
8406
0644
edit
dl
rm
_orc.cpython-36m-x86_64-linux-gnu.so
109776
0755
edit
dl
rm
_orc.pxd
2350
0644
edit
dl
rm
_orc.pyx
5151
0644
edit
dl
rm
_parquet.cpython-36m-x86_64-linux-gnu.so
507792
0755
edit
dl
rm
_parquet.pxd
22084
0644
edit
dl
rm
_parquet.pyx
47997
0644
edit
dl
rm
_plasma.cpython-36m-x86_64-linux-gnu.so
259168
0755
edit
dl
rm
_plasma.pyx
29495
0644
edit
dl
rm
_s3fs.cpython-36m-x86_64-linux-gnu.so
199496
0755
edit
dl
rm
_s3fs.pyx
11662
0644
edit
dl
rm
__init__.pxd
2195
0644
edit
dl
rm
__init__.py
21263
0644
edit
dl
rm
Edit:
/usr/local/lib64/python3.6/site-packages/pyarrow/error.pxi
(7807B)
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. from cpython.exc cimport PyErr_CheckSignals, PyErr_SetInterrupt from pyarrow.includes.libarrow cimport CStatus, IsPyError, RestorePyError from pyarrow.includes.common cimport c_string from contextlib import contextmanager import os import signal import threading from pyarrow.util import _break_traceback_cycle_from_frame class ArrowException(Exception): pass class ArrowInvalid(ValueError, ArrowException): pass class ArrowMemoryError(MemoryError, ArrowException): pass class ArrowKeyError(KeyError, ArrowException): def __str__(self): # Override KeyError.__str__, as it uses the repr() of the key return ArrowException.__str__(self) class ArrowTypeError(TypeError, ArrowException): pass class ArrowNotImplementedError(NotImplementedError, ArrowException): pass class ArrowCapacityError(ArrowException): pass class ArrowIndexError(IndexError, ArrowException): pass class ArrowSerializationError(ArrowException): pass class ArrowCancelled(ArrowException): def __init__(self, message, signum=None): super().__init__(message) self.signum = signum # Compatibility alias ArrowIOError = IOError # This function could be written directly in C++ if we didn't # define Arrow-specific subclasses (ArrowInvalid etc.) cdef int check_status(const CStatus& status) nogil except -1: if status.ok(): return 0 with gil: if IsPyError(status): RestorePyError(status) return -1 # We don't use Status::ToString() as it would redundantly include # the C++ class name. message = frombytes(status.message(), safe=True) detail = status.detail() if detail != nullptr: message += ". Detail: " + frombytes(detail.get().ToString(), safe=True) if status.IsInvalid(): raise ArrowInvalid(message) elif status.IsIOError(): # Note: OSError constructor is # OSError(message) # or # OSError(errno, message, filename=None) # or (on Windows) # OSError(errno, message, filename, winerror) errno = ErrnoFromStatus(status) winerror = WinErrorFromStatus(status) if winerror != 0: raise IOError(errno, message, None, winerror) elif errno != 0: raise IOError(errno, message) else: raise IOError(message) elif status.IsOutOfMemory(): raise ArrowMemoryError(message) elif status.IsKeyError(): raise ArrowKeyError(message) elif status.IsNotImplemented(): raise ArrowNotImplementedError(message) elif status.IsTypeError(): raise ArrowTypeError(message) elif status.IsCapacityError(): raise ArrowCapacityError(message) elif status.IsIndexError(): raise ArrowIndexError(message) elif status.IsSerializationError(): raise ArrowSerializationError(message) elif status.IsCancelled(): signum = SignalFromStatus(status) if signum > 0: raise ArrowCancelled(message, signum) else: raise ArrowCancelled(message) else: message = frombytes(status.ToString(), safe=True) raise ArrowException(message) # This is an API function for C++ PyArrow cdef api int pyarrow_internal_check_status(const CStatus& status) \ nogil except -1: return check_status(status) cdef class StopToken: cdef void init(self, CStopToken stop_token): self.stop_token = move(stop_token) cdef c_bool signal_handlers_enabled = True def enable_signal_handlers(c_bool enable): """ Enable or disable interruption of long-running operations. By default, certain long running operations will detect user interruptions, such as by pressing Ctrl-C. This detection relies on setting a signal handler for the duration of the long-running operation, and may therefore interfere with other frameworks or libraries (such as an event loop). Parameters ---------- enable : bool Whether to enable user interruption by setting a temporary signal handler. """ global signal_handlers_enabled signal_handlers_enabled = enable # For internal use # Whether we need a workaround for https://bugs.python.org/issue42248 have_signal_refcycle = (sys.version_info < (3, 8, 10) or (3, 9) <= sys.version_info < (3, 9, 5) or sys.version_info[:2] == (3, 10)) cdef class SignalStopHandler: cdef: StopToken _stop_token vector[int] _signals c_bool _enabled def __cinit__(self): self._enabled = False self._init_signals() if have_signal_refcycle: _break_traceback_cycle_from_frame(sys._getframe(0)) self._stop_token = StopToken() if not self._signals.empty(): self._stop_token.init(GetResultValue( SetSignalStopSource()).token()) self._enabled = True def _init_signals(self): if (signal_handlers_enabled and threading.current_thread() is threading.main_thread()): self._signals = [ sig for sig in (signal.SIGINT, signal.SIGTERM) if signal.getsignal(sig) not in (signal.SIG_DFL, signal.SIG_IGN, None)] def __enter__(self): if self._enabled: check_status(RegisterCancellingSignalHandler(self._signals)) return self def __exit__(self, exc_type, exc_value, exc_tb): if self._enabled: UnregisterCancellingSignalHandler() if isinstance(exc_value, ArrowCancelled): if exc_value.signum: # Re-emit the exact same signal. We restored the Python signal # handler above, so it should receive it. if os.name == 'nt': SendSignal(exc_value.signum) else: SendSignalToThread(exc_value.signum, threading.get_ident()) else: # Simulate Python receiving a SIGINT # (see https://bugs.python.org/issue43356 for why we can't # simulate the exact signal number) PyErr_SetInterrupt() # Maximize chances of the Python signal handler being executed now. # Otherwise a potential KeyboardInterrupt might be missed by an # immediately enclosing try/except block. PyErr_CheckSignals() # ArrowCancelled will be re-raised if PyErr_CheckSignals() # returned successfully. def __dealloc__(self): if self._enabled: ResetSignalStopSource() @property def stop_token(self): return self._stop_token
Save
cmd:
run