File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1313import socket
1414import logging
1515import threading
16- import collections
16+ import collections . abc
1717from pydoc import locate
1818from datetime import datetime
1919
@@ -344,8 +344,8 @@ def dictupdate(dest, upd):
344344 Merges upd recursively into dest.
345345 '''
346346 recursive_update = True
347- if (not isinstance (dest , collections .Mapping )) or (
348- not isinstance (upd , collections .Mapping )
347+ if (not isinstance (dest , collections .abc . Mapping )) or (
348+ not isinstance (upd , collections .abc . Mapping )
349349 ):
350350 raise TypeError ('Cannot update using non-dict types in dictupdate.update()' )
351351 updkeys = list (upd .keys ())
@@ -358,8 +358,8 @@ def dictupdate(dest, upd):
358358 dest_subkey = dest .get (key , None )
359359 except AttributeError :
360360 dest_subkey = None
361- if isinstance (dest_subkey , collections .Mapping ) and isinstance (
362- val , collections .Mapping
361+ if isinstance (dest_subkey , collections .abc . Mapping ) and isinstance (
362+ val , collections .abc . Mapping
363363 ):
364364 ret = dictupdate (dest_subkey , val )
365365 dest [key ] = ret
You can’t perform that action at this time.
0 commit comments