Skip to content

Commit 032cfdb

Browse files
committed
Cleanup
This points out a potential problem with a previous fix for compatibility with https://github.com/pyqt/python-qt. Before, these members were tested against existing members, but now they are blindly added via `setattr`. It's safe, since we've already tested these and know for sure that they aren't being overwritten. But it still opens the door for these to one day override a newly added member. Luckily, this is only relevant until the next major release, upon which they are all discarded.
1 parent f97fde5 commit 032cfdb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Qt.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ def _maintain_backwards_compatibility(binding):
375375

376376
for member in ("__binding__",
377377
"__binding_version__",
378+
"__qt_version__",
378379
"__added__",
379380
"__remapped__",
380381
"__modified__",
@@ -387,9 +388,5 @@ def _maintain_backwards_compatibility(binding):
387388
setattr(binding, "__wrapper_version__", self.__version__)
388389
self.__added__.append("__wrapper_version__")
389390

390-
# Related to compatibility with python-qt. See issue #135
391-
setattr(binding, "__qt_version__", self.__qt_version__)
392-
self.__added__.append("__qt_version__")
393-
394391

395392
cli(sys.argv[1:]) if __name__ == "__main__" else init()

0 commit comments

Comments
 (0)