diff options
author | Karthikeyan Singaravelan <tir.karthi@gmail.com> | 2020-07-20 23:03:04 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-20 13:33:04 -0400 |
commit | a7b06a81f02ed97975f45e0abd70b731c686fc86 (patch) | |
tree | 10652c60f806376dfdac6541fe7ad73bbffaefa9 /synapse/events | |
parent | Change sample config's postgres user to synapse_user (#7889) (diff) | |
download | synapse-a7b06a81f02ed97975f45e0abd70b731c686fc86.tar.xz |
Fix deprecation warning: import ABC from collections.abc (#7892)
Diffstat (limited to 'synapse/events')
-rw-r--r-- | synapse/events/utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/events/utils.py b/synapse/events/utils.py index f6b507977f..11f0d34ec8 100644 --- a/synapse/events/utils.py +++ b/synapse/events/utils.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -import collections +import collections.abc import re from typing import Any, Mapping, Union @@ -424,7 +424,7 @@ def copy_power_levels_contents( Raises: TypeError if the input does not look like a valid power levels event content """ - if not isinstance(old_power_levels, collections.Mapping): + if not isinstance(old_power_levels, collections.abc.Mapping): raise TypeError("Not a valid power-levels content: %r" % (old_power_levels,)) power_levels = {} @@ -434,7 +434,7 @@ def copy_power_levels_contents( power_levels[k] = v continue - if isinstance(v, collections.Mapping): + if isinstance(v, collections.abc.Mapping): power_levels[k] = h = {} for k1, v1 in v.items(): # we should only have one level of nesting |