mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-04 15:34:01 -07:00
Python 3.8 collections compatibility fixes.
Includes a new pylint blacklist plugin to prevent regressions.
This commit is contained in:
parent
c4d1f0d416
commit
a11f631ee4
56 changed files with 317 additions and 104 deletions
|
@ -18,7 +18,6 @@
|
|||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import collections
|
||||
import inspect
|
||||
import os
|
||||
import time
|
||||
|
@ -27,6 +26,8 @@ from abc import ABCMeta, abstractmethod
|
|||
from datetime import datetime
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
from ansible.module_utils.common._collections_compat import Mapping
|
||||
|
||||
try:
|
||||
from enum import Enum # enum is a ovirtsdk4 requirement
|
||||
import ovirtsdk4 as sdk
|
||||
|
@ -512,7 +513,7 @@ class BaseModule(object):
|
|||
|
||||
def diff_update(self, after, update):
|
||||
for k, v in update.items():
|
||||
if isinstance(v, collections.Mapping):
|
||||
if isinstance(v, Mapping):
|
||||
after[k] = self.diff_update(after.get(k, dict()), v)
|
||||
else:
|
||||
after[k] = update[k]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue