diff options
author | Zamarin Arthur <arthurzam@gmail.com> | 2021-05-23 08:16:55 +0300 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2021-05-23 11:28:58 +0200 |
commit | ca4427ca8544e956eb940fbc9221a762f5ffd43e (patch) | |
tree | 2523225ab4de8eb48ee83209b7e34011165c4e46 /dev-python/colorclass | |
parent | dev-python/rply: enable doc generation (diff) | |
download | gentoo-ca4427ca8544e956eb940fbc9221a762f5ffd43e.tar.gz gentoo-ca4427ca8544e956eb940fbc9221a762f5ffd43e.tar.bz2 gentoo-ca4427ca8544e956eb940fbc9221a762f5ffd43e.zip |
dev-python/colorclass: bump to python 3.10
passes tests
Signed-off-by: Zamarin Arthur <arthurzam@gmail.com>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/colorclass')
-rw-r--r-- | dev-python/colorclass/colorclass-2.2.0-r1.ebuild | 7 | ||||
-rw-r--r-- | dev-python/colorclass/files/colorclass-2.2.0-fix-py3.10.patch | 28 |
2 files changed, 32 insertions, 3 deletions
diff --git a/dev-python/colorclass/colorclass-2.2.0-r1.ebuild b/dev-python/colorclass/colorclass-2.2.0-r1.ebuild index 8f1559141ef3..fde6c8c536af 100644 --- a/dev-python/colorclass/colorclass-2.2.0-r1.ebuild +++ b/dev-python/colorclass/colorclass-2.2.0-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 2019-2020 Gentoo Authors +# Copyright 2019-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{7..9} pypy3 ) +PYTHON_COMPAT=( python3_{7..10} pypy3 ) inherit distutils-r1 DESCRIPTION="Colorful worry-free console applications for multiple platforms" @@ -15,7 +15,8 @@ SLOT="0" KEYWORDS="amd64 ~arm64 x86" PATCHES=( - "${FILESDIR}/colorclass-2.2.0-tests.patch" + "${FILESDIR}/${P}-tests.patch" + "${FILESDIR}/${P}-fix-py3.10.patch" ) distutils_enable_tests pytest diff --git a/dev-python/colorclass/files/colorclass-2.2.0-fix-py3.10.patch b/dev-python/colorclass/files/colorclass-2.2.0-fix-py3.10.patch new file mode 100644 index 000000000000..ee67d6d40bb3 --- /dev/null +++ b/dev-python/colorclass/files/colorclass-2.2.0-fix-py3.10.patch @@ -0,0 +1,28 @@ +From f8bbe9fdcff1d97b1d0e5dcb94680923cc43a507 Mon Sep 17 00:00:00 2001 +From: Ralph Broenink <ralph@ralphbroenink.net> +Date: Mon, 24 Aug 2020 14:49:24 +0200 +Subject: [PATCH] Make code forwards-compatible with Python 3.9 + +Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working +--- + colorclass/codes.py | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/colorclass/codes.py b/colorclass/codes.py +index b0ecb03..8b6085d 100644 +--- a/colorclass/codes.py ++++ b/colorclass/codes.py +@@ -1,7 +1,12 @@ + """Handles mapping between color names and ANSI codes and determining auto color codes.""" + + import sys +-from collections import Mapping ++try: ++ # Using or importing the ABCs from 'collections' instead of from 'collections.abc' is ++ # deprecated since Python 3.3, and in 3.9 it will stop working ++ from collections.abc import Mapping ++except ImportError: ++ from collections import Mapping + + BASE_CODES = { + '/all': 0, 'b': 1, 'f': 2, 'i': 3, 'u': 4, 'flash': 5, 'outline': 6, 'negative': 7, 'invis': 8, 'strike': 9, |