#1148555 pyside6: FTBFS against python 3.15rc2 as default

Package:
src:pyside6
Source:
src:pyside6
Submitter:
Maximiliano Curia
Date:
2026-09-21 02:43:02 UTC
Severity:
normal
Tags:
#1148555#5
Date:
2026-09-20 18:01:58 UTC
From:
To:
Hi!

While rebuilding the python related packages against the Python 3.15rc2
as the default version we found that pyside6 fails to build from source
[1].

The error is:

error: ‘PyWeakref_GetObject’ was not declared in this scope; did you mean ‘PyErr_SetObject’?

This is a common problem when building against Python 3.15, and it
happens because that function was removed in Python 3.15, and the code
needs to be adapted. This only surfaces when building with 3.15 as the
default because pyside only builds with the default version.

To fix this problem and other 3.15 related issues, I had to apply a
number of upstream commits:

- https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=ccdba08a37998bbbabadf42abfae871af5df8ac3 (Enumerations: Enable the forgiveness feature ENOPT_NO_ZERODEFAULT for 3.15)
- https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=daca53fd7326646bb22d816ccb3ed58932ca0747 (libshiboken: Increase robustness of star import check)
- https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=df277d155916ea3b5a8499dafb9ffd022fd5728f (Fix the star import test for 3.15)
- https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=3eb4199e0e0a80756ddb95dbc29ad4cf99c5f8ae (enum_test.py: Adapt to 3.15.0b2+dev)
- https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=c3a4d68fd9dcbe4f1b9c8a74acf8056f48c8a7a8 (Fix QtAsyncio to work with Python 3.15)
- https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=33641ce807353f56d083f3ed1059bf67ce800e92 (libpyside: Fix tests bug_408/994 crashing in debug mode or when using Python 3.15)

I've applied these fixes in the sandbox [2] to verify that pyside6
builds successfully, please consider applying the patch to support the
upcoming 3.15 version.

Setting the severity to important for now. Once Python 3.15 becomes the
default version this bug will become release critical.

Happy hacking,

[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4720943/
[2]: https://debusine.debian.net/debian/r-python-python3.15/

#1148555#10
Date:
2026-09-21 02:39:14 UTC
From:
To:
Hi maxy

Thanks for forwarding the patches.

 > This only surfaces when building with 3.15 as the
 > default because pyside only builds with the default version.

PySide6 only builds with the default Python but it is an abi3 module so
it is portable to other interpreters. It seems that PyWeakref_GetObject
is still exported for abi3 modules to use, so the version compiled with
Python 3.14 still works with Python 3.15, but that symbol is no longer
in the headers so it can't be compiled. Interesting...


The patches are targetted at 6.10.3-3 which is currently in unstable,
but as the Qt 6.11 transition has just started, I'll shortly be
uploading 6.11.2-2 to unstable.

trivially imported with small offsets

a variant of this seems to already be in PySide6 6.11.2, so not needed

trivially imported with small offsets

trivially imported with small offsets

trivially imported with small offsets

a variant of this seems to already be in PySide6 6.11.2, so not needed


I'll queue these up locally so that they are ready to go, but I won't
upload it until after the Qt 6.11 transition is completed. I'll probably
also wait until we've got enough Python 3.15 supported in experimental
that I can run the tests myself and also manually test it with some
applications.

thanks
Stuart