From 9b82e269303b8860099b80c1973a0b282313b490 Mon Sep 17 00:00:00 2001
From: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date: Thu, 14 Mar 2019 12:59:56 +0100
Subject: [PATCH 2/3] 1

---
 src/authentic2/a2_rbac/admin.py                     | 2 +-
 src/authentic2/a2_rbac/management.py                | 2 +-
 src/authentic2/a2_rbac/models.py                    | 2 +-
 src/authentic2/api_views.py                         | 2 +-
 src/authentic2/attribute_kinds.py                   | 2 +-
 src/authentic2/attributes_ng/sources/django_user.py | 2 +-
 src/authentic2/backends/ldap_backend.py             | 2 +-
 src/authentic2/custom_user/models.py                | 2 +-
 src/authentic2/decorators.py                        | 2 +-
 src/authentic2/exponential_retry_timeout.py         | 2 +-
 src/authentic2/idp/saml/saml2_endpoints.py          | 2 +-
 src/authentic2/log_filters.py                       | 2 +-
 src/authentic2/management/commands/slapd-shell.py   | 2 +-
 src/authentic2/manager/forms.py                     | 2 +-
 src/authentic2/manager/ou_views.py                  | 2 +-
 src/authentic2/manager/resources.py                 | 2 +-
 src/authentic2/manager/service_views.py             | 2 +-
 src/authentic2/manager/views.py                     | 2 +-
 src/authentic2/manager/widgets.py                   | 2 +-
 src/authentic2/models.py                            | 2 +-
 src/authentic2/saml/admin.py                        | 2 +-
 src/authentic2/saml/common.py                       | 2 +-
 src/authentic2/saml/models.py                       | 2 +-
 src/authentic2/utils.py                             | 2 +-
 src/authentic2/views.py                             | 2 +-
 src/authentic2_auth_oidc/backends.py                | 2 +-
 src/authentic2_auth_oidc/utils.py                   | 2 +-
 src/authentic2_idp_cas/views.py                     | 2 +-
 src/authentic2_idp_oidc/models.py                   | 2 +-
 src/authentic2_idp_oidc/utils.py                    | 2 +-
 src/authentic2_idp_oidc/views.py                    | 2 +-
 src/django_rbac/models.py                           | 2 +-
 src/django_rbac/utils.py                            | 2 +-
 33 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/src/authentic2/a2_rbac/admin.py b/src/authentic2/a2_rbac/admin.py
index 35f469bc..4368b6d3 100644
--- a/src/authentic2/a2_rbac/admin.py
+++ b/src/authentic2/a2_rbac/admin.py
@@ -1,6 +1,6 @@
 from django.contrib import admin
 from django.utils.translation import ugettext_lazy as _
-from django.utils.six import text_type
+from django.utils import six
 
 from . import models
 
diff --git a/src/authentic2/a2_rbac/management.py b/src/authentic2/a2_rbac/management.py
index e32480f9..dcd9a125 100644
--- a/src/authentic2/a2_rbac/management.py
+++ b/src/authentic2/a2_rbac/management.py
@@ -1,4 +1,4 @@
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.translation import ugettext_lazy as _
 from django.utils.text import slugify
 from django.contrib.contenttypes.models import ContentType
diff --git a/src/authentic2/a2_rbac/models.py b/src/authentic2/a2_rbac/models.py
index afa04767..de318871 100644
--- a/src/authentic2/a2_rbac/models.py
+++ b/src/authentic2/a2_rbac/models.py
@@ -1,6 +1,6 @@
 from collections import namedtuple
 from django.core.exceptions import ValidationError
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.translation import ugettext_lazy as _
 from django.utils.text import slugify
 from django.db import models
diff --git a/src/authentic2/api_views.py b/src/authentic2/api_views.py
index 27a308ca..603d6894 100644
--- a/src/authentic2/api_views.py
+++ b/src/authentic2/api_views.py
@@ -20,7 +20,7 @@ import smtplib
 from django.db import models
 from django.contrib.auth import get_user_model
 from django.core.exceptions import MultipleObjectsReturned
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.translation import ugettext as _
 from django.utils.encoding import force_text
 from django.views.decorators.vary import vary_on_headers
diff --git a/src/authentic2/attribute_kinds.py b/src/authentic2/attribute_kinds.py
index 31061768..027ae249 100644
--- a/src/authentic2/attribute_kinds.py
+++ b/src/authentic2/attribute_kinds.py
@@ -10,7 +10,7 @@ from itertools import chain
 from django import forms
 from django.core.exceptions import ValidationError
 from django.core.validators import RegexValidator
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.translation import ugettext_lazy as _, pgettext_lazy
 from django.utils.functional import allow_lazy
 from django.utils import html
