Skip to content

Commit b53d68b

Browse files
authored
Merge pull request #295 from Meldanya/master
Fix DeprecationWarning for MutableMapping import
2 parents 9cb7ea0 + ec3ce7a commit b53d68b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

symengine/lib/symengine_wrapper.pyx

+7-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ import collections
1919
import warnings
2020
from symengine.compatibility import is_sequence
2121
import os
22+
import sys
23+
24+
if sys.version_info[0] == 2:
25+
from collections import MutableMapping
26+
else:
27+
from collections.abc import MutableMapping
2228

2329
try:
2430
import numpy as np
@@ -720,7 +726,7 @@ cdef class _DictBasic(object):
720726
return d
721727

722728

723-
class DictBasic(_DictBasic, collections.MutableMapping):
729+
class DictBasic(_DictBasic, MutableMapping):
724730

725731
def __str__(self):
726732
return "{" + ", ".join(["%s: %s" % (str(key), str(value)) for key, value in self.items()]) + "}"

0 commit comments

Comments
 (0)