[PySide] Build error with Python 3.10

Richard Shaw hobbes1069 at gmail.com
Wed Nov 18 13:55:14 CET 2020


In preparation for Python 3.10 / Fedora 35 we are proactively performing
test builds. It looks like only one change is really needed (at least for
it to build).

>From the BZ[1]:

[  0%] Building CXX object
sources/shiboken2/tests/libminimal/CMakeFiles/libminimal.dir/typedef.cpp.o
cd
/builddir/build/BUILD/pyside-setup-opensource-src-5.15.1/x86_64-redhat-linux-gnu/sources/shiboken2/tests/libminimal
&& /usr/bin/clang++ -DLIBMINIMAL_BUILD -Dlibminimal_EXPORTS
-I/builddir/build/BUILD/pyside-setup-opensource-src-5.15.1/sources/shiboken2/tests/libminimal
-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables
-fcf-protection -Wall -fvisibility=hidden -Wno-strict-aliasing -D
QT_NO_CAST_FROM_ASCII -D QT_NO_CAST_TO_ASCII -DNDEBUG -fPIC   -fPIC
-std=gnu++11 -o CMakeFiles/libminimal.dir/typedef.cpp.o -c
/builddir/build/BUILD/pyside-setup-opensource-src-5.15.1/sources/shiboken2/tests/libminimal/typedef.cpp
/builddir/build/BUILD/pyside-setup-opensource-src-5.15.1/sources/shiboken2/libshiboken/basewrapper.cpp:369:23:
error: expression is not assignable
        Py_TYPE(type) = SbkObjectType_TypeF();
        ~~~~~~~~~~~~~ ^
/builddir/build/BUILD/pyside-setup-opensource-src-5.15.1/sources/shiboken2/libshiboken/basewrapper.cpp:1104:23:
error: expression is not assignable
    Py_TYPE(heaptype) = SbkObjectType_TypeF();
    ~~~~~~~~~~~~~~~~~ ^


Since Py_TYPE() is changed to the inline static function, Py_TYPE(obj) =
new_type must be replaced with Py_SET_TYPE(obj, new_type): see
Py_SET_TYPE() (available since Python 3.9).

Thanks,
Richard
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1898974
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20201118/0c5816de/attachment.html>


More information about the PySide mailing list