raulcd commented on code in PR #48259:
URL: https://github.com/apache/arrow/pull/48259#discussion_r2569519813


##########
python/pyarrow/_cuda.pyx:
##########
@@ -460,9 +460,14 @@ cdef class CudaBuffer(Buffer):
         """
         import ctypes
         from numba.cuda.cudadrv.driver import MemoryPointer
-        return MemoryPointer(self.context.to_numba(),
-                             pointer=ctypes.c_void_p(self.address),
-                             size=self.size)
+        try:
+            return MemoryPointer(self.context.to_numba(),
+                                 pointer=ctypes.c_void_p(self.address),
+                                 size=self.size)
+        except TypeError:
+            # Newer Numba does not take a context argument anymore
+            return MemoryPointer(pointer=ctypes.c_void_p(self.address),
+                                 size=self.size)

Review Comment:
   I can't find this API change on the numba.cuda code nor the official 
documentation, is the API change not taking the context argument?
   
https://github.com/numba/numba/blob/3ccf80a7f902738e4433e21669a8deadf13ac028/numba/cuda/cudadrv/driver.py#L1939
   
https://numba.readthedocs.io/en/stable/cuda/external-memory.html#numba.cuda.MemoryPointer



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to