diff options
author | Simo Fält <simo.falt@qt.io> | 2023-05-25 11:19:15 +0300 |
---|---|---|
committer | Simo Fält <simo.falt@qt.io> | 2023-05-25 11:19:15 +0300 |
commit | d8f02ce77a4143aa4e7e6c4f7892e6a943c46b3c (patch) | |
tree | eb92573ddeb44c25697f2d883d243a89c0d98b68 /sources/shiboken2 | |
parent | ca0519cb3f6b62e3b61ba74f0c60eac891dd3a15 (diff) | |
parent | bd4180ffdd47d423b0bd2b995b09df474b8c5a81 (diff) |
Merge tag 'v5.15.5-lts' into tqtc/lts-5.15-opensourcev5.15.5-lts-lgpl
Qt For Python Release 5.15.5
Change-Id: Id8648afb982e4f1354257a0b523bc9c6f1acce2a
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 |