Make the fix both py2k/py3k compliant.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyTrie?expand=0&rev=10
This commit is contained in:
@@ -12,19 +12,17 @@ Fixes #1
|
||||
pytrie.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pytrie.py b/pytrie.py
|
||||
index fb2d8f5..ed8de68 100644
|
||||
--- a/pytrie.py
|
||||
+++ b/pytrie.py
|
||||
@@ -45,7 +45,7 @@ __all__ = ['Trie', 'StringTrie', 'SortedTrie', 'SortedStringTrie', 'Node']
|
||||
@@ -45,7 +45,10 @@ __all__ = ['Trie', 'StringTrie', 'Sorted
|
||||
|
||||
import sys
|
||||
from copy import copy
|
||||
-from collections import MutableMapping
|
||||
+from collections.abc import MutableMapping
|
||||
+try:
|
||||
+ from collections.abc import MutableMapping
|
||||
+except ImportError:
|
||||
+ from collections import MutableMapping
|
||||
|
||||
import sortedcontainers
|
||||
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user