Commits


Lysandros Nikolaou authored and GitHub committed 894f72f735c
GH-43536: [Python] Do not use borrowed references APIs (#43540) ### Rationale for this change For better reference safety under Python free-threaded builds (i.e. with the GIL removed), we should be using `Py(List|Dict)_GetItemRef` that return strong references and are implemented in a thread-safe manner. ### What changes are included in this PR? - Vendor a copy of https://github.com/python/pythoncapi-compat - Port to strong reference APIs for lists and dicts ### Are these changes tested? I ran the tests with the free-threaded build before and after, and there's the same expected failures. * GitHub Issue: #43536 Lead-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <antoine@python.org>