changeset 49300:33872fec41e7

py3: remove conditional to import collections.abc.MutableMapping
author Manuel Jacob <me@manueljacob.de>
date Tue, 31 May 2022 01:23:19 +0200
parents 1bf3eb65e970
children e3143ab9dadb
files hgext/remotenames.py
diffstat 1 files changed, 3 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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