python3-pyu2f: drop the six dependency

Patch pyu2f to use queue, range and the input builtin instead of the
six.moves aliases, and drop the runtime dependency.

Built for intel-corei7-64.

AI-Generated: Uses Claude Code (Claude Opus 5)
Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Markus Volk
2026-09-21 16:21:41 -07:00
committed by Khem Raj
parent b634ddd7d2
commit f615b1807a
2 changed files with 71 additions and 1 deletions
@@ -0,0 +1,70 @@
From eb27c7a2a85f2ac21ea9fa0d30979b04fdb0f671 Mon Sep 17 00:00:00 2001
From: Markus Volk <f_l_k@t-online.de>
Date: Mon, 21 Sep 2026 13:23:08 +0200
Subject: [PATCH] drop the six dependency
six is a Python 2 compatibility shim and pyu2f does not need it on
Python 3: six.moves.queue and six.moves.range are queue and range, and
six.moves.input is input.
Upstream-Status: Pending
AI-Generated: Uses Claude Code (Claude Opus 5)
---
pyu2f/convenience/localauthenticator.py | 3 +--
pyu2f/hid/macos.py | 3 +--
setup.py | 3 ---
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/pyu2f/convenience/localauthenticator.py b/pyu2f/convenience/localauthenticator.py
index b03fa57..2b6b22a 100644
--- a/pyu2f/convenience/localauthenticator.py
+++ b/pyu2f/convenience/localauthenticator.py
@@ -13,7 +13,6 @@
# limitations under the License.
"""Convenience class for U2F signing with local security keys."""
-import six
import base64
import sys
@@ -36,7 +35,7 @@ class LocalAuthenticator(baseauthenticator.BaseAuthenticator):
device = u2f.GetLocalU2FInterface(origin=self.origin)
except errors.NoDeviceFoundError:
print_callback('Please insert your security key and press enter...')
- six.moves.input()
+ input()
device = u2f.GetLocalU2FInterface(origin=self.origin)
print_callback('Please touch your security key.\n')
diff --git a/pyu2f/hid/macos.py b/pyu2f/hid/macos.py
index 905bce2..a2ed2e6 100644
--- a/pyu2f/hid/macos.py
+++ b/pyu2f/hid/macos.py
@@ -13,11 +13,10 @@
# limitations under the License.
"""Implements HID device interface on MacOS using IOKit and HIDManager."""
-from six.moves import queue
-from six.moves import range
import ctypes
import ctypes.util
import logging
+import queue
import sys
import threading
diff --git a/setup.py b/setup.py
index 663706b..184be89 100644
--- a/setup.py
+++ b/setup.py
@@ -36,9 +36,6 @@ setuptools.setup(
author_email='pyu2f-team@google.com',
# Contained modules and scripts.
packages=setuptools.find_packages(exclude=["pyu2f.tests", "pyu2f.tests.*"]),
- install_requires=[
- 'six',
- ],
tests_require=[
'unittest2>=0.5.1',
'pyfakefs>=2.4',
@@ -3,6 +3,7 @@ HOMEPAGE = "https://github.com/google/pyu2f/"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
SRC_URI += "file://0001-drop-the-six-dependency.patch"
SRC_URI[sha256sum] = "a3caa3a11842fc7d5746376f37195e6af5f17c0a15737538bb1cebf656fb306b"
inherit pypi setuptools3
@@ -16,5 +17,4 @@ RDEPENDS:${PN} += " \
python3-logging \
python3-netclient \
python3-threading \
python3-six \
"