'Get an attribute from the module object, possibly emitting a warning.
If the specified name has been deprecated, then a warning is issued.
(Unless certain obscure conditions are met; see
L{_ModuleProxy._lastWasPath} for more information about what might quash
such a warning.)'

def __getattribute__(self, name):

    state = _InternalState(self)
    if state._lastWasPath:
        deprecatedAttribute = None
    else:
        deprecatedAttribute = state._deprecatedAttributes.get(name)
    if (deprecatedAttribute is not None):
        value = deprecatedAttribute.get()
    else:
        value = getattr(state._module, name)
    if (name == '__path__'):
        state._lastWasPath = True
    else:
        state._lastWasPath = False
    return value
