File: patch-PyQt5-uic.diff

package info (click to toggle)
frescobaldi 3.3.0%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 24,212 kB
  • sloc: python: 39,014; javascript: 263; sh: 238; makefile: 80
file content (67 lines) | stat: -rw-r--r-- 2,172 bytes parent folder | download | duplicates (3)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
diff --git __init__.py.orig __init__.py
index 5d7e90a..b9c9ffd 100644
--- __init__.py.orig
+++ __init__.py
@@ -189,10 +189,7 @@ def loadUiType(uifile, from_imports=False, resource_suffix='_rc', import_from='.
 
     from PyQt5 import QtWidgets
 
-    if sys.hexversion >= 0x03000000:
-        from .port_v3.string_io import StringIO
-    else:
-        from .port_v2.string_io import StringIO
+    from .port_v3.string_io import StringIO
 
     code_string = StringIO()
     winfo = compiler.UICompiler().compileUi(uifile, code_string, from_imports, resource_suffix, import_from)
diff --git properties.py.orig properties.py
index 3b4af2a..a9a9553 100644
--- properties.py.orig
+++ properties.py
@@ -45,10 +45,7 @@ import sys
 from .exceptions import NoSuchClassError, UnsupportedPropertyError
 from .icon_cache import IconCache
 
-if sys.hexversion >= 0x03000000:
-    from .port_v3.ascii_upper import ascii_upper
-else:
-    from .port_v2.ascii_upper import ascii_upper
+from .port_v3.ascii_upper import ascii_upper
 
 
 logger = logging.getLogger(__name__)
diff --git Compiler/qobjectcreator.py.orig Compiler/qobjectcreator.py
index d85182f..c65e628 100644
--- Compiler/qobjectcreator.py.orig
+++ Compiler/qobjectcreator.py
@@ -44,10 +44,7 @@ import sys
 from .indenter import write_code
 from .qtproxies import QtGui, QtWidgets, Literal, strict_getattr
 
-if sys.hexversion >= 0x03000000:
-    from ..port_v3.as_string import as_string
-else:
-    from ..port_v2.as_string import as_string
+from ..port_v3.as_string import as_string
 
 
 logger = logging.getLogger(__name__)
diff --git Compiler/qtproxies.py.orig Compiler/qtproxies.py
index e5b7266..5a2870d 100644
--- Compiler/qtproxies.py.orig
+++ Compiler/qtproxies.py
@@ -44,12 +44,8 @@ import re
 from .indenter import write_code
 from .misc import Literal, moduleMember
 
-if sys.hexversion >= 0x03000000:
-    from ..port_v3.proxy_base import ProxyBase
-    from ..port_v3.as_string import as_string
-else:
-    from ..port_v2.proxy_base import ProxyBase
-    from ..port_v2.as_string import as_string
+from ..port_v3.proxy_base import ProxyBase
+from ..port_v3.as_string import as_string
 
 
 i18n_strings = []