diff mercurial/thirdparty/zope/interface/document.py @ 37178:68ee61822182

thirdparty: port zope.interface to relative imports By using relative imports, we're guaranteed to get modules vendored with Mercurial rather than other random modules that might be in sys.path. My editor strips trailing whitespace on save. So some minor source code cleanup was also performed as part of this commit. # no-check-commit because some modified lines have double newlines Differential Revision: https://phab.mercurial-scm.org/D2930
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 21 Mar 2018 19:52:30 -0700
parents 943d77fc07a3
children
line wrap: on
line diff
--- a/mercurial/thirdparty/zope/interface/document.py	Wed Mar 21 19:49:07 2018 -0700
+++ b/mercurial/thirdparty/zope/interface/document.py	Wed Mar 21 19:52:30 2018 -0700
@@ -16,8 +16,10 @@
 This module provides a function, asStructuredText, for rendering an
 interface as structured text.
 """
-import zope.interface
 
+from __future__ import absolute_import
+
+from . import Interface
 
 def asStructuredText(I, munge=0, rst=False):
     """ Output structured text format.  Note, this will whack any existing
@@ -41,7 +43,7 @@
 
     bases = [base
              for base in I.__bases__
-             if base is not zope.interface.Interface
+             if base is not Interface
              ]
     if bases:
         outp(_justify_and_indent("This interface extends:", level, munge))