Repository: bitcoin-core/HWI (language: python)

Issue:
make compatible with libusb1 >= 2
We now require libusb1 < 2.0:

https://github.com/bitcoin-core/HWI/blob/618158a2be09a4d7632f0b53d17b2bb2691ac616/setup.py#L22

Since 2.0.1 is the latest libusb1, this breaks lots of distributions that updated to 2.0.1.

Let's change the requirement so also libusb1 2.x is accepted.

So far it seems they bump the major number only because Python 2.x support was dropped.


Discussion / hints:
This was done in #531 but I forgot to regenerate setup.py

Fix patch:
diff --git a/poetry.lock b/poetry.lock
index f500162a0..6abe86e07 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -16,14 +16,14 @@ python-versions = "*"
 
 [[package]]
 name = "autopep8"
-version = "1.5.7"
+version = "1.6.0"
 description = "A tool that automatically formats Python code to conform to the PEP 8 style guide"
 category = "dev"
 optional = false
 python-versions = "*"
 
 [package.dependencies]
-pycodestyle = ">=2.7.0"
+pycodestyle = ">=2.8.0"
 toml = "*"
 
 [[package]]
@@ -401,11 +401,14 @@ python-versions = "*"
 
 [[package]]
 name = "pyparsing"
-version = "2.4.7"
+version = "3.0.1"
 description = "Python parsing module"
 category = "dev"
 optional = false
-python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
+python-versions = ">=3.6"
+
+[package.extras]
+diagrams = ["jinja2", "railroad-diagrams"]
 
 [[package]]
 name = "pyside2"
@@ -668,7 +671,7 @@ qt = ["pyside2"]
 [metadata]
 lock-version = "1.1"
 python-versions = "^3.6"
-content-hash = "2d82e783249adaca38c692fd38d3b25b64c78677fc0ca4fb026d931815b277f4"
+content-hash = "8faa5642d893bf6ccf29d8f839098c17b0ab4ed0c5753faa7201582a34adab22"
 
 [metadata.files]
 alabaster = [
@@ -680,8 +683,8 @@ altgraph = [
     {file = "altgraph-0.17.2.tar.gz", hash = "sha256:ebf2269361b47d97b3b88e696439f6e4cbc607c17c51feb1754f90fb79839158"},
 ]
 autopep8 = [
-    {file = "autopep8-1.5.7-py2.py3-none-any.whl", hash = "sha256:aa213493c30dcdac99537249ee65b24af0b2c29f2e83cd8b3f68760441ed0db9"},
-    {file = "autopep8-1.5.7.tar.gz", hash = "sha256:276ced7e9e3cb22e5d7c14748384a5cf5d9002257c0ed50c0e075b68011bb6d0"},
+    {file = "autopep8-1.6.0-py2.py3-none-any.whl", hash = "sha256:ed77137193bbac52d029a52c59bec1b0629b5a186c495f1eb21b126ac466083f"},
+    {file = "autopep8-1.6.0.tar.gz", hash = "sha256:44f0932855039d2c15c4510d6df665e4730f2b8582704fa48f9c55bd3e17d979"},
 ]
 babel = [
     {file = "Babel-2.9.1-py2.py3-none-any.whl", hash = "sha256:ab49e12b91d937cd11f0b67cb259a57ab4ad2b59ac7a3b41d6c06c0ac5b0def9"},
@@ -998,8 +1001,8 @@ pyinstaller-hooks-contrib = [
     {file = "pyinstaller_hooks_contrib-2021.3-py2.py3-none-any.whl", hash = "sha256:a52bc3834281266bbf77239cfc9521923336ca622f44f90924546ed6c6d3ad5e"},
 ]
 pyparsing = [
-    {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"},
-    {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"},
+    {file = "pyparsing-3.0.1-py3-none-any.whl", hash = "sha256:fd93fc45c47893c300bd98f5dd1b41c0e783eaeb727e7cea210dcc09d64ce7c3"},
+    {file = "pyparsing-3.0.1.tar.gz", hash = "sha256:84196357aa3566d64ad123d7a3c67b0e597a115c4934b097580e5ce220b91531"},
 ]
 pyside2 = [
     {file = "PySide2-5.15.2-5.15.2-cp27-cp27m-macosx_10_13_intel.whl", hash = "sha256:4f17a0161995678110447711d685fcd7b15b762810e8f00f6dc239bffb70a32e"},
diff --git a/pyproject.toml b/pyproject.toml
index 62407532a..5221bdcca 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -22,7 +22,7 @@ ecdsa = "~0"
 pyaes = "^1.6"
 mnemonic = "~0"
 typing-extensions = "^3.7"
-libusb1 = "^2.0"
+libusb1 = ">=1.7,<3"
 pyside2 = { version = "^5.14.0", optional = true, python = "<3.10" }
 bitbox02 = ">=5.3.0,<6.0.0"
 
@@ -32,9 +32,9 @@ qt = ["pyside2"]
 [tool.poetry.dev-dependencies]
 pyinstaller = "^4.0"
 autopep8 = "~1"
-flake8 = "~4"
+flake8 = ">=3"
 mypy = "~0"
-sphinx = "~4"
+sphinx = ">=4"
 sphinx-rtd-theme = "~1"
 sphinxcontrib-autoprogram = "~0"
 
diff --git a/setup.py b/setup.py
index c3a3a8423..2ec4dfb4b 100644
--- a/setup.py
+++ b/setup.py
@@ -19,13 +19,13 @@
 ['bitbox02>=5.3.0,<6.0.0',
  'ecdsa>=0,<1',
  'hidapi>=0,<1',
- 'libusb1>=1.7,<2.0',
+ 'libusb1>=1.7,<3',
  'mnemonic>=0,<1',
  'pyaes>=1.6,<2.0',
  'typing-extensions>=3.7,<4.0']
 
 extras_require = \
-{'qt': ['pyside2>=5.14.0,<6.0.0']}
+{'qt:python_version < "3.10"': ['pyside2>=5.14.0,<6.0.0']}
 
 entry_points = \
 {'console_scripts': ['hwi = hwilib._cli:main', 'hwi-qt = hwilib._gui:main']}
@@ -46,7 +46,7 @@
     'install_requires': install_requires,
     'extras_require': extras_require,
     'entry_points': entry_points,
-    'python_requires': '>=3.6,<3.10',
+    'python_requires': '>=3.6,<4.0',
 }
 
 


Test patch:
diff --git a/test/test_keepkey.py b/test/test_keepkey.py
index 413d2ece5..a75014e6a 100755
--- a/test/test_keepkey.py
+++ b/test/test_keepkey.py
@@ -297,7 +297,6 @@ def test_passphrase(self):
 
         # A passphrase will need to be sent
         result = self.do_command(self.dev_args + ['enumerate'])
-        print(result)
         for dev in result:
             if dev['type'] == 'keepkey' and dev['path'] == 'udp:127.0.0.1:11044':
                 self.assertTrue(dev['needs_passphrase_sent'])