<div dir="ltr">Hi,<br>With the PyQt6 cp310-abi3 wheels (6.11.0, and also the latest 6.12.0) on<br>CPython 3.14.7 (Windows x64), every PyQt6 method that returns None adds +1<br>to the raw refcount of None, and that +1 is never taken back. Methods that<br>return other values add nothing; True/False are not affected.<br>On Python 3.14, None starts at a refcount of 0xC0000000 and stays immortal<br>only while bit 31 is set, so there is a margin of 2**30 (~1.07e9). After<br>that many calls, None stops being immortal and the 3.14 interpreter starts<br>failing its own None checks. Every Python-level __init__ then raises:<br>    TypeError: __init__() should return None, not 'NoneType'<br>Logging, warnings, pandas etc. all break, and the process stays broken<br>until restart.<br>In practice this is reached in under 2 hours by the common pattern<br>    while w.isVisible():<br>        app.processEvents()<br>since every iteration is +1 (about 160k/s in our application).<br>My guess is that the abi3 .pyd files are compiled against pre-3.12 Python<br>headers, where Py_INCREF(Py_None) is a plain ob_refcnt++ that knows nothing<br>about immortal objects, while 3.14 never decrements immortal objects.<br>Building the abi3 wheels against Python >= 3.12 headers (still targeting<br>the 3.10 limited API) should fix it. PyAV 19 and protobuf fixed the same<br>problem this way.<br>The attached script shows the +1 per call in a few seconds; run it with<br>--full to reproduce the TypeError (about 5 minutes).<br>Output on my machine:<br>    Python 3.14.7, PyQt6 6.11.0, Qt 6.11.0<br>    None refcount at start: low32=0xc0000000 ob_overflow=0<br>    QPoint.setX()                  None refcount delta per call: +1.00<br>    QObject.setObjectName()        None refcount delta per call: +1.00<br>    QApplication.processEvents()   None refcount delta per call: +1.00<br>    QPoint.x()  [returns int]      None refcount delta per call: +0.00<br>Related CPython issue: <a href="https://github.com/python/cpython/issues/158401">https://github.com/python/cpython/issues/158401</a><br><span class="gmail-ng-star-inserted" style="box-sizing:border-box;color:rgb(27,27,30);font-family:Inter,sans-serif;font-size:14px">Best regards,</span><br class="gmail-ng-star-inserted" style="box-sizing:border-box;color:rgb(27,27,30);font-family:Inter,sans-serif;font-size:14px">Thanh Nguyen</div>