public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/colorclass/, dev-python/colorclass/files/
@ 2021-05-23  9:29 Michał Górny
  0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2021-05-23  9:29 UTC (permalink / raw
  To: gentoo-commits

commit:     ca4427ca8544e956eb940fbc9221a762f5ffd43e
Author:     Zamarin Arthur <arthurzam <AT> gmail <DOT> com>
AuthorDate: Sun May 23 05:16:55 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun May 23 09:28:58 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca4427ca

dev-python/colorclass: bump to python 3.10

passes tests

Signed-off-by: Zamarin Arthur <arthurzam <AT> gmail.com>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/colorclass/colorclass-2.2.0-r1.ebuild   |  7 +++---
 .../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 8f1559141ef..fde6c8c536a 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 00000000000..ee67d6d40bb
--- /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,


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-23  9:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-23  9:29 [gentoo-commits] repo/gentoo:master commit in: dev-python/colorclass/, dev-python/colorclass/files/ Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox