aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/pysidetest/snake_case_test.py
Commit message (Collapse)AuthorAgeFilesLines
* tests: handle unused imports and fix type issuesCristián Maureira-Fredes2024-12-121-4/+4
| | | | | | | | | | 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-2/+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/+2
| | | | | | | | Mostly spacing related. Pick-to: 6.6 Change-Id: I748a8a06f456c5d4bafb94c397c43b3b2ee9e3e9 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* __feature__: heavily rework the context switchingChristian Tismer2022-11-291-0/+34
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>