diff options
author | Christian Tismer <tismer@stackless.com> | 2020-08-30 12:07:30 +0200 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2020-08-31 11:55:16 +0200 |
commit | 16edb30687582a0fd355b42cfc918a89dab2d858 (patch) | |
tree | ae1d88cbd0ae454da6d022d3f68ab17679245370 /sources/shiboken2/libshiboken | |
parent | 72aadf11a482acebf11d7658b7edb942d9995ff0 (diff) |
signature: Avoid non-existent attributes in compiled code (Nuitka)
In standard Python, there is (yet) no attribute "__signature__".
Nuitka, the compiler, knows that and raises an AttributeError without
even trying. The workaround was simple: Use "eval".
Change-Id: Ice9deccd7ba2fe4c376f0a151924a68f88ca020d
Fixes: PYSIDE-829
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/libshiboken')
-rw-r--r-- | sources/shiboken2/libshiboken/embed/signature_bootstrap.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken2/libshiboken/embed/signature_bootstrap.py b/sources/shiboken2/libshiboken/embed/signature_bootstrap.py index eb182d8c4..3a74bb42e 100644 --- a/sources/shiboken2/libshiboken/embed/signature_bootstrap.py +++ b/sources/shiboken2/libshiboken/embed/signature_bootstrap.py @@ -73,7 +73,7 @@ def bootstrap(): if recursion_trap: # we are probably called from outside, already print("Recursion occurred in Bootstrap. Did you start by hand? Then it's ok.") - print("But you should trigger start by 'type.__signature__', only!") + print("""But you should trigger start by 'eval("type.__signature__")', only!""") recursion_trap += 1 @contextmanager |