From 09c504a4fe2868e97a091d6372c2380a48654a69 Mon Sep 17 00:00:00 2001 From: Mathijs de Bruin Date: Mon, 19 Sep 2011 15:07:24 +0200 Subject: [PATCH] Beware of cyclical imports! --- social_auth/utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/social_auth/utils.py b/social_auth/utils.py index 9f2775f..74a2a27 100644 --- a/social_auth/utils.py +++ b/social_auth/utils.py @@ -1,8 +1,6 @@ import urlparse from collections import defaultdict -from social_auth.backends import BACKENDS, OpenIdAuth, BaseOAuth, BaseOAuth2 - def sanitize_log_data(secret, data=None, leave_characters=4): """ @@ -62,6 +60,11 @@ def sanitize_redirect(host, redirect_to): def group_backend_by_type(items, key=lambda x: x): """Group items by backend type.""" + + # Beware of cyclical imports! + from social_auth.backends import \ + BACKENDS, OpenIdAuth, BaseOAuth, BaseOAuth2 + result = defaultdict(list) for item in items: -- 2.39.5