Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove Python2 support #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pyu2f/convenience/localauthenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

"""Convenience class for U2F signing with local security keys."""
import six
import base64
import sys

Expand All @@ -36,7 +35,7 @@ def Authenticate(self, app_id, challenge_data,
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')
Expand Down
4 changes: 2 additions & 2 deletions pyu2f/hid/macos.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
# 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 range
import sys
import threading

Expand Down
9 changes: 2 additions & 7 deletions pyu2f/tests/apdu_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,12 @@

"""Tests for pyu2f.apdu."""

from six.moves import range
import sys
import range
import unittest

from pyu2f import apdu
from pyu2f import errors

if sys.version_info[:2] < (2, 7):
import unittest2 as unittest # pylint: disable=g-import-not-at-top
else:
import unittest # pylint: disable=g-import-not-at-top


class ApduTest(unittest.TestCase):

Expand Down
12 changes: 3 additions & 9 deletions pyu2f/tests/hidtransport_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,14 @@

"""Tests for pyu2f.hidtransport."""

from six.moves import range
import sys

import mock
import range
import unittest
from unittest import mock

from pyu2f import errors
from pyu2f import hidtransport
from pyu2f.tests.lib import util

if sys.version_info[:2] < (2, 7):
import unittest2 as unittest # pylint: disable=g-import-not-at-top
else:
import unittest # pylint: disable=g-import-not-at-top


def MakeKeyboard(path, usage):
d = {}
Expand Down
9 changes: 2 additions & 7 deletions pyu2f/tests/util_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,11 @@

"""Tests for pyu2f.tests.lib.util."""

from six.moves import range
import sys
import range
import unittest

from pyu2f.tests.lib import util

if sys.version_info[:2] < (2, 7):
import unittest2 as unittest # pylint: disable=g-import-not-at-top
else:
import unittest # pylint: disable=g-import-not-at-top


class UtilTest(unittest.TestCase):

Expand Down
3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,9 @@
# 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',
'mock>=1.0.1',
],
include_package_data=True,
platforms=["Windows", "Linux", "OS X", "macOS"],
Expand Down
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@ skipsdist = True
[testenv]
deps=pytest
pyfakefs
mock
six
commands=py.test pyu2f/tests/