py3: remove conditional to import collections.abc.MutableMapping
authorManuel Jacob <me@manueljacob.de>
Tue, 31 May 2022 01:23:19 +0200
changeset 49292 33872fec41e7
parent 49291 1bf3eb65e970
child 49293 e3143ab9dadb
py3: remove conditional to import collections.abc.MutableMapping
hgext/remotenames.py
--- a/hgext/remotenames.py	Sun May 29 16:24:44 2022 +0200
+++ b/hgext/remotenames.py	Tue May 31 01:23:19 2022 +0200
@@ -25,6 +25,8 @@
 """
 
 
+import collections.abc
+
 from mercurial.i18n import _
 
 from mercurial.node import bin
@@ -34,7 +36,6 @@
     extensions,
     logexchange,
     namespaces,
-    pycompat,
     registrar,
     revsetlang,
     smartset,
@@ -44,15 +45,6 @@
 
 from mercurial.utils import stringutil
 
-if pycompat.ispy3:
-    import collections.abc
-
-    mutablemapping = collections.abc.MutableMapping
-else:
-    import collections
-
-    mutablemapping = collections.MutableMapping
-
 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
 # be specifying the version(s) of Mercurial they are tested with, or
@@ -81,7 +73,7 @@
 )
 
 
-class lazyremotenamedict(mutablemapping):
+class lazyremotenamedict(collections.abc.MutableMapping):
     """
     Read-only dict-like Class to lazily resolve remotename entries