(fxn)
return set_loader_wrapper
Set __loader__ on the returned module.

    This function is deprecated.
Set __loader__ on the returned module.
Set __loader__ on the returned module .
def set_loader(fxn):
    """Set __loader__ on the returned module.

    This function is deprecated.

    """
    @functools.wraps(fxn)
    def set_loader_wrapper(self, *args, **kwargs):
        warnings.warn('The import system now takes care of this automatically; '
                      'this decorator is slated for removal in Python 3.12',
                      DeprecationWarning, stacklevel=2)
        module = fxn(self, *args, **kwargs)
        if getattr(module, '__loader__', None) is None:
            module.__loader__ = self
        return module
    return set_loader_wrapper
def set_loader ( fxn ) : @ functools . wraps ( fxn ) def set_loader_wrapper ( self , * args , * * kwargs ) : warnings . warn ( 'The import system now takes care of this automatically; ' 'this decorator is slated for removal in Python 3.12' , DeprecationWarning , stacklevel = 2 ) module = fxn ( self , * args , * * kwargs ) if getattr ( module , '__loader__' , None ) is None : module . __loader__ = self return module return set_loader_wrapper