Project

General

Profile

Development #31151

python3 : déprécier le type natif 'unicode' de python2

Added by Paul Marillonnet 5 months ago. Updated 4 months ago.

Status:
Solution déployée
Priority:
Normal
Category:
-
Target version:
-
Start date:
06 Mar 2019
Due date:
% Done:

0%

Patch proposed:
Yes
Planning:
No

Description

Au profit de six.text_type (cf https://pythonhosted.org/six/#six.text_type) qui nous sauve bien l'affaire.

0001-python3-remove-deprecated-unicode-builtin-31151.patch View (43.3 KB) Paul Marillonnet, 06 Mar 2019 06:10 PM

0001-python3-remove-deprecated-unicode-builtin-31151.patch View (45 KB) Paul Marillonnet, 14 Mar 2019 12:51 PM

0002-1.patch View (18.9 KB) Benjamin Dauvergne, 14 Mar 2019 01:01 PM

0003-2.patch View (29.4 KB) Benjamin Dauvergne, 14 Mar 2019 01:01 PM

0001-python3-remove-deprecated-unicode-builtin-31151.patch View (45 KB) Paul Marillonnet, 14 Mar 2019 03:12 PM

0001-python3-remove-deprecated-unicode-builtin-31151.patch View (45.3 KB) Paul Marillonnet, 20 Mar 2019 03:07 PM


Related issues

Related to Authentic 2 - Development #28276: Fonctionner avec Python3 pour Django1.11 En cours 23 Nov 2018

Associated revisions

Revision cb10c41b (diff)
Added by Paul Marillonnet 4 months ago

python3: remove deprecated unicode builtin (#31151)

History

#1 Updated by Paul Marillonnet 5 months ago

#2 Updated by Paul Marillonnet 5 months ago

#3 Updated by Benjamin Dauvergne 5 months ago

  • Status changed from Solution proposée to En cours
  • Assignee set to Paul Marillonnet

Il faut utiliser from django.utils import six.

#4 Updated by Paul Marillonnet 4 months ago

Hop.

#5 Updated by Benjamin Dauvergne 4 months ago

Voilà conversion text_type -> six.text_type.

#6 Updated by Paul Marillonnet 4 months ago

Merci !
J'ai git-apply < tes patchs, je mets à jour mon patch ici.

#8 Updated by Benjamin Dauvergne 4 months ago

Dans src/authentic2/backends/ldap_backend.py tu ajoutes un import six sans enlever celui qui y est déjà, faudra voir si il y a d'autres cas.

#9 Updated by Paul Marillonnet 4 months ago

Oui, en effet, il y a trois fichiers dans ce cas :

$ git show | grep '^--- a' | sed 's_--- a/\(.*\)_\1_' | xargs grep 'import' | grep 'six' | grep -v 'django'
src/authentic2/backends/ldap_backend.py:import six
src/authentic2/manager/widgets.py:from six.moves import reduce
src/authentic2/saml/models.py:import six

#11 Updated by Benjamin Dauvergne 4 months ago

  • Status changed from Solution proposée to Solution validée

Ack.

#12 Updated by Paul Marillonnet 4 months ago

  • Status changed from Solution validée to Résolu (à déployer)
commit cb10c41b0fd6b847371c898db96df62c5f76730d
Author: Paul Marillonnet <pmarillonnet@entrouvert.com>
Date:   Thu Jan 24 16:18:11 2019 +0100

    python3: remove deprecated unicode builtin (#31151)

#13 Updated by Frédéric Péters 4 months ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF