Project

General

Profile

Développement #68183

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

Préparation django 4 : DeprecationWarnings

Added by A. B. over 2 years ago. Updated over 2 years ago.

Status:
Fermé
Priority:
Normal
Assignee:
A. B.
Target version:
-
Start date:
16 August 2022
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Yes
Planning:
No
Tags:

Description

cf tache parente


Files

0003-replaced-urls.url-with-url.re_path-equivalent-68183.patch (36.4 KB) 0003-replaced-urls.url-with-url.re_path-equivalent-68183.patch A. B., 16 August 2022 02:44 PM
0002-replaced-force_text-with-equivalent-force_str-68183.patch (33.7 KB) 0002-replaced-force_text-with-equivalent-force_str-68183.patch A. B., 16 August 2022 02:44 PM
0001-replaced-ugettext-calls-with-corresponding-gettext-c.patch (30.4 KB) 0001-replaced-ugettext-calls-with-corresponding-gettext-c.patch A. B., 16 August 2022 02:44 PM
0004-replaced-smart_text-with-smart_str-equivalent-68183.patch (2.38 KB) 0004-replaced-smart_text-with-smart_str-equivalent-68183.patch A. B., 16 August 2022 02:44 PM
0005-replaced-ungettext-with-ngettext-equivalent-68183.patch (1.57 KB) 0005-replaced-ungettext-with-ngettext-equivalent-68183.patch A. B., 16 August 2022 03:02 PM
0003-replaced-urls.url-with-url.re_path-equivalent-68183.patch (36.4 KB) 0003-replaced-urls.url-with-url.re_path-equivalent-68183.patch A. B., 16 August 2022 03:02 PM
0002-replaced-force_text-with-equivalent-force_str-68183.patch (33.7 KB) 0002-replaced-force_text-with-equivalent-force_str-68183.patch A. B., 16 August 2022 03:02 PM
0001-replaced-ugettext-calls-with-corresponding-gettext-c.patch (30.4 KB) 0001-replaced-ugettext-calls-with-corresponding-gettext-c.patch A. B., 16 August 2022 03:02 PM
0004-replaced-smart_text-with-smart_str-equivalent-68183.patch (2.38 KB) 0004-replaced-smart_text-with-smart_str-equivalent-68183.patch A. B., 16 August 2022 03:02 PM

Associated revisions

Revision f77ad1bc (diff)
Added by A. B. over 2 years ago

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

Revision 54eafdbb (diff)
Added by A. B. over 2 years ago

replaced force_text with equivalent force_str (#68183)

Revision b8269f4d (diff)
Added by A. B. over 2 years ago

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

Revision 25884a02 (diff)
Added by A. B. over 2 years ago

replaced smart_text with smart_str equivalent (#68183)

Revision 194d78e5 (diff)
Added by A. B. over 2 years ago

replaced ungettext with ngettext equivalent (#68183)

History

#1

Updated by A. B. over 2 years ago

  • Assignee set to A. B.
#3

Updated by A. B. over 2 years ago

  • Assignee changed from A. B. to 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

Updated by A. B. over 2 years ago

  • Assignee changed from Benjamin Dauvergne to A. B.
#6

Updated by Valentin Deniaud over 2 years ago

  • Status changed from Solution proposée to 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

Updated by Frédéric Péters over 2 years ago

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

Updated by Valentin Deniaud over 2 years ago

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

Updated by A. B. over 2 years ago

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

Updated by A. B. over 2 years ago

  • Status changed from Solution validée to 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

Updated by Transition automatique over 2 years ago

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

Updated by Transition automatique over 2 years ago

Automatic expiration

Also available in: Atom PDF