Développement #68183
Publik - Développement #68182: montée de version django (→ 4.2 LTS)
Préparation django 4 : DeprecationWarnings
0%
Description
cf tache parente
Files
Associated revisions
replaced force_text with equivalent force_str (#68183)
replaced urls.url with url.re_path equivalent (#68183)
replaced smart_text with smart_str equivalent (#68183)
replaced ungettext with ngettext equivalent (#68183)
History
Updated by A. B. over 2 years ago
- File 0003-replaced-urls.url-with-url.re_path-equivalent-68183.patch 0003-replaced-urls.url-with-url.re_path-equivalent-68183.patch added
- File 0002-replaced-force_text-with-equivalent-force_str-68183.patch 0002-replaced-force_text-with-equivalent-force_str-68183.patch added
- File 0001-replaced-ugettext-calls-with-corresponding-gettext-c.patch 0001-replaced-ugettext-calls-with-corresponding-gettext-c.patch added
- File 0004-replaced-smart_text-with-smart_str-equivalent-68183.patch 0004-replaced-smart_text-with-smart_str-equivalent-68183.patch added
- Status changed from Nouveau to Solution proposée
- Patch proposed changed from No to Yes
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).
Updated by A. B. over 2 years ago
- File 0005-replaced-ungettext-with-ngettext-equivalent-68183.patch 0005-replaced-ungettext-with-ngettext-equivalent-68183.patch added
- File 0003-replaced-urls.url-with-url.re_path-equivalent-68183.patch 0003-replaced-urls.url-with-url.re_path-equivalent-68183.patch added
- File 0002-replaced-force_text-with-equivalent-force_str-68183.patch 0002-replaced-force_text-with-equivalent-force_str-68183.patch added
- File 0001-replaced-ugettext-calls-with-corresponding-gettext-c.patch 0001-replaced-ugettext-calls-with-corresponding-gettext-c.patch added
- File 0004-replaced-smart_text-with-smart_str-equivalent-68183.patch 0004-replaced-smart_text-with-smart_str-equivalent-68183.patch added
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.
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.
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.
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
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)
Updated by Transition automatique over 2 years ago
- Status changed from Résolu (à déployer) to Solution déployée
replaced ugettext* calls with corresponding gettext* calls (#68183)