fix depreciated import from collections

This commit is contained in:
Sebastian Englbrecht 2022-04-12 20:22:43 +02:00 committed by Blake Blackshear
parent d995761419
commit c6234bf548

View File

@ -1,4 +1,3 @@
import collections
import copy
import datetime
import hashlib
@ -11,6 +10,7 @@ import threading
import time
import traceback
from abc import ABC, abstractmethod
from collections.abc import Mapping
from multiprocessing import shared_memory
from typing import AnyStr
@ -34,7 +34,7 @@ def deep_merge(dct1: dict, dct2: dict, override=False, merge_lists=False) -> dic
for k, v2 in dct2.items():
if k in merged:
v1 = merged[k]
if isinstance(v1, dict) and isinstance(v2, collections.Mapping):
if isinstance(v1, dict) and isinstance(v2, Mapping):
merged[k] = deep_merge(v1, v2, override)
elif isinstance(v1, list) and isinstance(v2, list):
if merge_lists: