Skip to content

Commit 370c116

Browse files
committed
deps: Change pyside2 to pyside6
1 parent 675e346 commit 370c116

File tree

4 files changed

+72
-34
lines changed

4 files changed

+72
-34
lines changed

contrib/generate-ui.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ pushd hwilib/ui
66
for file in *.ui
77
do
88
gen_file=ui_`echo $file| cut -d. -f1`.py
9-
pyside2-uic $file -o $gen_file
10-
sed -i'' -e 's/raise()/raise_()/g' $gen_file
9+
pyside6-uic $file -o $gen_file
1110
done
1211
popd

hwilib/_gui.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
print('Could not import UI files, did you run contrib/generate-ui.sh')
2727
exit(-1)
2828

29-
from PySide2.QtGui import QRegExpValidator
30-
from PySide2.QtWidgets import QApplication, QDialog, QDialogButtonBox, QFileDialog, QLineEdit, QMessageBox, QMainWindow, QMenu
31-
from PySide2.QtCore import QCoreApplication, QRegExp, Signal, Slot
29+
from PySide6.QtGui import QRegularExpressionValidator
30+
from PySide6.QtWidgets import QApplication, QDialog, QDialogButtonBox, QFileDialog, QLineEdit, QMessageBox, QMainWindow, QMenu
31+
from PySide6.QtCore import QCoreApplication, QRegularExpression, Signal, Slot
3232

3333
def do_command(f, *args, **kwargs):
3434
result = {}
@@ -59,7 +59,7 @@ def __init__(self, client, prompt_pin=True):
5959
self.setWindowTitle('Send Pin')
6060
self.client = client
6161
self.ui.pin_lineedit.setFocus()
62-
self.ui.pin_lineedit.setValidator(QRegExpValidator(QRegExp("[1-9]+"), None))
62+
self.ui.pin_lineedit.setValidator(QRegularExpressionValidator(QRegularExpression("[1-9]+"), None))
6363
self.ui.pin_lineedit.setEchoMode(QLineEdit.Password)
6464

6565
self.ui.p1_button.clicked.connect(self.button_clicked(1))
@@ -100,7 +100,7 @@ def __init__(self, client):
100100
self.setWindowTitle('Get xpub')
101101
self.client = client
102102

103-
self.ui.path_lineedit.setValidator(QRegExpValidator(QRegExp("m(/[0-9]+['Hh]?)+"), None))
103+
self.ui.path_lineedit.setValidator(QRegularExpressionValidator(QRegularExpression("m(/[0-9]+['Hh]?)+"), None))
104104
self.ui.path_lineedit.setFocus()
105105
self.ui.buttonBox.button(QDialogButtonBox.Close).setAutoDefault(False)
106106

@@ -186,7 +186,7 @@ def __init__(self, client):
186186
self.setWindowTitle('Sign Message')
187187
self.client = client
188188

189-
self.ui.path_lineedit.setValidator(QRegExpValidator(QRegExp("m(/[0-9]+['Hh]?)+"), None))
189+
self.ui.path_lineedit.setValidator(QRegularExpressionValidator(QRegularExpression("m(/[0-9]+['Hh]?)+"), None))
190190
self.ui.msg_textedit.setFocus()
191191

192192
self.ui.signmsg_button.clicked.connect(self.signmsg_button_clicked)
@@ -207,7 +207,7 @@ def __init__(self, client):
207207
self.setWindowTitle('Display Address')
208208
self.client = client
209209

210-
self.ui.path_lineedit.setValidator(QRegExpValidator(QRegExp("m(/[0-9]+['Hh]?)+"), None))
210+
self.ui.path_lineedit.setValidator(QRegularExpressionValidator(QRegularExpression("m(/[0-9]+['Hh]?)+"), None))
211211
self.ui.path_lineedit.setFocus()
212212

213213
self.ui.go_button.clicked.connect(self.go_button_clicked)
@@ -239,7 +239,7 @@ def __init__(self, opts):
239239
self.ui.internal_checkbox.setChecked(opts['internal'])
240240
self.ui.keypool_checkbox.setChecked(opts['keypool'])
241241
self.ui.account_spinbox.setValue(opts['account'])
242-
self.ui.path_lineedit.setValidator(QRegExpValidator(QRegExp(r"m(/[0-9]+['Hh]?)+/\*"), None))
242+
self.ui.path_lineedit.setValidator(QRegularExpressionValidator(QRegExp(r"m(/[0-9]+['Hh]?)+/\*"), None))
243243
if opts['account_used']:
244244
self.ui.account_radio.setChecked(True)
245245
self.ui.path_radio.setChecked(False)

poetry.lock

+61-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pyaes = "^1.6"
2323
mnemonic = "~0"
2424
typing-extensions = "^4.4"
2525
libusb1 = ">=1.7,<4"
26-
pyside2 = { version = "^5.14.0", optional = true, python = "<3.10" }
26+
pyside6 = { version = ">=6.0,<7.0", optional = true }
2727
cbor = "^1.0.0"
2828
pyserial = "^3.5"
2929
dataclasses = {version = "^0.8", python = ">=3.6,<3.7"}
@@ -32,7 +32,7 @@ noiseprotocol = "^0.3.1"
3232
protobuf = "^4.23.3"
3333

3434
[tool.poetry.extras]
35-
qt = ["pyside2"]
35+
qt = ["pyside6"]
3636

3737
[tool.poetry.dev-dependencies]
3838
pyinstaller = "^5.3"

0 commit comments

Comments
 (0)