Projet

Général

Profil

Development #38923

Python 3, première fournée

Ajouté par Emmanuel Cazenave il y a plus de 4 ans. Mis à jour il y a plus de 4 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
13 janvier 2020
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Non
Planning:
Non

Description

Tout chaud.


Demandes liées

Lié à Passerelle - Development #38781: Compatibilité python3Fermé06 janvier 2020

Actions

Révisions associées

Révision d23fade1 (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

replace unicode() calls by force_text() (#38923)

Révision ee7ff828 (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

get StringIO from six (#38923)

Révision 4c915235 (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

get urlparse from six (#38923)

Révision 4e40571f (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

update except syntax (#38923)

Révision a57b9147 (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

use print as function (#38923)

Révision 3a1012e7 (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

get ConfigParser from six (#38923)

Révision 6958b487 (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

remove usage of urllib2 (#38923)

Révision 74064c0c (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

use open() to open file (#38923)

Révision 5c6ebaaa (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

tests: use resp.text (#38923)

Révision efa52618 (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

use six types in string type tests (#38923)

Révision 11481f47 (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

use str() instead of unicode() (#38923)

Révision e195b4ea (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

pass bytes for hashing (#38923)

Révision 216bdc1c (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

user exec() instead of execfile() (#38923)

Révision d512d38b (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

use func.__name__ in py3 (#38923)

Révision c7896188 (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

get HTMLParser from six (#38923)

Révision 199210f9 (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

use items() instead of iteritems() (#38923)

Révision 2e18cc2f (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

expand dict views (#38923)

Révision 44c348db (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

use absolute imports (#38923)

Révision c4e53adb (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

avoid None to int comparison (#38923)

Révision f9b0a99e (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

tests: use absolute imports (#38923)

And delete some init.py in tests directory.

Révision 865331e3 (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

tests: avoid py2 specific number format (#38923)

Révision f9438a61 (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

tests: use raw string literals (#38923)

Révision 44eeaa93 (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

use unicode_literals in clicrdv migrations (#38923)

https://code.djangoproject.com/ticket/29290

Révision c575985f (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

use uuid4().hex instead of uuid4().get_hex() (#38923)

Révision 10671588 (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

base: allow sorting endpoints with None attribute (#38923)

Révision 1f9bb398 (diff)
Ajouté par Emmanuel Cazenave il y a plus de 4 ans

hawk: force_text on header parts (#38923)

Historique

#1

Mis à jour par Emmanuel Cazenave il y a plus de 4 ans

#2

Mis à jour par Emmanuel Cazenave il y a plus de 4 ans

  • Statut changé de Nouveau à Solution proposée
#3

Mis à jour par Frédéric Péters il y a plus de 4 ans

Tu maintiendrais sur le côté une branche régulièrement rebasée sur master, avec un commit "tox: also run tests against python 3" ? Ou même exécutant uniquement les tests en python 3 vu qu'on les aura de toute façon en py2 dans master. Ou dès master une modification au Jenkinsfile avec une étape d'exécution des tests en python 3 mais sans échouer le build sur l'étape échoue ?

#4

Mis à jour par Paul Marillonnet il y a plus de 4 ans

  • Statut changé de Solution proposée à Solution validée

Ok pour moi.

Je comprends pas bien comment sont arrivées les migrations clicrdv contenant des byte strings (que tu corriges dans 8d62546de0a5ab455d29b19fb61f71e4f8c30bb4) – on dirait des vieux commits squashés puis supprimés pour être ensuite restaurés – mais passons c'est pas l'objet du ticket.

Dans mes souvenirs il y avait quelques soucis dus à l'absence d'équivalence directe entre le constructeur de file en python2 et la fonction open en python3 (des modes d'ouverture différents il me semble). Si la couverture de test n'est pas au top c'est possible qu'on ait quelques petites surprises de ce côté-là lors de la bascule python3 de passerelle sur le SaaS de recette.

#5

Mis à jour par Emmanuel Cazenave il y a plus de 4 ans

  • Statut changé de Solution validée à Résolu (à déployer)

Paul Marillonnet a écrit :

Je comprends pas bien comment sont arrivées les migrations clicrdv contenant des byte strings (que tu corriges dans 8d62546de0a5ab455d29b19fb61f71e4f8c30bb4) – on dirait des vieux commits squashés puis supprimés pour être ensuite restaurés – mais passons c'est pas l'objet du ticket.

C'est bien ça : #22205, #30560.

commit 1f9bb398c2289425d888bcad4b2588184363073d
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Thu Jan 9 18:55:00 2020 +0100

    hawk: force_text on header parts (#38923)

commit 106715884363f5d56298a5832e11d7b982a84c0d
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Thu Jan 9 18:05:03 2020 +0100

    base: allow sorting endpoints with None attribute (#38923)

commit c575985fd2ee333a2b05443e2192b3e1a123a780
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Thu Jan 9 17:48:10 2020 +0100

    use uuid4().hex instead of uuid4().get_hex() (#38923)

commit 44eeaa93f5d73862a030c993af0e126f407f75b2
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Thu Jan 9 17:29:06 2020 +0100

    use unicode_literals in clicrdv migrations (#38923)

    https://code.djangoproject.com/ticket/29290

commit f9438a6155ad0d808e96995c6bbb5b755b22d949
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Wed Jan 8 17:27:58 2020 +0100

    tests: use raw string literals (#38923)

commit 865331e3dc17262b27ec30aafe49d6d17044354b
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Wed Jan 8 17:11:43 2020 +0100

    tests: avoid py2 specific number format (#38923)

commit f9b0a99e0eee69fcb59f58f723f5e5d4106b484e
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Wed Jan 8 16:22:19 2020 +0100

    tests: use absolute imports (#38923)

    And delete some __init__.py in tests directory.

commit c4e53adb8131e8a7a385840d60a7ce99bb825603
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Wed Jan 8 16:10:02 2020 +0100

    avoid None to int comparison (#38923)

commit 44c348db3303d842f53954eb5bc4cd28f00435c2
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Wed Jan 8 16:08:24 2020 +0100

    use absolute imports (#38923)

commit 2e18cc2ffebb038f194dae5db9f8a014b914849e
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Wed Jan 8 15:18:45 2020 +0100

    expand dict views (#38923)

commit 199210f9e28dd7b77afac6bc2bfd38db14ed1efa
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Wed Jan 8 14:51:45 2020 +0100

    use items() instead of iteritems() (#38923)

commit c7896188c25747e971b9f4729d28bb978254eee9
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Wed Jan 8 14:47:12 2020 +0100

    get HTMLParser from six (#38923)

commit d512d38beb65937118d5f28d0a1310d021733612
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Wed Jan 8 11:47:48 2020 +0100

    use func.__name__ in py3 (#38923)

commit 216bdc1cfd2df720ecaeaa2e4ef6366306b1a787
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Wed Jan 8 11:35:39 2020 +0100

    user exec() instead of execfile() (#38923)

commit e195b4ea6d73c1f94e49c4d642fe84c266af2fb0
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Tue Jan 7 15:21:45 2020 +0100

    pass bytes for hashing (#38923)

commit 11481f476cfdcd5826c9d6d3df26e747fd519e51
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Tue Jan 7 14:31:15 2020 +0100

    use __str__() instead of __unicode__() (#38923)

commit efa52618c1b5b400a461fa7c484b25143c6b3e2f
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Tue Jan 7 14:22:16 2020 +0100

    use six types in string type tests (#38923)

commit 5c6ebaaa6a5cb3b4444bec0a388cb80992d4331a
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Mon Jan 6 18:47:53 2020 +0100

    tests: use resp.text (#38923)

commit 74064c0c60a8eae756672dbfbdf0aa82789481df
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Mon Jan 6 18:30:29 2020 +0100

    use open() to open file (#38923)

commit 6958b487511019969a6fb09ba648c43b22d5f3df
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Mon Jan 6 18:25:56 2020 +0100

    remove usage of urllib2 (#38923)

commit 3a1012e7c19c2f0ea4116df7ec3e7c258ca3e8ad
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Mon Jan 6 17:47:16 2020 +0100

    get ConfigParser from six (#38923)

commit a57b914716adef448b28ed3038f66a52538f538e
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Mon Jan 6 16:23:10 2020 +0100

    use print as function (#38923)

commit 4e40571fa6e52401502d2b06a61cbfdc1815eed5
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Mon Jan 6 16:08:54 2020 +0100

    update except syntax (#38923)

commit 4c915235a557e2330ccfed89d3f3e2f07f5ea546
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Mon Jan 6 15:52:40 2020 +0100

    get urlparse from six (#38923)

commit ee7ff828c8acd956d3685ab408998a250fd74292
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Mon Jan 6 11:30:51 2020 +0100

    get StringIO from six (#38923)

commit d23fade1449759da78bb4f4230a4e51e59133f2b
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Mon Jan 6 11:10:15 2020 +0100

    replace unicode() calls by force_text() (#38923)
#6

Mis à jour par Frédéric Péters il y a plus de 4 ans

  • Statut changé de Résolu (à déployer) à Solution déployée

Formats disponibles : Atom PDF