Projet

Général

Profil

Development #68183

Publik - Development #68182: montée de version django (→ 4.2 LTS)

Préparation django 4 : DeprecationWarnings

Ajouté par A. Berriot il y a plus d'un an. Mis à jour il y a plus d'un an.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
16 août 2022
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non
Tags:

Description

cf tache parente


Fichiers

0003-replaced-urls.url-with-url.re_path-equivalent-68183.patch (36,4 ko) 0003-replaced-urls.url-with-url.re_path-equivalent-68183.patch A. Berriot, 16 août 2022 14:44
0002-replaced-force_text-with-equivalent-force_str-68183.patch (33,7 ko) 0002-replaced-force_text-with-equivalent-force_str-68183.patch A. Berriot, 16 août 2022 14:44
0001-replaced-ugettext-calls-with-corresponding-gettext-c.patch (30,4 ko) 0001-replaced-ugettext-calls-with-corresponding-gettext-c.patch A. Berriot, 16 août 2022 14:44
0004-replaced-smart_text-with-smart_str-equivalent-68183.patch (2,38 ko) 0004-replaced-smart_text-with-smart_str-equivalent-68183.patch A. Berriot, 16 août 2022 14:44
0005-replaced-ungettext-with-ngettext-equivalent-68183.patch (1,57 ko) 0005-replaced-ungettext-with-ngettext-equivalent-68183.patch A. Berriot, 16 août 2022 15:02
0003-replaced-urls.url-with-url.re_path-equivalent-68183.patch (36,4 ko) 0003-replaced-urls.url-with-url.re_path-equivalent-68183.patch A. Berriot, 16 août 2022 15:02
0002-replaced-force_text-with-equivalent-force_str-68183.patch (33,7 ko) 0002-replaced-force_text-with-equivalent-force_str-68183.patch A. Berriot, 16 août 2022 15:02
0001-replaced-ugettext-calls-with-corresponding-gettext-c.patch (30,4 ko) 0001-replaced-ugettext-calls-with-corresponding-gettext-c.patch A. Berriot, 16 août 2022 15:02
0004-replaced-smart_text-with-smart_str-equivalent-68183.patch (2,38 ko) 0004-replaced-smart_text-with-smart_str-equivalent-68183.patch A. Berriot, 16 août 2022 15:02

Révisions associées

Révision f77ad1bc (diff)
Ajouté par A. Berriot il y a plus d'un an

replaced ugettext* calls with corresponding gettext* calls (#68183)

Révision 54eafdbb (diff)
Ajouté par A. Berriot il y a plus d'un an

replaced force_text with equivalent force_str (#68183)

Révision b8269f4d (diff)
Ajouté par A. Berriot il y a plus d'un an

replaced urls.url with url.re_path equivalent (#68183)

Révision 25884a02 (diff)
Ajouté par A. Berriot il y a plus d'un an

replaced smart_text with smart_str equivalent (#68183)

Révision 194d78e5 (diff)
Ajouté par A. Berriot il y a plus d'un an

replaced ungettext with ngettext equivalent (#68183)

Historique

#1

Mis à jour par A. Berriot il y a plus d'un an

  • Assigné à mis à A. Berriot
#3

Mis à jour par A. Berriot il y a plus d'un an

  • Assigné à changé de A. Berriot à Benjamin Dauvergne

On passe de 6119 à 254 warnings, sans perte de compatibilité avec django 2 (j'ai lancé les deux tests suites en local, et Jenkins confirmera).

#5

Mis à jour par A. Berriot il y a plus d'un an

  • Assigné à changé de Benjamin Dauvergne à A. Berriot
#6

Mis à jour par Valentin Deniaud il y a plus d'un an

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

Nickel :)

En passant tu connais https://github.com/adamchainz/django-upgrade ? Pour 0003 ça aurait notamment permis de dégager re_path là où il n'est pas nécessaire, il me semble.

#7

Mis à jour par Frédéric Péters il y a plus d'un an

Tiens je pensais qu'on avait déjà tapé django-upgrade dans nos confs pre-commit mais non, pyupgrade uniquement; ça vaut peut-être le coup de regarder ce que ça donnerait.

#8

Mis à jour par Valentin Deniaud il y a plus d'un an

Ouep, vive les pre-commit hooks et aussi penser à regarder djhtml, que j'exécute déjà en local quand j'ajoute un nouveau template.

#9

Mis à jour par A. Berriot il y a plus d'un an

pre-commit marche pas chez moi (j'imagine que c'est à cause de debian sid ?), je suis obligée de lancer black, isort etc. à la main

je ne connaissais pas django-upgrade, je regarderai, merci

#10

Mis à jour par A. Berriot il y a plus d'un an

  • Statut changé de Solution validée à Résolu (à déployer)
commit 2022227bbb659ac78883a1265306ae6d05389934
Author: Agate Berriot <aberriot@entrouvert.com>
Date:   Tue Aug 16 15:02:11 2022 +0200

    replaced ungettext with ngettext equivalent (#68183)

commit 21d51f894605243d5d1e57e0da3bd619ecde88c8
Author: Agate Berriot <aberriot@entrouvert.com>
Date:   Tue Aug 16 14:39:04 2022 +0200

    replaced smart_text with smart_str equivalent (#68183)

commit c65ccd055f40c9acb8d7bc0553039b5b024ca6bc
Author: Agate Berriot <aberriot@entrouvert.com>
Date:   Tue Aug 16 14:35:03 2022 +0200

    replaced urls.url with url.re_path equivalent (#68183)

commit faee1bbf775abc983e9f41954bf69b10a60577b7
Author: Agate Berriot <aberriot@entrouvert.com>
Date:   Tue Aug 16 14:23:28 2022 +0200

    replaced force_text with equivalent force_str (#68183)

commit cb6c422f26b1f70b2472ae420c29b2d31089c3fd
Author: Agate Berriot <aberriot@entrouvert.com>
Date:   Tue Aug 16 14:14:49 2022 +0200

    replaced ugettext* calls with corresponding gettext* calls (#68183)
#11

Mis à jour par Transition automatique il y a plus d'un an

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

Mis à jour par Transition automatique il y a plus d'un an

Automatic expiration

Formats disponibles : Atom PDF