Python 3.14a7: Segfault in sip_api_init_module / _Py_TYPE

Phil Thompson phil at riverbankcomputing.com
Sun Apr 13 09:21:41 BST 2025


On 12/04/2025 21:13, Florian Bruhin wrote:
> On 2025-04-11T20:57:32 , Phil Thompson wrote:
>> 
>> On 11/04/2025 16:15, Florian Bruhin wrote:
>> > Hey,
>> >
>> > PyQt6 6.9.0 seemed to work fine with Python 3.14 Alpha 6 so far.
>> > However, after upgrading to Alpha 7, "from PyQt6.QtCore" immediately
>> > segfaults:
>> >
>> >     [...]
>> >
>> > I bisected this to this change in CPython, "Cache the result of
>> > tuple_hash", which adds a new ob_hash field to PyTupleObject:
>> >
>> > https://github.com/python/cpython/pull/131529
>> > https://github.com/python/cpython/commit/8614f86b7163b1c39798b481902dbb511292a537
>> >
>> > I'm not sure what happens there under the hood. Is there anything
>> > special PyQt/sip is doing there, or is this simply some sort of CPython
>> > regression in that commit? Happy to report it there, but I don't know
>> > much about the CPython C API at all.
>> >
>> > Florian
>> 
>> Just by visual inspection of the code, I think the sequence of calls
>> is...
>> 
>> [...]
>> 
>> ...so I don't think I'm doing anything bad.
>> 
>> Phil
> 
> Thanks, I opened a CPython issue here:
> https://github.com/python/cpython/issues/132454
> 
> Florian

A quick check - I assume you are building PyQt6.sip from source against 
the Alpha 7 headers.

Phil


More information about the PyQt mailing list