14
0
forked from pool/python-pyu2f

Accepting request 1042401 from home:pgajdos:python

- do not require six
- added patches
  fix https://github.com/google/pyu2f/issues/34
  + python-pyu2f-no-six.patch

OBS-URL: https://build.opensuse.org/request/show/1042401
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyu2f?expand=0&rev=9
This commit is contained in:
2022-12-12 20:59:46 +00:00
committed by Git OBS Bridge
parent 240386abb0
commit cd7660ff92
3 changed files with 81 additions and 0 deletions

71
python-pyu2f-no-six.patch Normal file
View File

@@ -0,0 +1,71 @@
Index: pyu2f-0.1.5a/pyu2f/convenience/localauthenticator.py
===================================================================
--- pyu2f-0.1.5a.orig/pyu2f/convenience/localauthenticator.py
+++ pyu2f-0.1.5a/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(baseauthenticat
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')
Index: pyu2f-0.1.5a/pyu2f/hid/macos.py
===================================================================
--- pyu2f-0.1.5a.orig/pyu2f/hid/macos.py
+++ pyu2f-0.1.5a/pyu2f/hid/macos.py
@@ -13,8 +13,7 @@
# 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 queue
import ctypes
import ctypes.util
import logging
Index: pyu2f-0.1.5a/pyu2f/tests/apdu_test.py
===================================================================
--- pyu2f-0.1.5a.orig/pyu2f/tests/apdu_test.py
+++ pyu2f-0.1.5a/pyu2f/tests/apdu_test.py
@@ -14,7 +14,6 @@
"""Tests for pyu2f.apdu."""
-from six.moves import range
import sys
from pyu2f import apdu
Index: pyu2f-0.1.5a/pyu2f/tests/hidtransport_test.py
===================================================================
--- pyu2f-0.1.5a.orig/pyu2f/tests/hidtransport_test.py
+++ pyu2f-0.1.5a/pyu2f/tests/hidtransport_test.py
@@ -14,7 +14,6 @@
"""Tests for pyu2f.hidtransport."""
-from six.moves import range
import sys
import mock
Index: pyu2f-0.1.5a/pyu2f/tests/util_test.py
===================================================================
--- pyu2f-0.1.5a.orig/pyu2f/tests/util_test.py
+++ pyu2f-0.1.5a/pyu2f/tests/util_test.py
@@ -14,7 +14,6 @@
"""Tests for pyu2f.tests.lib.util."""
-from six.moves import range
import sys
from pyu2f.tests.lib import util

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Dec 12 14:56:04 UTC 2022 - pgajdos@suse.com
- do not require six
- added patches
fix https://github.com/google/pyu2f/issues/34
+ python-pyu2f-no-six.patch
-------------------------------------------------------------------
Tue Nov 1 09:26:18 UTC 2022 - Markéta Machová <mmachova@suse.com>

View File

@@ -26,6 +26,8 @@ URL: https://github.com/google/pyu2f/
Source: https://github.com/google/pyu2f/archive/refs/tags/%{version}.tar.gz#/pyu2f-%{version}.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/google/pyu2f/pull/32 fix DeprecationWarning for logging and fake_filesystem
Patch: fix-deprecation-warning.patch
# https://github.com/google/pyu2f/issues/34
Patch1: python-pyu2f-no-six.patch
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# SECTION test requirements