From e8de995e4064352da930df3c0cb1e2fd542e7254387a1fde550f3502ac37d9d9 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 3 Dec 2019 15:24:09 +0000 Subject: [PATCH] Make the fix both py2k/py3k compliant. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyTrie?expand=0&rev=10 --- no-import-from-collections.patch | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/no-import-from-collections.patch b/no-import-from-collections.patch index e352fcf..3066ff8 100644 --- a/no-import-from-collections.patch +++ b/no-import-from-collections.patch @@ -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 -