aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/shiboken6/libshiboken/signature/signature.cpp3
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py4
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py4
3 files changed, 6 insertions, 5 deletions
diff --git a/sources/shiboken6/libshiboken/signature/signature.cpp b/sources/shiboken6/libshiboken/signature/signature.cpp
index 243f3e35f..a8a17ec14 100644
--- a/sources/shiboken6/libshiboken/signature/signature.cpp
+++ b/sources/shiboken6/libshiboken/signature/signature.cpp
@@ -512,9 +512,10 @@ static PyObject *adjustFuncName(const char *func_name)
return nullptr;
// Run `eval` on the type string to get the object.
+ // PYSIDE-1710: If the eval does not work, return the given string.
AutoDecRef obtype(PyRun_String(_path, Py_eval_input, ns, ns));
if (obtype.isNull())
- return nullptr;
+ return String::fromCString(func_name);
if (PyModule_Check(obtype.object())) {
// This is a plain function. Return the unmangled name.
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py
index 0c1b72644..4c436eafd 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py
@@ -104,8 +104,8 @@ def seterror_argument(args, func_name, info):
try:
func = eval(func_name, namespace)
except Exception as e:
- msg = f"Internal error evaluating {func_name}: " + str(e)
- return TypeError, msg
+ msg = f"Error evaluating `{func_name}`: {e}"
+ return type(e), msg
if info and type(info) is str:
err = TypeError
if info == "<":
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
index adcbad3d9..77a61380f 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
@@ -54,7 +54,7 @@ import typing
from pathlib import Path
from typing import TypeVar, Generic
-from shibokensupport.signature.lib.tool import with_metaclass
+from _imp import is_builtin
class ellipsis(object):
def __repr__(self):
@@ -179,7 +179,7 @@ class Reloader(object):
if getattr(mod, "__file__", None) and not Path(mod.__file__).is_dir():
ending = Path(mod.__file__).suffix
return ending not in (".py", ".pyc", ".pyo", ".pyi")
- return False
+ return bool(is_builtin(mod.__name__))
def update(self):
"""