summaryrefslogtreecommitdiff
path: root/dev-python/colorclass
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2021-05-23 13:47:47 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2021-05-23 13:47:47 +0000
commit861ce66466591557d971d260778ad943d9dc7516 (patch)
treeea407b9ac0c5ae38cb89419b852c60cc137f1225 /dev-python/colorclass
parentcef5e34aa0c235c2d6a614e1290960058dd38351 (diff)
downloadbaldeagleos-repo-861ce66466591557d971d260778ad943d9dc7516.tar.gz
baldeagleos-repo-861ce66466591557d971d260778ad943d9dc7516.tar.xz
baldeagleos-repo-861ce66466591557d971d260778ad943d9dc7516.zip
Adding metadata
Diffstat (limited to 'dev-python/colorclass')
-rw-r--r--dev-python/colorclass/colorclass-2.2.0-r1.ebuild5
-rw-r--r--dev-python/colorclass/files/colorclass-2.2.0-fix-py3.10.patch28
2 files changed, 31 insertions, 2 deletions
diff --git a/dev-python/colorclass/colorclass-2.2.0-r1.ebuild b/dev-python/colorclass/colorclass-2.2.0-r1.ebuild
index 2b5eb66b969e..1edb3795986c 100644
--- a/dev-python/colorclass/colorclass-2.2.0-r1.ebuild
+++ b/dev-python/colorclass/colorclass-2.2.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019-2020 Gentoo Authors
+# Copyright 2019-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -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,