From patchwork Fri Mar 30 18:13:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D2931: thirdparty: allow zope.interface.advice to be lazily imported From: phabricator X-Patchwork-Id: 29975 Message-Id: <6ac3aa12ee433c43bc6637b2c8ad93ea@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Fri, 30 Mar 2018 18:13:16 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHG49630e75635d: thirdparty: allow zope.interface.advice to be lazily imported (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2931?vs=7244&id=7398 REVISION DETAIL https://phab.mercurial-scm.org/D2931 AFFECTED FILES mercurial/thirdparty/zope/interface/declarations.py CHANGE DETAILS To: indygreg, #hg-reviewers, durin42 Cc: mercurial-devel diff --git a/mercurial/thirdparty/zope/interface/declarations.py b/mercurial/thirdparty/zope/interface/declarations.py --- a/mercurial/thirdparty/zope/interface/declarations.py +++ b/mercurial/thirdparty/zope/interface/declarations.py @@ -34,7 +34,7 @@ from types import ModuleType import weakref -from .advice import addClassAdvisor +from . import advice as advicemod from .interface import InterfaceClass from .interface import SpecificationBase from .interface import Specification @@ -451,7 +451,7 @@ raise TypeError(name+" can be used only once in a class definition.") locals['__implements_advice_data__'] = interfaces, classImplements - addClassAdvisor(_implements_advice, depth=3) + advicemod.addClassAdvisor(_implements_advice, depth=3) def implements(*interfaces): """Declare interfaces implemented by instances of a class @@ -732,7 +732,7 @@ locals["__provides__"] = _normalizeargs(interfaces) - addClassAdvisor(_classProvides_advice, depth=2) + advicemod.addClassAdvisor(_classProvides_advice, depth=2) def _classProvides_advice(cls): # This entire approach is invalid under Py3K. Don't even try to fix