summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2021-08-23 21:27:20 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2021-08-24 21:19:27 +0300
commit69c5596e5eafc8d0ef9109e4d034a4561b71cfd2 (patch)
tree3626b1d71b724ec559c55f9986d26cf0b9e53959 /dev-python/flask-login
parentdev-python/flask-compress: add github upstream metadata (diff)
downloadgentoo-69c5596e5eafc8d0ef9109e4d034a4561b71cfd2.tar.gz
gentoo-69c5596e5eafc8d0ef9109e4d034a4561b71cfd2.tar.bz2
gentoo-69c5596e5eafc8d0ef9109e4d034a4561b71cfd2.zip
dev-python/flask-login: enable py3.10
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-python/flask-login')
-rw-r--r--dev-python/flask-login/files/flask-login-0.5.0-fix-tests-py3.10.patch26
-rw-r--r--dev-python/flask-login/flask-login-0.5.0.ebuild8
2 files changed, 32 insertions, 2 deletions
diff --git a/dev-python/flask-login/files/flask-login-0.5.0-fix-tests-py3.10.patch b/dev-python/flask-login/files/flask-login-0.5.0-fix-tests-py3.10.patch
new file mode 100644
index 000000000000..858783b36e77
--- /dev/null
+++ b/dev-python/flask-login/files/flask-login-0.5.0-fix-tests-py3.10.patch
@@ -0,0 +1,26 @@
+From: Karthikeyan Singaravelan <tir.karthi@gmail.com>
+Date: Sun, 10 Jan 2021 21:12:36 +0530
+Subject: [PATCH] Import ABC from collections.abc (#525)
+
+--- a/test_login.py
++++ b/test_login.py
+@@ -12,6 +12,10 @@
+ from mock import ANY, patch, Mock
+ except ImportError:
+ from unittest.mock import ANY, patch, Mock
++try:
++ from collections.abc import Hashable
++except ImportError:
++ from collections import Hashable
+ from semantic_version import Version
+
+
+@@ -1548,7 +1552,7 @@ def test_equality(self):
+ self.assertTrue(first != u'1')
+
+ def test_hashable(self):
+- self.assertTrue(isinstance(UserMixin(), collections.Hashable))
++ self.assertTrue(isinstance(UserMixin(), Hashable))
+
+
+ class AnonymousUserTestCase(unittest.TestCase):
diff --git a/dev-python/flask-login/flask-login-0.5.0.ebuild b/dev-python/flask-login/flask-login-0.5.0.ebuild
index 3891e82cb9d3..b23911bf5684 100644
--- a/dev-python/flask-login/flask-login-0.5.0.ebuild
+++ b/dev-python/flask-login/flask-login-0.5.0.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
DESCRIPTION="Login session support for Flask"
@@ -27,9 +27,13 @@ DEPEND="
dev-python/semantic_version[${PYTHON_USEDEP}]
)"
+PATCHES=(
+ "${FILESDIR}/${P}-fix-tests-py3.10.patch"
+)
+
distutils_enable_sphinx docs
distutils_enable_tests pytest
python_test() {
- pytest -vv -p no:httpbin || die "Tests failed with ${EPYTHON}"
+ epytest -p no:httpbin
}