From df9c4b66fac71038f66193e956004cb3e767970f Mon Sep 17 00:00:00 2001 From: Iwo Herka Date: Fri, 8 Jun 2018 17:13:20 +0200 Subject: [PATCH] Fix Python 2.7 compatibility --- eav/queryset.py | 8 +++++--- eav/validators.py | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/eav/queryset.py b/eav/queryset.py index 254a7bd..cbf3d88 100644 --- a/eav/queryset.py +++ b/eav/queryset.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + ''' Queryset. @@ -259,7 +261,7 @@ class EavQuerySet(QuerySet): Pass *args* and *kwargs* through ``eav_filter``, then pass to the ``models.Manager`` filter method. ''' - return super().filter(*args, **kwargs).distinct() + return super(self.__class__, self).filter(*args, **kwargs).distinct() @eav_filter def exclude(self, *args, **kwargs): @@ -267,7 +269,7 @@ class EavQuerySet(QuerySet): Pass *args* and *kwargs* through ``eav_filter``, then pass to the ``models.Manager`` exclude method. ''' - return super().exclude(*args, **kwargs).distinct() + return super(self.__class__, self).exclude(*args, **kwargs).distinct() @eav_filter def get(self, *args, **kwargs): @@ -275,4 +277,4 @@ class EavQuerySet(QuerySet): Pass *args* and *kwargs* through ``eav_filter``, then pass to the ``models.Manager`` get method. ''' - return super().get(*args, **kwargs) + return super(self.__class__, self).get(*args, **kwargs) diff --git a/eav/validators.py b/eav/validators.py index 0456a97..a31a68c 100644 --- a/eav/validators.py +++ b/eav/validators.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + ''' Validtors.