Your message dated Sat, 22 Aug 2026 22:05:17 +0000
with message-id <[email protected]>
and subject line Bug#1144993: fixed in pyqt6 6.11.0-3
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-3
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: Sun, 23 Aug 2026 00:38:22 +0300
Source: pyqt6
Architecture: source
Version: 6.11.0-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <[email protected]>
Changed-By: Dmitry Shachnev <[email protected]>
Closes: 1144993
Changes:
pyqt6 (6.11.0-3) unstable; urgency=medium
.
* Backport upstream patch to support Python 3.15 (closes: #1144993).
* Update extension suffixes for SIP 6.16.1.
* Update to debhelper compat level 14.
- Remove explicit ${*:Depends} declarations.
Checksums-Sha1:
3600fb98d56427b6889d9a9c9549b1599d17de0f 4250 pyqt6_6.11.0-3.dsc
04c56089e44bf43c0b2cc0b082ca7efd42d83e53 10036 pyqt6_6.11.0-3.debian.tar.xz
508750cb7f9731b6f15ce44c63bc7e2bc61e7646 23449 pyqt6_6.11.0-3_source.buildinfo
Checksums-Sha256:
c0a399a71f2865769466cdb46d6a565605eba893f8e73ffbe3183b41619bfa0b 4250
pyqt6_6.11.0-3.dsc
3819a8935db53a86817915f8b5403358d0ffdec2935c2d2ce490cace67d475af 10036
pyqt6_6.11.0-3.debian.tar.xz
a8a5d95ad15ef309efdabb6d8d2a20fa03890d00f140152998d2646ab44786d8 23449
pyqt6_6.11.0-3_source.buildinfo
Files:
3c93e5759a628613bf8852c905e5b4fd 4250 python optional pyqt6_6.11.0-3.dsc
f8a962eb80324eaa7ac739da69a20d6b 10036 python optional
pyqt6_6.11.0-3.debian.tar.xz
ec5f062625c2e981a399231291478969 23449 python optional
pyqt6_6.11.0-3_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJHBAEBCgAxFiEE8kKZ/xu8kBi5BqTLYCaTbS8ciuAFAmqKFxgTHG1pdHlhNTdA
ZGViaWFuLm9yZwAKCRBgJpNtLxyK4KxcEAC8FkaTaV7UHax7knojcgkGr/StdmOj
HfSN9Vv0UoWgaMo/Y51x1qkgGcPMFzdzzF2z/954hPgqw5EeV2GL2NDlc7qB1O2j
alcUgFXfbu51qR8S3LrEKn52IIMmaI8UQRnDdjY3caFiA9L9rI8EKgX3+/qZo6td
3HFkoDvHgYTTN58LTB2Y05Z7nTNUfpBtzpJ3eqEoB/o9PxIVCiqTG+FY2mlcRClH
ntR0m8nEMVK2oqk3LgbtwNKz/LyG7JR6a7jcKNq9fMcSOlZ05BHw5ag5alvfBVAU
REKSA07aElrvZWjUOML/3yhiQD39SIt/hX73TID2YvpgPqXQp8vHsansDNZKurZV
YvmXkSc409+KsTN04nYupxq8W5PVjoQPNl6kH/r0dkBzeNnRQ0Oso8m9vaogcY3z
UV5uNrWmjgX+2bbG570DyYkNG/hgGB/zjPGoGSADP2n804NfGjnvzJPPhqjr24hc
1MT/SjLedByvo9DKcqD7g8FCr3UUVwfcHuptw22RvLOzUMZsqMVxd+eRFFSldtpt
BXoaTbWXbVEEeGxEHa4/DVQehMSezhZPp4BjbG9WEtnYH50JiljbKelfsvRI3A3s
9r0zAsbJSU0Ji6lkPjFqkIYBML1j06/pUNXFhMam3GQ3bMyKCj6/9q5xoeEymGqB
y7rJtEtTAu1FzQ==
=Y/OK
-----END PGP SIGNATURE-----
pgpEypmR_Kg5L.pgp
Description: PGP signature
--- End Message ---