python3: deprecate django.utils.encoding.smart_unicode (#31155)

This commit is contained in:
Paul Marillonnet 2019-04-02 17:11:39 +02:00
parent 1244090c66
commit a78d517a24
1 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ from django.views.decorators.cache import never_cache
from django.views.decorators.http import require_POST
from django.contrib.auth import BACKEND_SESSION_KEY, REDIRECT_FIELD_NAME
from django.conf import settings
from django.utils.encoding import smart_unicode
from django.utils.encoding import force_text
from django.utils.six.moves.urllib.parse import quote, urlencode
from django.contrib.auth import load_backend
from django.shortcuts import render, redirect
@ -318,7 +318,7 @@ def saml2_add_attribute_values(assertion, attributes):
elif value is False:
value = u'false'
else:
value = smart_unicode(value)
value = force_text(value)
value = value.encode('utf-8')
text_node = lasso.MiscTextNode.newWithString(value)
text_node.textChild = True