This function is used in django/contrib/auth/middleware.py in a try/except block that catches ImproperlyConfigured. That'll need to be updated to ImportError. Could you audit for cases of this problem for the other functions that have changed?