mercurial/interfaces/util.py
changeset 52447 3c6809941280
parent 51859 f4733654f144
equal deleted inserted replaced
52446:c1674551c109 52447:3c6809941280
     9 # bookkeeping for declaring interfaces. So, we use stubs for various
     9 # bookkeeping for declaring interfaces. So, we use stubs for various
    10 # zope.interface primitives unless instructed otherwise.
    10 # zope.interface primitives unless instructed otherwise.
    11 
    11 
    12 from __future__ import annotations
    12 from __future__ import annotations
    13 
    13 
    14 from .. import encoding
    14 if True:
    15 
       
    16 if encoding.environ.get(b'HGREALINTERFACES'):
       
    17     from ..thirdparty.zope import interface as zi
       
    18 
       
    19     Attribute = zi.Attribute
       
    20     Interface = zi.Interface
       
    21     implementer = zi.implementer
       
    22 else:
       
    23 
    15 
    24     class Attribute:
    16     class Attribute:
    25         def __init__(self, __name__, __doc__=b''):
    17         def __init__(self, __name__, __doc__=b''):
    26             pass
    18             pass
    27 
    19