Bug #40830
python3: convertir .values en liste
Début:
19 mars 2020
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
Bug lors de l'accès aux settings :
> authentic_site = settings.KNOWN_SERVICES.get('authentic').values()[0] E TypeError: 'dict_values' object is not subscriptable
Parce que python3 retourne un dict_values
et non plus une liste :
(Pdb) settings.KNOWN_SERVICES.get('authentic').values() dict_values([{'url': 'http://authentic.example.net/', 'orig': 'http://welco.example.net/', 'secret': 'xxx'}])
C'était le propos de https://git.entrouvert.org/welco.git/commit/?id=a78e56758398896d812ca1812dc837bb28b711cb ,
(issu de #39092) là où les tests permettaient de le détecter. (#40816 couvrira ce code)
Fichiers
Révisions associées
Historique
Mis à jour par Nicolas Roche il y a environ 4 ans
- Fichier 0001-python3-convert-.values-to-list-before-accessing-408.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Mis à jour par Nicolas Roche il y a environ 4 ans
- Fichier 0001-python3-convert-.values-to-list-before-accessing-408.patch 0001-python3-convert-.values-to-list-before-accessing-408.patch ajouté
(j'ai supprimé un saut à la ligne dans le patch précédent)
Mis à jour par Nicolas Roche il y a environ 4 ans
- Fichier
0001-python3-convert-.values-to-list-before-accessing-408.patchsupprimé
Mis à jour par Thomas Noël il y a environ 4 ans
- Statut changé de Solution proposée à Solution validée
Mis à jour par Nicolas Roche il y a environ 4 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit 6ee128570184eeb27f19ba015a2d700a417b8c78 Author: Nicolas ROCHE <nroche@entrouvert.com> Date: Thu Mar 19 12:03:37 2020 +0100 python3: convert .values to list before accessing (#40830)
Mis à jour par Frédéric Péters il y a environ 4 ans
- Statut changé de Résolu (à déployer) à Solution déployée
python3: convert .values to list before accessing (#40830)