diff --git a/src/authentic2/attributes_ng/sources/django_user.py b/src/authentic2/attributes_ng/sources/django_user.py
index 7c67d517..bdfa0c75 100644
--- a/src/authentic2/attributes_ng/sources/django_user.py
+++ b/src/authentic2/attributes_ng/sources/django_user.py
@@ -1,4 +1,4 @@
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.translation import ugettext_lazy as _
 
 from django_rbac.utils import get_role_model
diff --git a/src/authentic2/backends/ldap_backend.py b/src/authentic2/backends/ldap_backend.py
index b59e3c69..bae87baf 100644
--- a/src/authentic2/backends/ldap_backend.py
+++ b/src/authentic2/backends/ldap_backend.py
@@ -26,7 +26,7 @@ from django.core.exceptions import ImproperlyConfigured
 from django.conf import settings
 from django.contrib.auth.models import Group
 from django.utils.encoding import force_bytes, force_text
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.six.moves.urllib import parse as urlparse
 
 from authentic2.a2_rbac.models import Role
diff --git a/src/authentic2/custom_user/models.py b/src/authentic2/custom_user/models.py
index 29327de8..61120bfe 100644
--- a/src/authentic2/custom_user/models.py
+++ b/src/authentic2/custom_user/models.py
@@ -1,7 +1,7 @@
 from django.db import models
 from django.utils import timezone
 from django.core.mail import send_mail
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.translation import ugettext_lazy as _
 from django.core.exceptions import ValidationError, MultipleObjectsReturned
 try:
diff --git a/src/authentic2/decorators.py b/src/authentic2/decorators.py
index f6ed6e05..d84a90b1 100644
--- a/src/authentic2/decorators.py
+++ b/src/authentic2/decorators.py
@@ -10,7 +10,7 @@ from django.views.debug import technical_404_response
 from django.http import Http404, HttpResponseForbidden, HttpResponse, HttpResponseBadRequest
 from django.core.cache import cache as django_cache
 from django.core.exceptions import ValidationError
-from django.utils.six import text_type
+from django.utils import six
 
 from . import utils, app_settings, middleware
 from .utils import to_list, to_iter
diff --git a/src/authentic2/exponential_retry_timeout.py b/src/authentic2/exponential_retry_timeout.py
index 12ac08b9..c8c7523d 100644
--- a/src/authentic2/exponential_retry_timeout.py
+++ b/src/authentic2/exponential_retry_timeout.py
@@ -2,7 +2,7 @@ import time
 import logging
 import hashlib
 
-from django.utils.six import text_type
+from django.utils import six
 from django.core.cache import cache
 
 
diff --git a/src/authentic2/idp/saml/saml2_endpoints.py b/src/authentic2/idp/saml/saml2_endpoints.py
index 58f3d8c6..eeaccbc9 100644
--- a/src/authentic2/idp/saml/saml2_endpoints.py
+++ b/src/authentic2/idp/saml/saml2_endpoints.py
@@ -30,7 +30,7 @@ from django.contrib.auth.decorators import login_required
 from django.core.exceptions import ObjectDoesNotExist
 from django.http import HttpResponse, HttpResponseRedirect, \
     HttpResponseForbidden, HttpResponseBadRequest
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.translation import ugettext as _, ugettext_noop as N_
 from django.views.decorators.csrf import csrf_exempt
 from django.views.decorators.cache import never_cache
diff --git a/src/authentic2/log_filters.py b/src/authentic2/log_filters.py
index b2f467dd..92bddf80 100644
--- a/src/authentic2/log_filters.py
+++ b/src/authentic2/log_filters.py
@@ -1,5 +1,5 @@
 import logging
-from django.utils.six import text_type
+from django.utils import six
 
 class RequestContextFilter(logging.Filter):
     DEFAULT_USERNAME = '-'
diff --git a/src/authentic2/management/commands/slapd-shell.py b/src/authentic2/management/commands/slapd-shell.py
index 1d68a8f4..56254c15 100644
--- a/src/authentic2/management/commands/slapd-shell.py
+++ b/src/authentic2/management/commands/slapd-shell.py
@@ -11,7 +11,7 @@ from ldif import LDIFWriter
 
 from django.contrib.auth import get_user_model
 from django.core.management.base import BaseCommand
-from django.utils.six import text_type
+from django.utils import six
 from optparse import make_option
 
 COMMAND = 1
diff --git a/src/authentic2/manager/forms.py b/src/authentic2/manager/forms.py
index c62f2f41..12e2ef6e 100644
--- a/src/authentic2/manager/forms.py
+++ b/src/authentic2/manager/forms.py
@@ -6,7 +6,7 @@ from django.utils.translation import ugettext_lazy as _, pgettext
 from django import forms
 from django.contrib.contenttypes.models import ContentType
 from django.db.models.query import Q
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.text import slugify
 from django.core.exceptions import ValidationError
 
