(cls)
return base
Protect against re-patching the distutils if reloaded

    Also ensures that no other distutils extension monkeypatched the distutils
    first.
Protect against re-patching the distutils if reloaded
Protect against re - patching the distutils if reloaded
def get_unpatched_class(cls):
    """Protect against re-patching the distutils if reloaded

    Also ensures that no other distutils extension monkeypatched the distutils
    first.
    """
    external_bases = (
        cls
        for cls in _get_mro(cls)
        if not cls.__module__.startswith('setuptools')
    )
    base = next(external_bases)
    if not base.__module__.startswith('distutils'):
        msg = "distutils has already been patched by %r" % cls
        raise AssertionError(msg)
    return base
def get_unpatched_class ( cls ) : external_bases = ( cls for cls in _get_mro ( cls ) if not cls . __module__ . startswith ( 'setuptools' ) ) base = next ( external_bases ) if not base . __module__ . startswith ( 'distutils' ) : msg = "distutils has already been patched by %r" % cls raise AssertionError ( msg ) return base