Skip to content

Commit e996aa8

Browse files
authored
Update crypto.py
MutableMapping needs to be explicitly imported from collections.abc since 3.8 https://pyquestions.com/cannot-import-name-mutablemapping-from-collections
1 parent fbaea75 commit e996aa8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/xmlsec/crypto.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import logging
55
import threading
66
import six
7+
import sys
78
from six.moves import xrange
89
from xmlsec import constants
910
from binascii import hexlify
@@ -20,6 +21,8 @@
2021

2122
if six.PY2:
2223
from UserDict import DictMixin
24+
elif sys.version_info[:2] >= (3, 8):
25+
from collections.abc import MutableMapping as DictMixin
2326
else:
2427
from collections import MutableMapping as DictMixin
2528

0 commit comments

Comments
 (0)