diff options
Diffstat (limited to 'src/zope/interface/declarations.py')
| -rw-r--r-- | src/zope/interface/declarations.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/zope/interface/declarations.py b/src/zope/interface/declarations.py index b42c906..d77c824 100644 --- a/src/zope/interface/declarations.py +++ b/src/zope/interface/declarations.py @@ -195,6 +195,18 @@ class _ImmutableDeclaration(Declaration): # object, and that includes a method.) return _ImmutableDeclaration + @property + def _v_attrs(self): + # _v_attrs is not a public, documented property, but some client + # code uses it anyway as a convenient place to cache things. To keep + # the empty declaration truly immutable, we must ignore that. That includes + # ignoring assignments as well. + return {} + + @_v_attrs.setter + def _v_attrs(self, new_attrs): + pass + ############################################################################## # |
