def _moved_global(old_name, new_module=None, new_name=None):
 assert (new_module or new_name)
 if isinstance(new_module, _MovedGlobals):
  new_module = new_module._mg__old_ref
 old_module = inspect.getmodule(inspect.stack()[1][0])
 new_module = (new_module or old_module)
 new_name = (new_name or old_name)
 _MovedGlobals._mg__moves[(old_module, old_name)] = (new_module, new_name)

def _moved_global ( old_name , new_module = None , new_name = None ) : assert ( new_module or new_name ) if isinstance ( new_module , _MovedGlobals ) : new_module = new_module . _mg__old_ref old_module = inspect . getmodule ( inspect . stack ( ) [ 1 ] [ 0 ] ) new_module = ( new_module or old_module ) new_name = ( new_name or old_name ) _MovedGlobals . _mg__moves [ ( old_module , old_name ) ] = ( new_module , new_name )
deprecate a single attribute in a module .