Skip to content

Commit

Permalink
Update for Python 3.11
Browse files Browse the repository at this point in the history
It's collections.abc.Mapping now, instead of collections.Mapping

QubesOS/qubes-issues#6982
  • Loading branch information
marmarek committed Jan 31, 2023
1 parent 1c2f379 commit e3ee7f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _utils/matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from __future__ import absolute_import

# Import python libs
import collections
import collections.abc
import functools
import logging
import operator
Expand Down Expand Up @@ -53,7 +53,7 @@ class Regex(six.text_type):


def getter(index, element, *ignored): # pylint: disable=W0613
if isinstance(element, collections.Mapping):
if isinstance(element, collections.abc.Mapping):
getter_ = operator.itemgetter
else:
getter_ = operator.attrgetter
Expand Down Expand Up @@ -243,7 +243,7 @@ def itext(element):
element:
'''
# Dictionary
if isinstance(element, collections.Mapping):
if isinstance(element, collections.abc.Mapping):
return '\n'.join(map(six.text_type, six.itervalues(element)))

# Tuple / list
Expand Down

0 comments on commit e3ee7f7

Please sign in to comment.