summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Tismer <[email protected]>2024-10-24 11:59:03 +0200
committerFriedemann Kleint <[email protected]>2024-10-25 10:29:33 +0200
commit1cd56fa5724d288a36203d8d07c797c57e42db99 (patch)
tree5906570cdd1b61030213c143a51ef9031b5f6fe0
parent5f3716fc8fbdd6c7b609e265c4dcb97aca63f470 (diff)
Fix testwheel to no longer inspect a module __dict__6.8.2
The __all__ variable has been made lazy to compute it on-demand. When using the variable normally like module.__all__ everything is fine. Direct access to a modules __dict__ circumvents every enhancement made through __getattr__, because __getitem__ is directly used. Change-Id: I3b930685098391ccff569003bd2b585eda8f5a26 Reviewed-by: Friedemann Kleint <[email protected]> (cherry picked from commit 9626b701cb83fc1df25f310984eb43ed4f52a604)
-rw-r--r--scripts/packagetesting/testwheel.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/packagetesting/testwheel.py b/scripts/packagetesting/testwheel.py
index 27a82de0..6cc28715 100644
--- a/scripts/packagetesting/testwheel.py
+++ b/scripts/packagetesting/testwheel.py
@@ -65,10 +65,10 @@ def list_modules():
"""List the installed Qt modules."""
if VERSION[0] > 5:
import PySide6
- installed_modules = PySide6.__dict__["__all__"]
+ installed_modules = PySide6.__all__
else:
import PySide2
- installed_modules = PySide2.__dict__["__all__"]
+ installed_modules = PySide2.__all__
installed_modules.sort()
module_string = ", ".join(installed_modules)
print(f"\nInstalled_modules ({len(installed_modules)}): {module_string}\n")