From ee55380a6c1e73d37ede7ec992791ab36cc112b4 Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 17 Apr 2015 16:49:32 +0100 Subject: [PATCH 1/3] Switched to standard import_module as the Django embedded one is deprecated and will be removed in next version --- rest_auth/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rest_auth/utils.py b/rest_auth/utils.py index 5c36b6b..20ba808 100644 --- a/rest_auth/utils.py +++ b/rest_auth/utils.py @@ -1,5 +1,9 @@ from six import string_types -from django.utils.importlib import import_module +import sys +if sys.version_info < (2, 6): + from django.utils.importlib import import_module +else: + from importlib import import_module def import_callable(path_or_callable): From 7aa2fdb18cbe4c114ab3bdd39b7825652ed8360f Mon Sep 17 00:00:00 2001 From: Antoine Date: Mon, 27 Apr 2015 20:05:25 +0800 Subject: [PATCH 2/3] Fixed version check --- rest_auth/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_auth/utils.py b/rest_auth/utils.py index 20ba808..fa338a9 100644 --- a/rest_auth/utils.py +++ b/rest_auth/utils.py @@ -1,6 +1,6 @@ from six import string_types import sys -if sys.version_info < (2, 6): +if sys.version_info < (2, 7): from django.utils.importlib import import_module else: from importlib import import_module From 4b9b6317449ef93e218b69df77f016784bb78270 Mon Sep 17 00:00:00 2001 From: Marco Badan Date: Mon, 27 Apr 2015 17:06:48 +0200 Subject: [PATCH 3/3] Fix TabError: inconsistent use of tabs and spaces in indentation --- rest_auth/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_auth/serializers.py b/rest_auth/serializers.py index db1e4cb..76a6612 100644 --- a/rest_auth/serializers.py +++ b/rest_auth/serializers.py @@ -110,7 +110,7 @@ class PasswordResetConfirmSerializer(serializers.Serializer): self.set_password_form = self.set_password_form_class(user=self.user, data=attrs) if not self.set_password_form.is_valid(): - raise serializers.ValidationError(self.set_password_form.errors) + raise serializers.ValidationError(self.set_password_form.errors) if not default_token_generator.check_token(self.user, attrs['token']): raise ValidationError({'token': ['Invalid value']})