aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/pysidetest/true_property_test.py
Commit message (Collapse)AuthorAgeFilesLines
* tests: handle unused imports and fix type issuesCristián Maureira-Fredes2024-12-121-1/+1
| | | | | | | | | | Many modules were imported but unused in our tests. Additionally, some type hint issues were solved. Pick-to: 6.8 Change-Id: Ic2368690e9a6ce0fffea812206185aa4f3dc3c58 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Python-3.10: Allow the new syntax for Python 3.9Christian Tismer2024-06-201-0/+1
| | | | | | | | Add a future statement to all Python source files. Task-number: PYSIDE-2786 Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* PyPySide: Fix some new bug that should ignore featuresChristian Tismer2023-12-211-1/+4
| | | | | | | Task-number: PYSIDE-535 Change-Id: I9dc87afba17ceed9bd24c54e468e634155877e61 Pick-to: 6.6 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Tests: Fix some flake warningsFriedemann Kleint2023-11-281-0/+1
| | | | | | | | Mostly spacing related. Pick-to: 6.6 Change-Id: I748a8a06f456c5d4bafb94c397c43b3b2ee9e3e9 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* __feature__: Fix a weird case of false metafunction lookupChristian Tismer2022-12-131-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | PySide implements duck-punching since 2010. This could create a problem with true_property since 06/2019, because a meta-function could be found in the instance dict of a QObject class, although the methods were replaced by a property object. This was an unexpected reaction of the `getMetaDataFromQObject` function. Meta methods were created and inserted into the instance dict, which caused very unrelated side effects like infinite recursion. The new implementation handles Python properties correctly and looks up the hidden methods if necessary without side effects. There are no longer meta functions involved. The function `getMetaDataFromQObject` is misleading and was replaced by `getHiddenDataFromQObject`, keeping the old name as an alias. It will be finally removed in version 6.5 . [ChangeLog][PySide6] A callback error when using true_property was fixed. Change-Id: Ie5234eab2106885f6edad24ae7d4c55fff43d62f Fixes: PYSIDE-1889 Pick-to: 6.4 Task-number: PYSIDE-1019 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* __feature__: Fix true_property inheritanceChristian Tismer2022-11-231-0/+38
The wrapping process creates wrapper functions for all C functions, also for those which are meant as virtual functions promoting an inherited function. Because properties appear as such additional functions, we need to convert not only according to the property strings, but also use the mro to reach the extra functions indirectly. [ChangeLog][PySide6] true_property was fixed to work with inherited properties as well. Change-Id: I176a30df77f550504f3aaf71e0c20de3e0707792 Fixes: PYSIDE-2042 Pick-to: 6.4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>