mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-10-05 15:07:13 +00:00
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:
1 parent
4ddf2d5650
commit
0ebc7c6b75
2 files changed
+71
-1
No files matched your search
@@ -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',
|
||||
Reference in new issue
Block a user