[Serialization] Update CloudPickle to 1.6.0 (#9694)

* update cloudpickle to 1.6.0

* fix CI timeout
This commit is contained in:
Siyuan (Ryans) Zhuang
2020-08-29 23:11:28 -07:00
committed by GitHub
parent e9b046306a
commit f0c3910d59
8 changed files with 521 additions and 936 deletions
+3 -1
View File
@@ -1,6 +1,5 @@
from libc.string cimport memcpy
from libc.stdint cimport uintptr_t, uint64_t, INT32_MAX
from libcpp cimport nullptr
import cython
DEF MEMCOPY_THREADS = 6
@@ -116,6 +115,9 @@ cdef class SubBuffer:
<const char*> self.buf, self.len)
def __getbuffer__(self, Py_buffer* buffer, int flags):
if flags & cpython.PyBUF_WRITABLE:
# Ray ensures all buffers are immutable.
raise BufferError
buffer.readonly = self.readonly
buffer.buf = self.buf
buffer.format = <char *>self._format.c_str()