File fix-using-deprecated-collections.patch of Package saltbundlepy-jinja2
diff -urN a/docs/jinjaext.py b/docs/jinjaext.py
--- a/docs/jinjaext.py
+++ b/docs/jinjaext.py
@@ -8,7 +8,7 @@
:copyright: Copyright 2008 by Armin Ronacher.
:license: BSD.
"""
-import collections
+import collections.abc
import os
import re
import inspect
@@ -160,7 +160,7 @@
members = []
for key, name in node.__dict__.items():
if not key.startswith('_') and \
- not hasattr(node.__base__, key) and isinstance(name, collections.Callable):
+ not hasattr(node.__base__, key) and isinstance(name, collections.abc.Callable):
members.append(key)
if members:
members.sort()
diff -urN a/jinja2/runtime.py b/jinja2/runtime.py
--- a/jinja2/runtime.py
+++ b/jinja2/runtime.py
@@ -315,7 +315,7 @@
# register the context as mapping if possible
try:
- from collections import Mapping
+ from collections.abc import Mapping
Mapping.register(Context)
except ImportError:
pass
diff -urN a/jinja2/sandbox.py b/jinja2/sandbox.py
--- a/jinja2/sandbox.py
+++ b/jinja2/sandbox.py
@@ -14,7 +14,7 @@
"""
import types
import operator
-from collections import Mapping
+from collections.abc import Mapping
from jinja2.environment import Environment
from jinja2.exceptions import SecurityError
from jinja2._compat import string_types, PY2
@@ -79,7 +79,7 @@
pass
#: register Python 2.6 abstract base classes
-from collections import MutableSet, MutableMapping, MutableSequence
+from collections.abc import MutableSet, MutableMapping, MutableSequence
_mutable_set_types += (MutableSet,)
_mutable_mapping_types += (MutableMapping,)
_mutable_sequence_types += (MutableSequence,)
diff -urN a/jinja2/tests.py b/jinja2/tests.py
--- a/jinja2/tests.py
+++ b/jinja2/tests.py
@@ -10,7 +10,7 @@
"""
import operator
import re
-from collections import Mapping
+from collections.abc import Mapping
from jinja2.runtime import Undefined
from jinja2._compat import text_type, string_types, integer_types
import decimal
diff -urN a/jinja2/utils.py b/jinja2/utils.py
--- a/jinja2/utils.py
+++ b/jinja2/utils.py
@@ -502,7 +502,7 @@
# register the LRU cache as mutable mapping if possible
try:
- from collections import MutableMapping
+ from collections.abc import MutableMapping
MutableMapping.register(LRUCache)
except ImportError:
pass