diff options
author | Christian Tismer <tismer@stackless.com> | 2022-11-21 12:06:18 +0100 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2022-11-29 17:57:32 +0100 |
commit | 7377d2b8130ce7290775cd8a343e75c0561fc854 (patch) | |
tree | cbf0c9f8e005f0e61d7959950da7fc255ccf7d55 /sources/shiboken6/libshiboken/basewrapper_p.h | |
parent | 916bae507f76f4f063af81439f17cf11c914b4bd (diff) |
__feature__: heavily rework the context switching
The example of the issue shows the qasync.py module which
fails miserably when using snake_case.
The reason:
-----------
Reason is the way how feature switching is implemented.
Modules like qasync get a default switching of "ignore".
This ignores that the qasync module itself imports QtCore,
and feature switching is of course relevant, suggesting
a default setting of "normal" (explicitly no features).
The real problem:
-----------------
Testing the simple approach showed a serious problem with
feature switching: The functions get switched when a certain
function (getattr etc.) is called.
But the switching is sometimes not done due to a caching problem.
This fix removes caching that was wrong. Optimization will
be done in a different step with a different approach.
This Change was not qasync specific, but happens with PySide imports.
Actions done:
- adjust the inline structure
- implement a feature_imported callback
- identify Python functions that use PySide during import
[ChangeLog][PySide6] __feature__ switching now works even with
recursive imports like in the qasync module.
Fixes: PYSIDE-2029
Change-Id: I3340f54f293083a09fb509383688f73bbd9b60ae
Pick-to: 6.4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/shiboken6/libshiboken/basewrapper_p.h')
0 files changed, 0 insertions, 0 deletions