diff options
author | Christian Tismer <tismer@stackless.com> | 2022-11-11 10:11:03 +0100 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2022-12-22 17:43:32 +0100 |
commit | b71aa9a77a09f60d1a64a0544bdfc9323debe0e9 (patch) | |
tree | 5cb30c50e455c07846e5e6e475ce70a34fe64aff /sources/shiboken6/generator/shiboken/cppgenerator.cpp | |
parent | d0eb2ab803834defd23d97f7ee9bef1f09307e8b (diff) |
signature: Evict the __signature__ attribute, long live signature!
The __signature__ attribute was used since 2017 with success.
With Python 3.10, there was an incompatibility introduced by
the rlcompleter module. This was detected quite late, because
there is no exception thrown in normal line completion.
Using the rlcompleter module directly, the error can be seen.
The problem is not the attribute itself, but PySide's need to
support *multi-signature*. The signature objects are either
regular compatible Signature objects, or in the multi-case,
*lists* thereof.
Since PyPy was implemented, the internal use of the __signature__
attribute was replaced by a get_signature() call. The attribute
was never documented in the public until recently in the
developer docs. We therefor can assume that removal of the
attribute will cause no problems.
[ChangeLog][PySide6] The non-standard __signature__ attribute of
functions and classes was removed in favor of get_signature().
No Pick-to because this is meant for 6.5
Change-Id: Iaa8bb08a33db66868d949593e527b753bf989681
Fixes: PYSIDE-2101
Task-number: PYSIDE-510
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/shiboken6/generator/shiboken/cppgenerator.cpp')
-rw-r--r-- | sources/shiboken6/generator/shiboken/cppgenerator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp index f8d395eb0..85ee9968c 100644 --- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp +++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp @@ -7002,7 +7002,7 @@ bool CppGenerator::finishGeneration() s << "PySide::registerCleanupFunction(cleanTypesAttributes);\n\n"; } - // finish the rest of __signature__ initialization. + // finish the rest of get_signature() initialization. s << "FinishSignatureInitialization(module, " << moduleName() << "_SignatureStrings);\n" << "\nreturn module;\n" << outdent << "}\n"; |