Projet

Général

Profil

0002-python3-deprecate-django.utils.encoding.smart_unicod.patch

Paul Marillonnet, 06 février 2020 10:45

Télécharger (1,52 ko)

Voir les différences:

Subject: [PATCH 2/2] python3: deprecate django.utils.encoding.smart_unicode
 (#31155)

 src/authentic2/idp/saml/saml2_endpoints.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/authentic2/idp/saml/saml2_endpoints.py
54 54
from django.views.decorators.http import require_POST
55 55
from django.contrib.auth import BACKEND_SESSION_KEY, REDIRECT_FIELD_NAME
56 56
from django.conf import settings
57
from django.utils.encoding import smart_unicode
57
from django.utils.encoding import force_text
58 58
from django.utils.six.moves.urllib.parse import quote, urlencode
59 59
from django.contrib.auth import load_backend
60 60
from django.shortcuts import render, redirect
......
318 318
                    elif value is False:
319 319
                        value = u'false'
320 320
                    else:
321
                        value = smart_unicode(value)
321
                        value = force_text(value)
322 322
                    value = value.encode('utf-8')
323 323
                    text_node = lasso.MiscTextNode.newWithString(value)
324 324
                    text_node.textChild = True
325
-