Removing cruft from wrapt
@@ -207,15 +207,7 @@ class ContextualizingProxy(wrapt.ObjectProxy):
if name.startswith('_self_'):
object.__setattr__(self, name, value)
elif name == '__wrapped__':
- object.__setattr__(self, name, value)
- try:
- object.__delattr__(self, '__qualname__')
- except AttributeError:
- pass
- try:
- object.__setattr__(self, '__qualname__', value.__qualname__)
- except AttributeError:
- pass
+ raise AttributeError('Cannot set wrapped after initialization')
elif name == '__qualname__':
setattr(get_wrapped(self), name, value)
object.__setattr__(self, name, value)
