Bug #39092
compat python3
0%
Description
...
Révisions associées
python3: use exec(open(... to replace execfile (#39092)
python3: get urllib/urlparse/htmlparser from six (#39092)
python3: replace iteritems (#39092)
python3: replace unicode references (#39092)
python3: use modern except syntax (#39092)
python3: use relative imports (#39092)
python3: pass bytes for hmac (#39092)
python3: use key function to sort categories (#39092)
python3: encode response.content in tests (#39092)
python3: update maarch tests (#39092)
python3: convert .keys to list before comparing (#39092)
python3: update tox to check against both python versions (#39092)
python3: always pass strings to json.loads, for 3.5 compatibility (#39092)
Historique
Mis à jour par Frédéric Péters il y a plus de 4 ans
- Statut changé de Nouveau à Solution proposée
branche wip/39092-python3.
Mis à jour par Nicolas Roche il y a environ 4 ans
Ci-dessous il s'agit plus de commentaires que des modifications demandées.
- python3: use exec(open(... to replace execfile
Un des 2 commentaires n'a pas été mis à jour
debian/settings.py :<<< # This file is sourced by "execfile" from /usr/lib/welco/debian_config.py --- # This file is sourced by "exec(open(..." from ... >>>
- python3: get urllib/urlparse/htmlparser from six
Le patch simplifie le code en retirant le cas où WCS renverrait de l'unicode,
j'imagine parceque la conversion est à présent traitée par urlencode fourni par django.utils.http.
welco/utils.py :if isinstance(value, unicode): params[param] = value.encode('utf-8')
- python3: update maarch tests
L'ajout du code 401 n'était pas requis chez moi. Peut-être est-ce le cas sur jenkins.
tests/test_source_maarch.py :response = app.post_json('/api/mail/response/', params={}, status=(401, 403))
- python3: convert .keys to list before comparing
Je ne peux pas reproduire le test, qui pourtant fonctionne via l'instruction assert(Pdb) list(payload.keys()) *** Error in argument: '(payload.keys())'
Peut-être faire en sorte que l'on puisse reproduire l'assertion à la main.
welco/sources/phone/views.py :<<< assert list(payload.keys()) == ['callee'], 'payload must have only one key: callee' --- assert set(payload.keys()) == set(['callee']), 'payload must have only one key: callee' >>>
Mis à jour par Nicolas Roche il y a environ 4 ans
- Statut changé de Solution proposée à Solution validée
- https://welco.dev.publik.love/mail/
- https://welco.dev.publik.love/phone/
- https://welco.dev.publik.love/counter/
Juste pour info, je rencontre des difficultés pour ajouter des tests pour augmenter la couverture.
Mis à jour par Frédéric Péters il y a environ 4 ans
(Pdb) list(payload.keys()) *** Error in argument: '(payload.keys())'
list c'est une commande interne à pdb,
(Pdb) help list l(ist) [first [,last] | .] List source code for the current file. Without arguments, list 11 lines around the current line or continue the previous listing. With . as argument, list 11 lines around the current line. With one argument, list 11 lines starting at that line. With two arguments, list the given range; if the second argument is less than the first, it is a count. The current line in the current frame is indicated by "->". If an exception is being debugged, the line where the exception was originally raised or propagated is indicated by ">>", if it differs from the current line.
Mis à jour par Nicolas Roche il y a environ 4 ans
oups
(je regarde pour ajouter des tests, mais je ne promet rien)
Mis à jour par Frédéric Péters il y a environ 4 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit 62d08f4243c8a9d558d8c9b8cea1e25b7345d8e8 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sun Jan 19 19:46:54 2020 +0100 python3: always pass strings to json.loads, for 3.5 compatibility (#39092) commit 5e6226e1678a7feadae66f7a22f2b43925e6b36d Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sun Jan 19 19:37:20 2020 +0100 python3: update tox to check against both python versions (#39092) commit a78e56758398896d812ca1812dc837bb28b711cb Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sun Jan 19 19:34:55 2020 +0100 python3: convert .keys to list before comparing (#39092) commit e2eb510f8708d441accf205b02175b42e501f180 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sun Jan 19 19:32:30 2020 +0100 python3: update maarch tests (#39092) commit 9a5edc0b00a0b66ed19b4e33ce6d91f506caedfd Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sun Jan 19 19:25:48 2020 +0100 python3: encode response.content in tests (#39092) commit b562bef51fe10a9d8d0f538ad05cb028bbc04325 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sun Jan 19 19:16:18 2020 +0100 python3: use key function to sort categories (#39092) commit a8e12b9630b7958d9f09021103d52bf4f32e1bff Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sun Jan 19 19:15:38 2020 +0100 python3: pass bytes for hmac (#39092) commit 90c29f0fa0cce6606eba25c51e35cdd66c990d13 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sun Jan 19 19:13:37 2020 +0100 python3: use relative imports (#39092) commit e91178a2e1b5d7882901fcb10a7afcf3ccfc57f6 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sun Jan 19 19:12:30 2020 +0100 python3: use modern except syntax (#39092) commit 8112d57b0adc2eadd92d30f7cc437deab03a174d Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sun Jan 19 19:11:28 2020 +0100 python3: replace unicode references (#39092) commit 46113c03dd60da5f1a9dd7e48f4b046ff84d2893 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sun Jan 19 19:10:24 2020 +0100 python3: replace iteritems (#39092) commit 27af09b510876cc5db46da3aa74f5eaadc6bc0a3 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sun Jan 19 19:09:41 2020 +0100 python3: get urllib/urlparse/htmlparser from six (#39092) commit 4f9bb8b1617b97dcb57a1ab01aeefa1de7521eb4 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sun Jan 19 19:04:15 2020 +0100 python3: use exec(open(... to replace execfile (#39092) commit f165c7d12d195f8c70e511753b8eb46c8de5dbb4 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sun Jan 19 19:03:56 2020 +0100 setup: limit django-reversion to version 2 (#39092)
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
setup: limit django-reversion to version 2 (#39092)