Patchwork D2847: remotenames: work around move of ABCs in collections

login
register
mail settings
Submitter phabricator
Date March 14, 2018, 3:30 a.m.
Message ID <cb71ab83dadf3a8aeb202d6deb23f613@localhost.localdomain>
Download mbox | patch
Permalink /patch/29479/
State Not Applicable
Headers show

Comments

phabricator - March 14, 2018, 3:30 a.m.
durin42 updated this revision to Diff 7021.
durin42 edited the summary of this revision.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2847?vs=7004&id=7021

REVISION DETAIL
  https://phab.mercurial-scm.org/D2847

AFFECTED FILES
  hgext/remotenames.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/remotenames.py b/hgext/remotenames.py
--- a/hgext/remotenames.py
+++ b/hgext/remotenames.py
@@ -23,6 +23,11 @@ 
 from __future__ import absolute_import
 
 import collections
+try:
+    from collections import abc
+    mutablemapping = abc.MutableMapping
+except ImportError:
+    mutablemapping = collections.MutableMapping
 
 from mercurial.i18n import _
 
@@ -56,7 +61,7 @@ 
     default=True,
 )
 
-class lazyremotenamedict(collections.MutableMapping):
+class lazyremotenamedict(mutablemapping):
     """
     Read-only dict-like Class to lazily resolve remotename entries