Python 3.14a7: Segfault in sip_api_init_module / _Py_TYPE

Florian Bruhin me at the-compiler.org
Sat Apr 12 21:13:12 BST 2025


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20250412/11752f1d/attachment.sig>


More information about the PyQt mailing list