diff --git a/src/authentic2/manager/ou_views.py b/src/authentic2/manager/ou_views.py
index dc2bae02..8b8fc143 100644
--- a/src/authentic2/manager/ou_views.py
+++ b/src/authentic2/manager/ou_views.py
@@ -3,7 +3,7 @@ import json
 from django_rbac.utils import get_ou_model
 from django.http import HttpResponseRedirect
 from django.contrib import messages
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.translation import ugettext as _
 
 from authentic2 import data_transfer
diff --git a/src/authentic2/manager/resources.py b/src/authentic2/manager/resources.py
index b3e9cf88..7e226ddb 100644
--- a/src/authentic2/manager/resources.py
+++ b/src/authentic2/manager/resources.py
@@ -1,4 +1,4 @@
-from django.utils.six import text_type
+from django.utils import six
 from import_export.resources import ModelResource
 from import_export.fields import Field
 from import_export.widgets import Widget
diff --git a/src/authentic2/manager/service_views.py b/src/authentic2/manager/service_views.py
index dd1fdc31..493aec01 100644
--- a/src/authentic2/manager/service_views.py
+++ b/src/authentic2/manager/service_views.py
@@ -1,4 +1,4 @@
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.translation import ugettext as _
 from django.contrib import messages
 from django.shortcuts import get_object_or_404
