Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Make code forwards-compatible with Python 3.9 #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion colorclass/codes.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down