blob: 2f4958ba26d30a56182af9a54075a488a90490b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
Description: Update import of PyQt5 private sip module and remove Python 2/PyQt4 setapi calls
Author: Kurt Kremitzki <kkremitzki@debian.org>
Last-Updated: 2020-12-20
--- a/sources/pyside2/tests/tools/list-class-hierarchy.py
+++ b/sources/pyside2/tests/tools/list-class-hierarchy.py
@@ -96,14 +96,10 @@
for l in libraries:
dictionary = []
if l =="PyQt5":
- import sip
- sip.setapi('QDate',2)
- sip.setapi('QDateTime',2)
- sip.setapi('QString',2)
- sip.setapi('QTextStream',2)
- sip.setapi('QTime',2)
- sip.setapi('QUrl',2)
- sip.setapi('QVariant',2)
+ try:
+ from PyQt5 import sip
+ except ModuleNotFoundError:
+ import sip
for m in modules:
exec("from %s import %s" % (l,m), globals(), locals())
|