Skip to content

Commit

Permalink
python3.10 support: collection.Mapping -> collection.abc.Mapping (#1020)
Browse files Browse the repository at this point in the history
python3.10 support: collection.Mapping -> collection.abc.Mapping

repair this: #1019
  • Loading branch information
likefallwind authored Nov 4, 2022
1 parent 4babcbf commit 7e6dfd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dpgen/generator/lib/cp2k.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def update_dict(old_d, update_d):
:old_d: old dictionary
:update_d: some update value written in dictionary form
"""
import collections
import collections.abc
for k, v in update_d.items():
if (k in old_d and isinstance(old_d[k], dict) and isinstance(update_d[k], collections.Mapping)):
if (k in old_d and isinstance(old_d[k], dict) and isinstance(update_d[k], collections.abc.Mapping)):
update_dict(old_d[k], update_d[k])
else:
old_d[k] = update_d[k]
Expand Down

0 comments on commit 7e6dfd3

Please sign in to comment.