Skip to content

[Python][C++] Python 3.15 Builds Fail due to PyWeakref_GET_OBJECT Removal #47823

@p-vdp

Description

@p-vdp

Describe the bug, including details regarding any error messages, version, and platform.

Python v3.15.0a1 is out, and after building it from source I'm trying to build pyarrow from apache-arrow-22.0.0-rc0.

I'm following the same steps to build pyarrow that I've used successfully on Python 3.14.0.

Here's the error output:

234.8       /root/builds/arrow/python/pyarrow/src/arrow/python/extension_type.cc:
234.8       In member function ‘PyObject* arrow::py::PyExtensionType::GetInstance()
234.8       const’:
234.8       /root/builds/arrow/python/pyarrow/src/arrow/python/extension_type.cc:167:20:
234.8       error: ‘PyWeakref_GET_OBJECT’ was not declared in this scope
234.8         167 |   PyObject* inst = PyWeakref_GET_OBJECT(type_instance_.obj());
234.8             |                    ^~~~~~~~~~~~~~~~~~~~
234.8       gmake[2]: *** [CMakeFiles/arrow_python.dir/build.make:160:
234.8       CMakeFiles/arrow_python.dir/pyarrow/src/arrow/python/extension_type.cc.o]
234.8       Error 1
234.8       gmake[2]: *** Waiting for unfinished jobs....
234.8       gmake[1]: *** [CMakeFiles/Makefile2:126:
234.8       CMakeFiles/arrow_python.dir/all] Error 2
234.8       gmake: *** [Makefile:136: all] Error 2
234.8       error: command '/usr/bin/cmake' failed with exit code 2

I'm running this in Docker on Ubuntu 24.04, it's available as the next image here.

Component(s)

Python, C++

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions