def _makeProxy(self, **attrs): """ Create a temporary module proxy object. @param **kw: Attributes to initialise on the temporary module object @rtype: L{twistd.python.deprecate._ModuleProxy} """ mod = types.ModuleType('foo') for key, value in attrs.items(): setattr(mod, key, value) return deprecate._ModuleProxy(mod)