diff --git a/0001-Lazy-Init-Support-Lazy-Subtypes-amended.patch b/0001-Lazy-Init-Support-Lazy-Subtypes-amended.patch new file mode 100644 index 0000000..8cec5ec --- /dev/null +++ b/0001-Lazy-Init-Support-Lazy-Subtypes-amended.patch @@ -0,0 +1,54 @@ +From e67404e0715d9d6a27e52dbd0be9c34643a89a03 Mon Sep 17 00:00:00 2001 +From: Christian Tismer +Date: Sun, 13 Oct 2024 23:29:47 +0200 +Subject: [PATCH] Lazy Init: Support Lazy Subtypes, amended + +The addition of nested types made it necessary to filter +subtypes out of resolveLazyClasses because incarnateType +should be called for toplevel types, only. + +Task-number: PYSIDE-2404 +Change-Id: I4b95c0f65c055376defb6a8e9ea888285c82a8e2 +Fixes: PYSIDE-2888 +Pick-to: 6.8 +--- + sources/shiboken6/libshiboken/sbkmodule.cpp | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/sources/shiboken6/libshiboken/sbkmodule.cpp b/sources/shiboken6/libshiboken/sbkmodule.cpp +index acadc60..bca7383 100644 +--- a/sources/shiboken6/libshiboken/sbkmodule.cpp ++++ b/sources/shiboken6/libshiboken/sbkmodule.cpp +@@ -93,8 +93,10 @@ static void incarnateHelper(PyObject *module, const std::string_view names, + startPos = dotPos + 1; + dotPos = names.find('.', startPos); + } +- // now we have the type to create. ++ // now we have the type to create. (May be done already) + auto funcIter = nameToFunc.find(std::string(names)); ++ if (funcIter == nameToFunc.end()) ++ return; + // - call this function that returns a PyTypeObject + auto tcStruct = funcIter->second; + auto initFunc = tcStruct.func; +@@ -174,11 +176,15 @@ void resolveLazyClasses(PyObject *module) + // - see if there are still unloaded elements + auto &nameToFunc = tableIter->second; + +- // - incarnate all types. ++ // - incarnate all toplevel types. Subtypes will be handled there. + while (!nameToFunc.empty()) { + auto it = nameToFunc.begin(); + auto attrNameStr = it->first; +- incarnateType(module, attrNameStr.c_str(), nameToFunc); ++ if (attrNameStr.find('.') == std::string::npos) { ++ incarnateType(module, attrNameStr.c_str(), nameToFunc); ++ } else { ++ nameToFunc.erase(it); ++ } + } + } + +-- +2.47.0 + diff --git a/python3-pyside6.changes b/python3-pyside6.changes index 007ab60..97c131b 100644 --- a/python3-pyside6.changes +++ b/python3-pyside6.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 14 06:45:34 UTC 2024 - Christophe Marin + +- Add upstream change: + * 0001-Lazy-Init-Support-Lazy-Subtypes-amended.patch + ------------------------------------------------------------------- Thu Oct 10 20:20:00 UTC 2024 - Christophe Marin diff --git a/python3-pyside6.spec b/python3-pyside6.spec index ac1e974..3210cab 100644 --- a/python3-pyside6.spec +++ b/python3-pyside6.spec @@ -53,6 +53,8 @@ Source: https://download.qt.io/official_releases/QtForPython/pyside6/PyS Patch0: 0001-Always-link-to-python-libraries.patch # PATCH-FIX-UPSTREAM https://codereview.qt-project.org/c/pyside/pyside-setup/+/567559 Patch1: fix-pytest-qt.patch +# PATCH-FIX-UPSTREAM https://bugreports.qt.io/browse/PYSIDE-2888 +Patch2: 0001-Lazy-Init-Support-Lazy-Subtypes-amended.patch # SECTION common_dependencies BuildRequires: clang-devel BuildRequires: %{mypython}-Sphinx