Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python3-pyside2 for openSUSE:Factory checked in at 2022-07-01 14:11:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-pyside2 (Old) and /work/SRC/openSUSE:Factory/.python3-pyside2.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-pyside2" Fri Jul 1 14:11:05 2022 rev:18 rq:986190 version:5.15.5 Changes: -------- --- /work/SRC/openSUSE:Factory/python3-pyside2/python3-pyside2.changes 2022-06-20 15:38:43.146986173 +0200 +++ /work/SRC/openSUSE:Factory/.python3-pyside2.new.1548/python3-pyside2.changes 2022-07-01 14:11:06.844968517 +0200 @@ -1,0 +2,13 @@ +Fri Jul 1 08:06:29 UTC 2022 - Christophe Giboudeaux <christo...@krop.fr> + +- Update to 5.15.5 + * Crashes in QClipboard.mimeData(), QTextCursor.currentList() and + QTextCursor.currentTable() have been fixed. + * Fixed issues where __feature__ was affected by other imports. + * Fixed crashes on QImage(uchar *) constructors, related to GIL + handling. + * QOpenGLPaintDevice has been added. +- Add patch to fix ARM build failures: + * 0001-Backport-Fix-GLES-builds.patch + +------------------------------------------------------------------- Old: ---- pyside-setup-opensource-src-5.15.4.tar.xz New: ---- 0001-Backport-Fix-GLES-builds.patch pyside-setup-opensource-src-5.15.5.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-pyside2.spec ++++++ --- /var/tmp/diff_new_pack.qnbWpe/_old 2022-07-01 14:11:07.748969645 +0200 +++ /var/tmp/diff_new_pack.qnbWpe/_new 2022-07-01 14:11:07.756969655 +0200 @@ -22,7 +22,7 @@ %global __requires_exclude qmlimport\\((Charts|TextBalloonPlugin) Name: python3-pyside2 -Version: 5.15.4 +Version: 5.15.5 Release: 0 Summary: Python bindings for Qt # Legal: @@ -41,6 +41,8 @@ Patch2: 0001-cmake-Don-t-assume-qhelpgenerator-is-in-PATH.patch # PATCH-FIX-UPSTREAM Patch3: 0001-Backport-LLVM-13-fix-from-shiboken6.patch +# PATCH-FIX-UPSTREAM +Patch4: 0001-Backport-Fix-GLES-builds.patch # Provide the PyPI names Provides: python3-PySide2 = %{version}-%{release} Provides: python3-shiboken2 = %{version}-%{release} ++++++ 0001-Backport-Fix-GLES-builds.patch ++++++ >From b078923c003f0e6048c37a8a4b20415e4bec9c72 Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux <christo...@krop.fr> Date: Fri, 1 Jul 2022 09:59:08 +0200 Subject: [PATCH] Backport: Fix GLES builds Add QOpenGLVersionFunctionsFactory to list of dropped entries. Backported from Ie203372c2d15776a466f0fa04fe32a777bf85e52 Task-number: PYSIDE-1636 Change-Id: I4507820eb0ac897abe8a3a28b3de16f3dd8250d5 --- sources/pyside2/PySide2/QtGui/CMakeLists.txt | 2 +- sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/pyside2/PySide2/QtGui/CMakeLists.txt b/sources/pyside2/PySide2/QtGui/CMakeLists.txt index c4a38a184..0306543ac 100644 --- a/sources/pyside2/PySide2/QtGui/CMakeLists.txt +++ b/sources/pyside2/PySide2/QtGui/CMakeLists.txt @@ -227,7 +227,7 @@ endif() list(FIND QtGui_enabled_features "opengles2" _opengles2Index) # ### fixme: For cmake >= 3.3: if(opengles2 IN_LIST QtGui_enabled_features) if(_opengles2Index GREATER -1) - list(APPEND QtGui_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery) + list(APPEND QtGui_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery QOpenGLVersionFunctionsFactory) message(STATUS "Qt${QT_MAJOR_VERSION}Gui: Dropping Desktop OpenGL classes (GLES2)") else() list(APPEND QtGui_SRC diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt b/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt index 383afb68f..03c4fd046 100644 --- a/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt +++ b/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt @@ -11,7 +11,7 @@ set(QtOpenGLFunctions_SRC ${QtOpenGLFunctions_GEN_DIR}/qtopenglfunctions_module_ list(FIND QtOpenGLFunctions_enabled_features "opengles2" _opengles2Index) # ### fixme: For cmake >= 3.3: if(opengles2 IN_LIST QtOpenGLFunctions_enabled_features) if(_opengles2Index GREATER -1) - list(APPEND QtOpenGLFunctions_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery) + list(APPEND QtOpenGLFunctions_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery QOpenGLVersionFunctionsFactory) list(APPEND QtOpenGLFunctions_SRC ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_es2_wrapper.cpp) message(STATUS "Qt${QT_MAJOR_VERSION}OpenGLFunctions: Dropping Desktop OpenGL classes (GLES2)") -- 2.36.1 ++++++ pyside-setup-opensource-src-5.15.4.tar.xz -> pyside-setup-opensource-src-5.15.5.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyside-setup-opensource-src-5.15.4/coin/dependencies.yaml new/pyside-setup-opensource-src-5.15.5/coin/dependencies.yaml --- old/pyside-setup-opensource-src-5.15.4/coin/dependencies.yaml 2022-04-08 10:30:45.000000000 +0200 +++ new/pyside-setup-opensource-src-5.15.5/coin/dependencies.yaml 2022-05-18 13:38:11.000000000 +0200 @@ -1,6 +1,6 @@ product_dependency: ../../qt/tqtc-qt5.git: - ref: "ce5066de40100b04dee7087c7b860693b379c990" + ref: "743ae9f98d7cc67c4956886209f39fcd5a28466f" dependency_source: supermodule dependencies: [ "../../qt/qt3d", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyside-setup-opensource-src-5.15.4/coin/module_config.yaml new/pyside-setup-opensource-src-5.15.5/coin/module_config.yaml --- old/pyside-setup-opensource-src-5.15.4/coin/module_config.yaml 2022-04-08 10:30:45.000000000 +0200 +++ new/pyside-setup-opensource-src-5.15.5/coin/module_config.yaml 2022-05-18 13:38:11.000000000 +0200 @@ -18,7 +18,7 @@ not_contains_value: -no-gui - condition: property # Following configs are not supported property: target.osVersion - not_in_values: [OPENSUSE_13_01, QEMU, WebAssembly, Ubuntu_18_04, SLES_12, SLES_15] + not_in_values: [OPENSUSE_13_01, QEMU, WebAssembly, Ubuntu_18_04, SLES_12, SLES_15, MacOS_10_15] - condition: property # MibnGW and msvc2015 are not supported property: target.compiler not_in_values: [Mingw, MSVC2015] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyside-setup-opensource-src-5.15.4/dist/changes-5.15.5 new/pyside-setup-opensource-src-5.15.5/dist/changes-5.15.5 --- old/pyside-setup-opensource-src-5.15.4/dist/changes-5.15.5 1970-01-01 01:00:00.000000000 +0100 +++ new/pyside-setup-opensource-src-5.15.5/dist/changes-5.15.5 2022-05-18 13:38:11.000000000 +0200 @@ -0,0 +1,30 @@ +Qt for Python 5.15.5 is a bug-fix release. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qtforpython/ + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* PySide2 * +**************************************************************************** + + - Crashes in QClipboard.mimeData(), QTextCursor.currentList() and + QTextCursor.currentTable() have been fixed. + - Fixed issues where __feature__ was affected by other imports. + - Fixed crashes on QImage(uchar *) constructors, related to GIL handling. + - QOpenGLPaintDevice has been added. + +**************************************************************************** +* Shiboken2 * +**************************************************************************** + + - No changes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyside-setup-opensource-src-5.15.4/examples/widgets/mainwindows/application/application.py new/pyside-setup-opensource-src-5.15.5/examples/widgets/mainwindows/application/application.py --- old/pyside-setup-opensource-src-5.15.4/examples/widgets/mainwindows/application/application.py 2022-04-08 10:30:45.000000000 +0200 +++ new/pyside-setup-opensource-src-5.15.5/examples/widgets/mainwindows/application/application.py 2022-05-18 13:38:11.000000000 +0200 @@ -189,16 +189,14 @@ self.statusBar().showMessage("Ready") def readSettings(self): - settings = QtCore.QSettings("Trolltech", "Application Example") - pos = settings.value("pos", QtCore.QPoint(200, 200)) - size = settings.value("size", QtCore.QSize(400, 400)) - self.resize(size) - self.move(pos) + settings = QtCore.QSettings('QtProject', 'Application Example') + geometry = settings.value('geometry', QtCore.QByteArray()) + if geometry.size(): + self.restoreGeometry(geometry) def writeSettings(self): - settings = QtCore.QSettings("Trolltech", "Application Example") - settings.setValue("pos", self.pos()) - settings.setValue("size", self.size()) + settings = QtCore.QSettings('QtProject', 'Application Example') + settings.setValue('geometry', self.saveGeometry()) def maybeSave(self): if self.textEdit.document().isModified(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyside-setup-opensource-src-5.15.4/examples/widgets/mainwindows/mdi/mdi.py new/pyside-setup-opensource-src-5.15.5/examples/widgets/mainwindows/mdi/mdi.py --- old/pyside-setup-opensource-src-5.15.4/examples/widgets/mainwindows/mdi/mdi.py 2022-04-08 10:30:45.000000000 +0200 +++ new/pyside-setup-opensource-src-5.15.5/examples/widgets/mainwindows/mdi/mdi.py 2022-05-18 13:38:11.000000000 +0200 @@ -42,8 +42,8 @@ """PySide2 port of the widgets/draganddrop/draggabletext example from Qt v5.x, originating from PyQt""" -from PySide2.QtCore import (QFile, QFileInfo, QPoint, QSettings, QSignalMapper, - QSaveFile, QSize, QTextStream, Qt) +from PySide2.QtCore import (QByteArray, QFile, QFileInfo, QPoint, QSettings, + QSignalMapper, QSaveFile, QSize, QTextStream, Qt) from PySide2.QtGui import QIcon, QKeySequence from PySide2.QtWidgets import (QAction, QApplication, QFileDialog, QMainWindow, QMdiArea, QMessageBox, QTextEdit, QWidget) @@ -405,16 +405,14 @@ self.statusBar().showMessage("Ready") def readSettings(self): - settings = QSettings('Trolltech', 'MDI Example') - pos = settings.value('pos', QPoint(200, 200)) - size = settings.value('size', QSize(400, 400)) - self.move(pos) - self.resize(size) + settings = QSettings('QtProject', 'MDI Example') + geometry = settings.value('geometry', QByteArray()) + if geometry.size(): + self.restoreGeometry(geometry) def writeSettings(self): - settings = QSettings('Trolltech', 'MDI Example') - settings.setValue('pos', self.pos()) - settings.setValue('size', self.size()) + settings = QSettings('QtProject', 'MDI Example') + settings.setValue('geometry', self.saveGeometry()) def activeMdiChild(self): activeSubWindow = self.mdiArea.activeSubWindow() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyside-setup-opensource-src-5.15.4/sources/pyside2/PySide2/QtGui/CMakeLists.txt new/pyside-setup-opensource-src-5.15.5/sources/pyside2/PySide2/QtGui/CMakeLists.txt --- old/pyside-setup-opensource-src-5.15.4/sources/pyside2/PySide2/QtGui/CMakeLists.txt 2022-04-08 10:30:45.000000000 +0200 +++ new/pyside-setup-opensource-src-5.15.5/sources/pyside2/PySide2/QtGui/CMakeLists.txt 2022-05-18 13:38:11.000000000 +0200 @@ -100,7 +100,7 @@ ${QtGui_GEN_DIR}/qopenglextrafunctions_wrapper.cpp ${QtGui_GEN_DIR}/qopenglframebufferobjectformat_wrapper.cpp ${QtGui_GEN_DIR}/qopenglfunctions_wrapper.cpp -# Compile error on Windows: ${QtGui_GEN_DIR}/qopenglpaintdevice_wrapper.cpp +${QtGui_GEN_DIR}/qopenglpaintdevice_wrapper.cpp ${QtGui_GEN_DIR}/qopenglpixeltransferoptions_wrapper.cpp ${QtGui_GEN_DIR}/qopenglshaderprogram_wrapper.cpp ${QtGui_GEN_DIR}/qopengltexture_wrapper.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyside-setup-opensource-src-5.15.4/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml new/pyside-setup-opensource-src-5.15.5/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml --- old/pyside-setup-opensource-src-5.15.4/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml 2022-04-08 10:30:45.000000000 +0200 +++ new/pyside-setup-opensource-src-5.15.5/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml 2022-05-18 13:38:11.000000000 +0200 @@ -643,6 +643,16 @@ <define-ownership class="target" owner="default"/> </modify-argument> </modify-function> + <modify-function signature="currentTable()const"> + <modify-argument index="return"> + <define-ownership class="target" owner="default"/> + </modify-argument> + </modify-function> + <modify-function signature="currentList()const"> + <modify-argument index="return"> + <define-ownership class="target" owner="default"/> + </modify-argument> + </modify-function> <modify-function signature="insertTable(int,int,const QTextTableFormat &)"> <modify-argument index="return"> <define-ownership class="target" owner="default"/> @@ -758,6 +768,8 @@ <include file-name="QStringList" location="global"/> <include file-name="QMatrix" location="global"/> </extra-includes> + <inject-code class="native" position="beginning" + file="../glue/qtgui.cpp" snippet="qimage-decref-image-data"/> <modify-function signature="load(const QString&, const char*)" allow-thread="yes"/> <modify-function signature="load(QIODevice*,const char*)" allow-thread="yes"/> @@ -1760,6 +1772,11 @@ </modify-argument> <inject-code class="target" position="end" file="../glue/qtgui.cpp" snippet="qclipboard-text"/> </modify-function> + <modify-function signature="mimeData(QClipboard::Mode)const"> + <modify-argument index="return"> + <define-ownership class="target" owner="default"/> + </modify-argument> + </modify-function> </object-type> <object-type name="QPaintEngineState"> <extra-includes> @@ -2625,9 +2642,7 @@ <enum-type name="FramebufferRestorePolicy" since="5.7"/> </object-type> <value-type name="QOpenGLFramebufferObjectFormat"/> - <!-- Compile error on Windows: QOpenGLPaintDevice::QOpenGLPaintDevice(const QOpenGLPaintDevice &)': attempting to reference a deleted function <object-type name="QOpenGLPaintDevice" since="5.0"/> - --> <object-type name="QOpenGLExtraFunctions" since="5.6"> <!-- Exlusions due to compile errors --> <modify-function signature="glEndTransformFeedback()" remove="all"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyside-setup-opensource-src-5.15.4/sources/pyside2/PySide2/glue/qtgui.cpp new/pyside-setup-opensource-src-5.15.5/sources/pyside2/PySide2/glue/qtgui.cpp --- old/pyside-setup-opensource-src-5.15.4/sources/pyside2/PySide2/glue/qtgui.cpp 2022-04-08 10:30:45.000000000 +0200 +++ new/pyside-setup-opensource-src-5.15.5/sources/pyside2/PySide2/glue/qtgui.cpp 2022-05-18 13:38:11.000000000 +0200 @@ -190,6 +190,16 @@ %0 = new %TYPE(QPixmap::fromImage(%1)); // @snippet qpixmap +// @snippet qimage-decref-image-data +static void imageDecrefDataHandler(void *data) +{ + // Avoid "Python memory allocator called without holding the GIL" + auto state = PyGILState_Ensure(); + Py_DECREF(reinterpret_cast<PyObject *>(data)); + PyGILState_Release(state); +} +// @snippet qimage-decref-image-data + // @snippet qimage-constbits %PYARG_0 = Shiboken::Buffer::newObject(%CPPSELF.%FUNCTION_NAME(), %CPPSELF.byteCount()); // @snippet qimage-constbits diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyside-setup-opensource-src-5.15.4/sources/pyside2/PySide2/templates/gui_common.xml new/pyside-setup-opensource-src-5.15.5/sources/pyside2/PySide2/templates/gui_common.xml --- old/pyside-setup-opensource-src-5.15.4/sources/pyside2/PySide2/templates/gui_common.xml 2022-04-08 10:30:45.000000000 +0200 +++ new/pyside-setup-opensource-src-5.15.5/sources/pyside2/PySide2/templates/gui_common.xml 2022-05-18 13:38:11.000000000 +0200 @@ -80,8 +80,9 @@ </template> <template name="qimage_buffer_constructor"> - auto *ptr = reinterpret_cast<uchar *>(Shiboken::Buffer::copyData(%PYARG_1)); - %0 = new %TYPE(ptr, %ARGS, std::free); + Py_INCREF(%PYARG_1); + auto ptr = reinterpret_cast<uchar*>(Shiboken::Buffer::getPointer(%PYARG_1)); + %0 = new %TYPE(ptr, %ARGS, imageDecrefDataHandler, %PYARG_1); </template> <template name="qcolor_repr"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyside-setup-opensource-src-5.15.4/sources/pyside2/pyside_version.py new/pyside-setup-opensource-src-5.15.5/sources/pyside2/pyside_version.py --- old/pyside-setup-opensource-src-5.15.4/sources/pyside2/pyside_version.py 2022-04-08 10:30:45.000000000 +0200 +++ new/pyside-setup-opensource-src-5.15.5/sources/pyside2/pyside_version.py 2022-05-18 13:38:11.000000000 +0200 @@ -39,7 +39,7 @@ major_version = "5" minor_version = "15" -patch_version = "4" +patch_version = "5" # For example: "a", "b", "rc" # (which means "alpha", "beta", "release candidate"). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyside-setup-opensource-src-5.15.4/sources/pyside2/tests/QtCore/snake_prop_feature_test.py new/pyside-setup-opensource-src-5.15.5/sources/pyside2/tests/QtCore/snake_prop_feature_test.py --- old/pyside-setup-opensource-src-5.15.4/sources/pyside2/tests/QtCore/snake_prop_feature_test.py 2022-04-08 10:30:45.000000000 +0200 +++ new/pyside-setup-opensource-src-5.15.5/sources/pyside2/tests/QtCore/snake_prop_feature_test.py 2022-05-18 13:38:11.000000000 +0200 @@ -88,6 +88,8 @@ window.modal from __feature__ import snake_case, true_property + #PYSIDE-1548: Make sure that another import does not clear the features. + import sys self.assertTrue(isinstance(QtWidgets.QWidget.modal, property)) self.assertTrue(isinstance(window.modal, bool)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyside-setup-opensource-src-5.15.4/sources/shiboken2/libshiboken/signature/signature.cpp new/pyside-setup-opensource-src-5.15.5/sources/shiboken2/libshiboken/signature/signature.cpp --- old/pyside-setup-opensource-src-5.15.4/sources/shiboken2/libshiboken/signature/signature.cpp 2022-04-08 10:30:45.000000000 +0200 +++ new/pyside-setup-opensource-src-5.15.5/sources/shiboken2/libshiboken/signature/signature.cpp 2022-05-18 13:38:11.000000000 +0200 @@ -454,7 +454,7 @@ * Note that fget is impossible because there are no parameters. */ static const char mapping_name[] = "shibokensupport.signature.mapping"; - static PyObject *sys_modules = PySys_GetObject("modules"); + static PyObject *sys_modules = PySys_GetObject(const_cast<char *>("modules")); static PyObject *mapping = PyDict_GetItemString(sys_modules, mapping_name); static PyObject *ns = PyModule_GetDict(mapping); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyside-setup-opensource-src-5.15.4/sources/shiboken2/shiboken_version.py new/pyside-setup-opensource-src-5.15.5/sources/shiboken2/shiboken_version.py --- old/pyside-setup-opensource-src-5.15.4/sources/shiboken2/shiboken_version.py 2022-04-08 10:30:45.000000000 +0200 +++ new/pyside-setup-opensource-src-5.15.5/sources/shiboken2/shiboken_version.py 2022-05-18 13:38:11.000000000 +0200 @@ -39,7 +39,7 @@ major_version = "5" minor_version = "15" -patch_version = "4" +patch_version = "5" # For example: "a", "b", "rc" # (which means "alpha", "beta", "release candidate"). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyside-setup-opensource-src-5.15.4/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/feature.py new/pyside-setup-opensource-src-5.15.5/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/feature.py --- old/pyside-setup-opensource-src-5.15.4/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/feature.py 2022-04-08 10:30:45.000000000 +0200 +++ new/pyside-setup-opensource-src-5.15.5/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/feature.py 2022-05-18 13:38:11.000000000 +0200 @@ -132,13 +132,10 @@ sys.modules["PySide2.QtCore"].__init_feature__() return sys.modules["__feature__"] - if name.split(".")[0] == "PySide2": - # This is a module that imports PySide2. - flag = existing if isinstance(existing, int) else 0 - else: - # This is some other module. Ignore it in switching. - flag = -1 - pyside_feature_dict[importing_module] = flag + if importing_module not in pyside_feature_dict: + # Ignore new modules if not from PySide. + default = 0 if name.split(".")[0] == "PySide2" else -1 + pyside_feature_dict[importing_module] = default return original_import(name, *args, **kwargs) _is_initialized = False