]> git.ipfire.org Git - thirdparty/jinja.git/commit
Import abstract base classes from collections.abc
authorFlorian Bruhin <git@the-compiler.org>
Wed, 27 Jun 2018 13:30:54 +0000 (15:30 +0200)
committerJuan Barreneche <snipperme@gmail.com>
Tue, 18 Jun 2019 13:45:22 +0000 (10:45 -0300)
commit593ee1e481d9534edd65928ac6bae5cfbd2eec14
tree05b29455d00ffcee77fb71df4ded7f8e5a86b186
parent4ce2449a4c17e6f2715b6bf04e4dfad1a5926984
Import abstract base classes from collections.abc

In Python 3.7, importing ABCs directly from the `collections` module shows a
warning (and in Python 3.8 it will stop working) - see
https://github.com/python/cpython/commit/c66f9f8d3909f588c251957d499599a1680e2320

This fixes various DeprecationWarnings such as those:

```
.../jinja2/utils.py:485: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import MutableMapping

.../jinja2/runtime.py:318: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Mapping
```
docs/jinjaext.py
jinja2/_compat.py
jinja2/runtime.py
jinja2/sandbox.py
jinja2/tests.py
jinja2/utils.py