From 0bf67268edaffea2640c2f05b301a9f857d9e174 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 16 Sep 2022 15:46:32 +0200 Subject: Merging upstream version 2.2.2 (Closes: #1014036). Signed-off-by: Daniel Baumann --- colorclass/codes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'colorclass') diff --git a/colorclass/codes.py b/colorclass/codes.py index b0ecb03..a69958d 100644 --- a/colorclass/codes.py +++ b/colorclass/codes.py @@ -1,7 +1,10 @@ """Handles mapping between color names and ANSI codes and determining auto color codes.""" import sys -from collections import Mapping +try: + from collections import Mapping +except ImportError: + from collections.abc import Mapping BASE_CODES = { '/all': 0, 'b': 1, 'f': 2, 'i': 3, 'u': 4, 'flash': 5, 'outline': 6, 'negative': 7, 'invis': 8, 'strike': 9, -- cgit v1.2.3