fboudra opened a new pull request, #51372: URL: https://github.com/apache/arrow/pull/51372
### Rationale for this change https://github.com/apache/arrow/issues/50398 https://github.com/apache/arrow/issues/50829 ### What changes are included in this PR? First in the series: it replaces macro and struct-field access in python/pyarrow/src/arrow/python/ with the equivalent public C API calls, which are also part of the stable API: - PyBytes_AS_STRING / PyBytes_GET_SIZE become PyBytes_AsString / PyBytes_Size - PyByteArray_AS_STRING / PyByteArray_GET_SIZE become PyByteArray_AsString / PyByteArray_Size - Py_TYPE(obj)->tp_name is replaced with helper functions (PyObject_StdStringTypeName) and PyObject_GetAttrString The calls are plain CPython API, so nothing changes for a normal full API build. No build flags are touched in this PR, which makes it reviewable as a straight behavior-preserving change: configure and test exactly as before. Also included, found while going through the files: a shadowed variable in AppendUTF32, a missing extension path in the MonthDayNano conversion, and the MonthDayNano docstring. Verification: local build plus the python/pyarrow test suite, both green. ### Are these changes tested? Yes ### Are there any user-facing changes? No ### Was AI used for this PR? **PR code and description written by:** - [x ] Human - [ ] AI **Reviewed before submission by:** - [ x] Human - [ ] AI - [ ] Not reviewed -- 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]
