diff --git a/python/rmm/rmm/_lib/device_buffer.pyx b/python/rmm/rmm/_lib/device_buffer.pyx index 3ce10c5f6..bbeaa614e 100644 --- a/python/rmm/rmm/_lib/device_buffer.pyx +++ b/python/rmm/rmm/_lib/device_buffer.pyx @@ -14,7 +14,7 @@ import numpy as np cimport cython -from cpython.bytes cimport PyBytes_AS_STRING, PyBytes_FromStringAndSize +from cpython.bytes cimport PyBytes_FromStringAndSize from libc.stdint cimport uintptr_t from libcpp.memory cimport unique_ptr from libcpp.utility cimport move @@ -314,7 +314,7 @@ cdef class DeviceBuffer: cdef size_t s = dbp.size() cdef bytes b = PyBytes_FromStringAndSize(NULL, s) - cdef unsigned char* p = PyBytes_AS_STRING(b) + cdef unsigned char* p = b cdef unsigned char[::1] mv = (p)[:s] self.copy_to_host(mv, stream)