Skip to content

Commit

Permalink
Fix import error from ABC classes in Python >= 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Til Boerner committed Jan 28, 2022
1 parent ff9979c commit e31044f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion cherrymusicserver/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@
import re
import weakref

from collections import Mapping, namedtuple
try:
from collections.abc import Mapping
except ImportError:
from collections import Mapping
from collections import namedtuple
from backport.collections import OrderedDict
from backport import callable

Expand Down
5 changes: 4 additions & 1 deletion tinytag/tinytag.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>
#

from collections import MutableMapping
try:
from collections.abc import MutableMapping
except ImportError:
from collections import MutableMapping
import codecs
from functools import reduce
import struct
Expand Down

0 comments on commit e31044f

Please sign in to comment.