EnricoMi commented on code in PR #47339: URL: https://github.com/apache/arrow/pull/47339#discussion_r2292779781
########## python/pyarrow/_parquet_encryption.pyx: ########## @@ -28,6 +28,12 @@ from pyarrow.lib cimport _Weakrefable from pyarrow.lib import tobytes, frombytes +cdef extern from "Python.h": + # To let us get a PyObject* and avoid Cython auto-ref-counting + PyObject* PyBytes_FromStringAndSizeNative" PyBytes_FromStringAndSize"( + char *v, Py_ssize_t len) except NULL Review Comment: Importing `PyBytes_FromStringAndSize` via `from cpython.bytes cimport PyBytes_FromStringAndSize` works. I have copied this from `io.pxi`, maybe it is not needed there as well / any more: https://github.com/apache/arrow/blob/cdc14591248fcd7f6b6aa8005885a2dc817c4ccb/python/pyarrow/io.pxi#L43-L46 -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org