Your message dated Mon, 21 Sep 2026 13:38:19 +0000
with message-id <[email protected]>
and subject line Bug#1144993: fixed in pyqt6 6.11.0-4
has caused the Debian Bug report #1144993,
regarding pyqt6: FTBFS building against python 3.15
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1144993: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1144993
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: src:pyqt6
Version: 6.11.0-2
User: [email protected]
Usertags: python3.15
Tags: patch
Hi!
While rebuilding the python related packages against the python version
3.15rc1 we found that pyqt6 fails to build from source[1]. This is due
to the removal of PyWeakref_GetObject which was deprecated in python
3.13. I'm attaching a patch that's almost identical to the one needed
for pyqt5.
Please consider applying this or a similar patch in your next upload.
Happy hacking,
[1]:
https://debusine.debian.net/debian/r-python-python3.15/work-request/1013759/
--
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/
Description: Fix build against Python 3.15 by using PyWeakref_GetRef
PyWeakref_GetObject was deprecated in Python 3.13 and removed in Python 3.15.
Replace its usage with PyWeakref_GetRef, properly handling strong references
and providing a compatibility fallback for older Python versions and limited API.
Author: Maximiliano Curia <[email protected]>
Forwarded: no
Last-Update: 2026-08-19
Index: pyqt6/qpy/QtCore/qpycore_pyqtslot.cpp
===================================================================
--- pyqt6.orig/qpy/QtCore/qpycore_pyqtslot.cpp
+++ pyqt6/qpy/QtCore/qpycore_pyqtslot.cpp
@@ -24,6 +24,40 @@
#include "qpycore_pyqtslot.h"
+#if PY_VERSION_HEX < 0x030D0000
+static inline int PyWeakref_GetRef(PyObject *ref, PyObject **pobj)
+{
+ PyObject *obj;
+
+ if (ref != NULL && !PyWeakref_Check(ref))
+ {
+ *pobj = NULL;
+ PyErr_SetString(PyExc_TypeError, "expected a weakref");
+ return -1;
+ }
+
+ obj = PyWeakref_GetObject(ref);
+ if (obj == NULL)
+ {
+ *pobj = NULL;
+ return -1;
+ }
+
+ if (obj == Py_None)
+ {
+ *pobj = NULL;
+ return 0;
+ }
+
+ Py_INCREF(obj);
+ *pobj = obj;
+ return 1;
+}
+#elif defined(Py_LIMITED_API) && Py_LIMITED_API < 0x030D0000
+extern "C" PyAPI_FUNC(int) PyWeakref_GetRef(PyObject *ref, PyObject **pobj);
+#endif
+
+
// Create the slot for a callable.
PyQtSlot::PyQtSlot(PyObject *callable, bool callable_is_method,
const Chimera::Signature *slot_signature)
@@ -45,6 +79,8 @@ PyQtSlot::PyQtSlot(PyObject *callable, b
// Try and create a weak reference to the instance object.
mself_wr = PyWeakref_NewRef(mself, 0);
+ if (!mself_wr)
+ PyErr_Clear();
}
else
{
@@ -96,9 +132,11 @@ PyQtSlot::Result PyQtSlot::invoke(void *
}
else
{
+ PyObject *self_ref = 0;
+
// Use the value we have if one wasn't supplied.
if (!self)
- self = instance();
+ self = self_ref = instance();
// If self is NULL then we didn't have a method in the first place.
// Instead we had a callable that has been cleared during garbage
@@ -108,12 +146,18 @@ PyQtSlot::Result PyQtSlot::invoke(void *
// See if the instance has gone (which isn't an error).
if (self == Py_None)
+ {
+ Py_XDECREF(self_ref);
return PyQtSlot::Ignored;
+ }
// If the receiver wraps a C++ object then ignore the call if it no
// longer exists.
if (!no_receiver_check && PyObject_TypeCheck(self, sipSimpleWrapper_Type) && !sipGetAddress((sipSimpleWrapper *)self))
+ {
+ Py_XDECREF(self_ref);
return PyQtSlot::Ignored;
+ }
sipMethodDef callable_m;
@@ -121,6 +165,8 @@ PyQtSlot::Result PyQtSlot::invoke(void *
callable_m.pm_self = self;
callable = sipFromMethod(&callable_m);
+
+ Py_XDECREF(self_ref);
}
// Convert the C++ arguments to Python objects.
@@ -181,7 +227,12 @@ bool PyQtSlot::operator==(PyObject *call
if (other)
return false;
- return (mfunc == callable_m.pm_function && instance() == callable_m.pm_self);
+ PyObject *self = instance();
+ bool match = (mfunc == callable_m.pm_function && self == callable_m.pm_self);
+
+ Py_XDECREF(self);
+
+ return match;
}
if (!other)
@@ -207,8 +258,19 @@ PyObject *PyQtSlot::instance() const
{
// Use the weak reference if possible.
if (mself_wr)
- return PyWeakref_GetObject(mself_wr);
+ {
+ PyObject *obj = 0;
+
+ if (PyWeakref_GetRef(mself_wr, &obj) < 0)
+ {
+ PyErr_Clear();
+ return 0;
+ }
+
+ return obj;
+ }
+ Py_XINCREF(mself);
return mself;
}
signature.asc
Description: PGP signature
--- End Message ---
--- Begin Message ---
Source: pyqt6
Source-Version: 6.11.0-4
Done: Dmitry Shachnev <[email protected]>
We believe that the bug you reported is fixed in the latest version of
pyqt6, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Dmitry Shachnev <[email protected]> (supplier of updated pyqt6 package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Mon, 21 Sep 2026 10:40:53 +0300
Source: pyqt6
Architecture: source
Version: 6.11.0-4
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <[email protected]>
Changed-By: Dmitry Shachnev <[email protected]>
Closes: 1144993
Changes:
pyqt6 (6.11.0-4) unstable; urgency=medium
.
* More Python 3.15 changes (thanks Maximiliano Curia, closes: #1144993):
- Cast Py_TYPE argument to PyObject *.
- Target limited ABI version 3.13 when building for >= 3.15.
Checksums-Sha1:
ffa99e87d29fe8703877be5d04badddd8d605250 4250 pyqt6_6.11.0-4.dsc
46ffe8caf1051035cea304dbb2bb397b0c4cd7d2 10916 pyqt6_6.11.0-4.debian.tar.xz
87286301cc15c511f68154fbfbc80dff2df9a159 23416 pyqt6_6.11.0-4_source.buildinfo
Checksums-Sha256:
fe9cd92b94be7ffbb5cbf550bdb73c2cbc29207898df77cf34a1a9ed751142e6 4250
pyqt6_6.11.0-4.dsc
5c43a7893a8eee7b14986494cdd8791162fab2bbb876df927812e408ce9d227f 10916
pyqt6_6.11.0-4.debian.tar.xz
e142e5f995f053fc5ed2610eb0e44289e6f8968ebf78467ce60ffcd8813ad993 23416
pyqt6_6.11.0-4_source.buildinfo
Files:
b923b406eddd283ebceffc5773bc0d92 4250 python optional pyqt6_6.11.0-4.dsc
be2822a2bc19eea56eecf64ba48f84fe 10916 python optional
pyqt6_6.11.0-4.debian.tar.xz
3bde79724ca559196238f0a007d8ffa5 23416 python optional
pyqt6_6.11.0-4_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJHBAEBCgAxFiEE8kKZ/xu8kBi5BqTLYCaTbS8ciuAFAmqxLbITHG1pdHlhNTdA
ZGViaWFuLm9yZwAKCRBgJpNtLxyK4LMBEACZ0iQ5C2lffm7g5BE2+JIK62xNOQ6p
zTsRfAoS9ZcOTeiCp4yfN8ERtmTcYDeO3WaUPaJ6SFcG2iTCOUur5v8Feozk5+l1
NjXWdShVNgvrTF6KiRujF55isK/KeyXk4cxZI1qqX8yhKbqU3EWEyutoTLdkVyou
V0jSjM4ZtVuQsSq0E5xnNOD+TdBwNH4ZVaerFDu5/QV2A/Ewd5CkYW6DsG3lLlUt
1XRkY00Zf08w3eCDtqmE3ODUJdRSpWEb5WIiq7POloR9B4pNv4WhpYKXu6cPjQQR
k8rwcIYCM1LXqnAjS+YjCBh88rcARP0inwdWw83RmhDqdRpjut6L6Hy2coBtIjqs
+AFAuPEIP2KCg3HLqTuUgkZ3AAbUuxkoFBtpIdZuhDTtA/Jz2GdOP/ZOf2Cp63po
Wox9SCTUcNkiTP0wScYE48cKMPAnn8b3HlA54TWOu2hb4zdG6D7TyggBPDOaQjrO
IdzM2pe49HA+xOxNwJ9Lu1paKgfcGXrxYochkHGvIZEdpLus5MOxzGVvjt4st8US
LBPkEXrFoKQAjP8/P5n1Rj89SdJJxcHe5pLy4sAMhDcIedr2miB1Lqh31ZE6aBDT
YomwbD+MhCtf+D+DW4dXz8XqGYRyon632bXjm48a2YTTOF2YDXJQZywfMdAOLG4X
V+msJl4tgjwqgA==
=YFxU
-----END PGP SIGNATURE-----
pgpZcrRVCoGxk.pgp
Description: PGP signature
--- End Message ---