diff --git a/src/authentic2/manager/views.py b/src/authentic2/manager/views.py
index 4fb5154c..a417d584 100644
--- a/src/authentic2/manager/views.py
+++ b/src/authentic2/manager/views.py
@@ -9,7 +9,7 @@ from django.views.generic import (FormView, UpdateView, CreateView, DeleteView,
 from django.views.generic.detail import SingleObjectMixin
 from django.http import HttpResponse, Http404
 from django.utils.encoding import force_text
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.translation import ugettext_lazy as _
 from django.utils.timezone import now
 from django.core.urlresolvers import reverse, reverse_lazy
diff --git a/src/authentic2/manager/widgets.py b/src/authentic2/manager/widgets.py
index 15c10222..a6b3a6eb 100644
--- a/src/authentic2/manager/widgets.py
+++ b/src/authentic2/manager/widgets.py
@@ -4,7 +4,7 @@ from six.moves import reduce
 from django_select2.forms import ModelSelect2Widget, ModelSelect2MultipleWidget
 
 from django.contrib.auth import get_user_model
-from django.utils.six import text_type
+from django.utils import six
 
 from django_rbac.backends import DjangoRBACBackend
 from django_rbac.utils import get_role_model, get_ou_model
diff --git a/src/authentic2/models.py b/src/authentic2/models.py
index f2628216..4c737301 100644
--- a/src/authentic2/models.py
+++ b/src/authentic2/models.py
@@ -4,7 +4,7 @@ from django.utils.http import urlquote
 from django.conf import settings
 from django.db import models
 from django.db.models.query import Q
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.translation import ugettext_lazy as _
 from django.utils.six.moves.urllib import parse as urlparse
 from django.core.exceptions import ValidationError, FieldDoesNotExist
diff --git a/src/authentic2/saml/admin.py b/src/authentic2/saml/admin.py
index 9657444c..e71a5b92 100644
--- a/src/authentic2/saml/admin.py
+++ b/src/authentic2/saml/admin.py
@@ -1,7 +1,7 @@
 import logging
 
 from django.contrib import admin
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.translation import ugettext as _
 from django.conf.urls import url
 from django.conf import settings
diff --git a/src/authentic2/saml/common.py b/src/authentic2/saml/common.py
index e8dbfd11..8d26303a 100644
--- a/src/authentic2/saml/common.py
+++ b/src/authentic2/saml/common.py
@@ -10,7 +10,7 @@ from authentic2.compat_lasso import lasso
 from django.conf import settings
 from django.http import HttpResponseRedirect, Http404, HttpResponse
 from django.shortcuts import render
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.six.moves.urllib import parse as urlparse
 from django.core.exceptions import ValidationError
 
diff --git a/src/authentic2/saml/models.py b/src/authentic2/saml/models.py
index 595c5e97..02eb514d 100644
--- a/src/authentic2/saml/models.py
+++ b/src/authentic2/saml/models.py
@@ -12,7 +12,7 @@ from django.db import models
 from django.db.models import Q
 from django.conf import settings
 from django.core.exceptions import ValidationError
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.translation import ugettext_lazy as _
 from django.core.exceptions import ObjectDoesNotExist
 from django.contrib.contenttypes.models import ContentType
diff --git a/src/authentic2/utils.py b/src/authentic2/utils.py
index a862ba38..ca400c08 100644
--- a/src/authentic2/utils.py
+++ b/src/authentic2/utils.py
@@ -34,7 +34,7 @@ from django.contrib import messages
 from django.utils.functional import empty, allow_lazy
 from django.utils.http import urlsafe_base64_encode
 from django.utils.encoding import iri_to_uri, force_bytes, uri_to_iri
-from django.utils.six import text_type
+from django.utils import six
 from django.shortcuts import render
 
 
diff --git a/src/authentic2/views.py b/src/authentic2/views.py
index 797ee5bb..cda0382c 100644
--- a/src/authentic2/views.py
+++ b/src/authentic2/views.py
@@ -18,7 +18,7 @@ from django.core import mail, signing
 from django.core.urlresolvers import reverse
 from django.core.exceptions import ValidationError
 from django.contrib import messages
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.translation import ugettext as _
 from django.contrib.auth import logout as auth_logout
 from django.contrib.auth import REDIRECT_FIELD_NAME
diff --git a/src/authentic2_auth_oidc/backends.py b/src/authentic2_auth_oidc/backends.py
index 49ba16ad..601a0a73 100644
--- a/src/authentic2_auth_oidc/backends.py
+++ b/src/authentic2_auth_oidc/backends.py
@@ -6,7 +6,7 @@ import requests
 from jwcrypto.jwt import JWT
 from jwcrypto.jwk import JWK
 
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.timezone import now
 from django.contrib.auth import get_user_model
 from django.contrib.auth.backends import ModelBackend
diff --git a/src/authentic2_auth_oidc/utils.py b/src/authentic2_auth_oidc/utils.py
index 95923fe1..15c69966 100644
--- a/src/authentic2_auth_oidc/utils.py
+++ b/src/authentic2_auth_oidc/utils.py
@@ -4,7 +4,7 @@ import json
 
 import requests
 
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.timezone import utc
 from django.shortcuts import get_object_or_404
 from django.utils.translation import ugettext as _
diff --git a/src/authentic2_idp_cas/views.py b/src/authentic2_idp_cas/views.py
index 5f449958..30f149d8 100644
--- a/src/authentic2_idp_cas/views.py
+++ b/src/authentic2_idp_cas/views.py
@@ -7,7 +7,7 @@ import requests
 
 from django.http import HttpResponseBadRequest, HttpResponse
 from django.views.generic.base import View
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.timezone import now
 
 from authentic2.utils import (get_user_from_session_key, make_url,
diff --git a/src/authentic2_idp_oidc/models.py b/src/authentic2_idp_oidc/models.py
index a696a5a1..c96a834c 100644
--- a/src/authentic2_idp_oidc/models.py
+++ b/src/authentic2_idp_oidc/models.py
@@ -7,7 +7,7 @@ from django.core.validators import URLValidator
 from django.core.exceptions import ValidationError, ImproperlyConfigured
 from django.utils.translation import ugettext_lazy as _
 from django.conf import settings
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.timezone import now
 from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation
 
diff --git a/src/authentic2_idp_oidc/utils.py b/src/authentic2_idp_oidc/utils.py
index bd135c55..75d2194e 100644
--- a/src/authentic2_idp_oidc/utils.py
+++ b/src/authentic2_idp_oidc/utils.py
@@ -9,7 +9,7 @@ from jwcrypto.jwt import JWT
 from django.core.exceptions import ImproperlyConfigured
 from django.conf import settings
 from django.utils.encoding import smart_bytes
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.six.moves.urllib import parse as urlparse
 
 from authentic2 import hooks, crypto
diff --git a/src/authentic2_idp_oidc/views.py b/src/authentic2_idp_oidc/views.py
index e7726241..d124c4d5 100644
--- a/src/authentic2_idp_oidc/views.py
+++ b/src/authentic2_idp_oidc/views.py
@@ -5,7 +5,7 @@ import base64
 import time
 
 from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseNotAllowed
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.timezone import now, utc
 from django.utils.http import urlencode
 from django.shortcuts import render
diff --git a/src/django_rbac/models.py b/src/django_rbac/models.py
index 2dd2473f..8f9fa5d2 100644
--- a/src/django_rbac/models.py
+++ b/src/django_rbac/models.py
@@ -1,7 +1,7 @@
 import operator
 import hashlib
 
-from django.utils.six import text_type
+from django.utils import six
 from django.utils.text import slugify
 from django.utils.translation import ugettext_lazy as _
 from django.db import models
diff --git a/src/django_rbac/utils.py b/src/django_rbac/utils.py
index 498f7487..2213e5ca 100644
--- a/src/django_rbac/utils.py
+++ b/src/django_rbac/utils.py
@@ -2,7 +2,7 @@ from authentic2.utils import get_hex_uuid
 from authentic2.decorators import GlobalCache
 from django.conf import settings
 from django.apps import apps
-from django.utils.six import text_type
+from django.utils import six
 
 from . import constants
 
-- 
2.20.1

