diff options
Diffstat (limited to 'sources/shiboken2')
-rw-r--r-- | sources/shiboken2/libshiboken/signature/signature.cpp | 2 | ||||
-rw-r--r-- | sources/shiboken2/shiboken_version.py | 2 | ||||
-rw-r--r-- | sources/shiboken2/shibokenmodule/files.dir/shibokensupport/feature.py | 11 |
3 files changed, 6 insertions, 9 deletions
diff --git a/sources/shiboken2/libshiboken/signature/signature.cpp b/sources/shiboken2/libshiboken/signature/signature.cpp index 601df4730..3051c50d5 100644 --- a/sources/shiboken2/libshiboken/signature/signature.cpp +++ b/sources/shiboken2/libshiboken/signature/signature.cpp @@ -454,7 +454,7 @@ static PyObject *adjustFuncName(const char *func_name) * 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 --git a/sources/shiboken2/shiboken_version.py b/sources/shiboken2/shiboken_version.py index ecc975ddf..876a0e401 100644 --- a/sources/shiboken2/shiboken_version.py +++ b/sources/shiboken2/shiboken_version.py @@ -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 --git a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/feature.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/feature.py index ece3d2edb..e2edfe391 100644 --- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/feature.py +++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/feature.py @@ -132,13 +132,10 @@ def _import(name, *args, **kwargs): 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 |