[freeipa PR#2108][opened] [py37] Import ABCs from collections.abc
by tiran
URL: https://github.com/freeipa/freeipa/pull/2108
Author: tiran
Title: #2108: [py37] Import ABCs from collections.abc
Action: opened
PR body:
"""
Manual backport of PR #2097 to keep the 4.6 compatible with future versions of pylint.
Python 3 has moved all collection abstract base classes to
collections.abc. Python 3.7 started to deprecate the old aliases.
The whole import block needs to be protected with import-error and
no-name-in-module, because Python 2 doesn't have collections.abc module and
collections.abc.Mapping, while Python 3 doesn't have collections.Mapping.
Fixes: https://pagure.io/freeipa/issue/7609
Signed-off-by: Christian Heimes <cheimes(a)redhat.com>
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/2108/head:pr2108
git checkout pr2108
5 years, 9 months