summaryrefslogtreecommitdiff
path: root/upstream-layers/meta-openembedded/meta-python/recipes-devtools/python/python3-pyu2f/0001-drop-the-six-dependency.patch
blob: 87a6ab9fa02127f7d4d9235f44fbe56690fb6e8c (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
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
68
69
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',