{"title":"Comment est constitué Django ?","version":"5.0","locale":"fr","docname":"internals/howto-release-django","url":"/fr/5.0/internals/howto-release-django/","canonical":"https://djangodocs.dev/fr/5.0/internals/howto-release-django/","summary":"Ce document explique comment est réalisée une publication de Django. Veuillez s’il-vous-plaît garder ces instructions à jour si vous procédez à des modifications !…","html":"<h1>Comment est constitué Django ?<a class=\"heading-anchor\" href=\"#how-is-django-formed\"><span class=\"visually-hidden\">Lien vers cette rubrique</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>Ce document explique comment est réalisée une publication de Django.</p>\n<p><strong>Veuillez s’il-vous-plaît garder ces instructions à jour si vous procédez à des modifications !</strong> La clé ici est d’être descriptif et non pas normatif, sentez-vous donc libre de simplifier ou de faire d’autres changements dans la procédure, mais alors <strong>mettez à jour ce document en fonction !</strong></p>\n<section id=\"overview\">\n<h2>Aperçu<a class=\"heading-anchor\" href=\"#overview\"><span class=\"visually-hidden\">Lien vers cette rubrique</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Il peut être nécessaire d’effectuer trois différents types de publications :</p>\n<ul class=\"simple\">\n<li><p>Publications de sécurité : annonce et résolution d’une vulnérabilité. Cela implique généralement deux ou trois publications simultanées – par ex. 3.2.x, 4.0.x et selon le timing, peut-être une 4.1.x.</p></li>\n<li><p>Publications de version normale : soit une publication finale (par ex. 4.1) ou une mise à jour corrective (par ex. 4.1.1).</p></li>\n<li><p>Prépublications : par ex. 4.2 alpha, bêta ou rc.</p></li>\n</ul>\n<p>La version courte des étapes à suivre est :</p>\n<ol class=\"arabic simple\">\n<li><p>S’il s’agit d’une publication de sécurité, prénotifier la liste de distribution de sécurité une semaine avant la publication effective.</p></li>\n<li><p>Relire les notes de publication, particulièrement en ce qui concerne leur organisation et leur formulation. Écrire un brouillon d’article de blog et de courriel d’annonce.</p></li>\n<li><p>Mettre à jour les numéros de version et créer le ou les paquets de la publication.</p></li>\n<li><p>Envoyer le ou les paquets sur le serveur <code class=\"docutils literal notranslate\"><span class=\"pre\">djangoproject.com</span></code>.</p></li>\n<li><p>Vérifier les signatures du ou des paquets, contrôler s’ils peuvent être installés et s’assurer de leur fonctionnement minimal.</p></li>\n<li><p>Envoyer la ou les nouvelles versions au serveur PyPI.</p></li>\n<li><p>Déclarer la nouvelle version dans l’interface d’administration de <code class=\"docutils literal notranslate\"><span class=\"pre\">djangoproject.com</span></code>.</p></li>\n<li><p>Publier l’article de blog et envoyer le courriel d’annonce.</p></li>\n<li><p>Mettre à jour les numéros de version après la publication.</p></li>\n</ol>\n<p>Il y a beaucoup de détails, accrochez-vous !</p>\n</section>\n<section id=\"prerequisites\">\n<h2>Prérequis<a class=\"heading-anchor\" href=\"#prerequisites\"><span class=\"visually-hidden\">Lien vers cette rubrique</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Vous avez besoin d’un certain nombre de choses avant de commencer :</p>\n<ul>\n<li><p>Une clé GPG. Si la clé que vous souhaitez utiliser n’est pas votre clé de signature par défaut, vous devrez ajouter <code class=\"docutils literal notranslate\"><span class=\"pre\">-u</span> <span class=\"pre\">vous&#64;example.com</span></code> à chaque commande de signature GPG ci-dessous, où <code class=\"docutils literal notranslate\"><span class=\"pre\">vous&#64;example.com</span></code> est l’adresse de courriel associée à la clé que vous allez utiliser. Vous devrez aussi ajouter <code class=\"docutils literal notranslate\"><span class=\"pre\">-i</span> <span class=\"pre\">vous&#64;exemple.com</span></code> à votre appel à <code class=\"docutils literal notranslate\"><span class=\"pre\">twine</span></code>.</p></li>\n<li><p>Une installation de quelques paquets Python indispensables :</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>python<span class=\"w\"> </span>-m<span class=\"w\"> </span>pip<span class=\"w\"> </span>install<span class=\"w\"> </span>wheel<span class=\"w\"> </span>twine\n</code></pre></div>\n</li>\n<li><p>Un accès au projet Django sur PyPI. Créez un jeton de portée de projet en suivant la <a class=\"reference external\" href=\"https://pypi.org/help/#apitoken\">documentation officielle</a> et configurez votre fichier <code class=\"docutils literal notranslate\"><span class=\"pre\">$HOME/.pypirc</span></code> comme ceci :</p>\n<figure class=\"code-block code-block-captioned\" data-language=\"ini\"><figcaption class=\"code-block-caption\"><code class=\"docutils literal notranslate\"><span class=\"pre\">~/.pypirc</span></code></figcaption>\n<div class=\"code-block-toolbar\"><span class=\"code-block-language\">Ini</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Ini code\"><code><span class=\"k\">[distutils]</span>\n<span class=\"w\">  </span><span class=\"na\">index-servers</span><span class=\"w\"> </span><span class=\"o\">=</span>\n<span class=\"w\">    </span><span class=\"na\">pypi</span>\n<span class=\"w\">    </span><span class=\"na\">django</span>\n\n<span class=\"k\">[pypi]</span>\n<span class=\"w\">  </span><span class=\"na\">username</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"s\">__token__</span>\n<span class=\"w\">  </span><span class=\"na\">password</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"c1\"># User-scoped or project-scoped token, to set as the default.</span>\n\n<span class=\"k\">[django]</span>\n<span class=\"w\">  </span><span class=\"na\">repository</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"s\">https://upload.pypi.org/legacy/</span>\n<span class=\"w\">  </span><span class=\"na\">username</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"s\">__token__</span>\n<span class=\"w\">  </span><span class=\"na\">password</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"c1\"># A project token.</span>\n</code></pre></figure>\n</li>\n<li><p>Un accès au serveur <code class=\"docutils literal notranslate\"><span class=\"pre\">djangoproject.com</span></code> pour y envoyer des fichiers.</p></li>\n<li><p>Un accès à l’interface d’administration de <code class=\"docutils literal notranslate\"><span class=\"pre\">djangoproject.com</span></code> comme « mainteneur de site ».</p></li>\n<li><p>Un droit de publication sur <code class=\"docutils literal notranslate\"><span class=\"pre\">django-announce</span></code>.</p></li>\n<li><p>S’il s’agit d’une publication de sécurité, un accès à la liste de distribution de prénotification.</p></li>\n</ul>\n<p>S’il s’agit de votre première publication, vous devrez vous coordonner avec un autre publicateur pour que tous ces éléments soient au point.</p>\n</section>\n<section id=\"pre-release-tasks\">\n<h2>Tâches de pré-publication<a class=\"heading-anchor\" href=\"#pre-release-tasks\"><span class=\"visually-hidden\">Lien vers cette rubrique</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Il faut s’occuper de quelques tâches avant même de commencer le processus de publication en tant que tel. Celles-ci commencent environ une semaine avant la publication ; la plupart peuvent être réalisées à n’importe quel moment précédant la publication réelle :</p>\n<ol class=\"arabic\">\n<li><p>If this is a security release, send out pre-notification <strong>one week</strong> before\nthe release. The template for that email and a list of the recipients are in\nthe private <code class=\"docutils literal notranslate\"><span class=\"pre\">django-security</span></code> GitHub wiki. BCC the pre-notification\nrecipients. Sign the email with the key you’ll use for the release and\ninclude <a class=\"reference external\" href=\"https://cveform.mitre.org/\">CVE IDs</a> (requested with Vendor:\ndjangoproject, Product: django) and patches for each issue being fixed.\nAlso, <a class=\"reference internal\" href=\"/fr/5.0/internals/security/#security-disclosure\"><span class=\"std std-ref\">notify django-announce</span></a> of the upcoming\nsecurity release.</p></li>\n<li><p>As the release approaches, watch Trac to make sure no release blockers\nare left for the upcoming release.</p></li>\n<li><p>Check with the other mergers to make sure they don’t have any uncommitted\nchanges for the release.</p></li>\n<li><p>Proofread the release notes, including looking at the online version to\n<a class=\"reference internal\" href=\"/fr/5.0/internals/contributing/writing-documentation/#documentation-link-check\"><span class=\"std std-ref\">catch any broken links</span></a> or reST errors, and\nmake sure the release notes contain the correct date.</p></li>\n<li><p>Double-check that the release notes mention deprecation timelines\nfor any APIs noted as deprecated, and that they mention any changes\nin Python version support.</p></li>\n<li><p>Double-check that the release notes index has a link to the notes\nfor the new release; this will be in <code class=\"docutils literal notranslate\"><span class=\"pre\">docs/releases/index.txt</span></code>.</p></li>\n<li><p>If this is a feature release, ensure translations from Transifex have been\nintegrated. This is typically done by a separate translation’s manager\nrather than the releaser, but here are the steps. Provided you have an\naccount on Transifex:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>python<span class=\"w\"> </span>scripts/manage_translations.py<span class=\"w\"> </span>fetch\n</code></pre></div>\n<p>and then commit the changed/added files (both <code class=\"docutils literal notranslate\"><span class=\"pre\">.po</span></code> and <code class=\"docutils literal notranslate\"><span class=\"pre\">.mo</span></code>).\nSometimes there are validation errors which need to be debugged, so avoid\ndoing this task immediately before a release is needed.</p>\n</li>\n<li><p><a class=\"reference internal\" href=\"/fr/5.0/internals/contributing/writing-documentation/#django-admin-manpage\"><span class=\"std std-ref\">Mettez à jour la page de manuel de django-admin</span></a>:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span><span class=\"nb\">cd</span><span class=\"w\"> </span>docs\n$<span class=\"w\"> </span>make<span class=\"w\"> </span>man\n$<span class=\"w\"> </span>man<span class=\"w\"> </span>_build/man/django-admin.1<span class=\"w\">  </span><span class=\"c1\"># do a quick sanity check</span>\n$<span class=\"w\"> </span>cp<span class=\"w\"> </span>_build/man/django-admin.1<span class=\"w\"> </span>man/django-admin.1\n</code></pre></div>\n<p>puis faites le commit de la page de manuel modifiée.</p>\n</li>\n<li><p>S’il s’agit de la version alpha d’une nouvelle série, créez une nouvelle branche stable à partir de <code class=\"docutils literal notranslate\"><span class=\"pre\">main</span></code>. Par exemple, lors de la publication de Django 4.2 :</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>git<span class=\"w\"> </span>checkout<span class=\"w\"> </span>-b<span class=\"w\"> </span>stable/4.2.x<span class=\"w\"> </span>origin/main\n$<span class=\"w\"> </span>git<span class=\"w\"> </span>push<span class=\"w\"> </span>origin<span class=\"w\"> </span>-u<span class=\"w\"> </span>stable/4.2.x:stable/4.2.x\n</code></pre></div>\n<p>At the same time, update the <code class=\"docutils literal notranslate\"><span class=\"pre\">django_next_version</span></code> variable in\n<code class=\"docutils literal notranslate\"><span class=\"pre\">docs/conf.py</span></code> on the stable release branch to point to the new\ndevelopment version. For example, when creating <code class=\"docutils literal notranslate\"><span class=\"pre\">stable/4.2.x</span></code>, set\n<code class=\"docutils literal notranslate\"><span class=\"pre\">django_next_version</span></code> to <code class=\"docutils literal notranslate\"><span class=\"pre\">'5.0'</span></code> on the new branch.</p>\n</li>\n<li><p>If this is the « dot zero » release of a new series, create a new branch from\nthe current stable branch in the <a class=\"reference external\" href=\"https://github.com/django/django-docs-translations\">django-docs-translations</a> repository. For\nexample, when releasing Django 4.2:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>git<span class=\"w\"> </span>checkout<span class=\"w\"> </span>-b<span class=\"w\"> </span>stable/4.2.x<span class=\"w\"> </span>origin/stable/4.1.x\n$<span class=\"w\"> </span>git<span class=\"w\"> </span>push<span class=\"w\"> </span>origin<span class=\"w\"> </span>stable/4.2.x:stable/4.2.x\n</code></pre></div>\n</li>\n</ol>\n</section>\n<section id=\"preparing-for-release\">\n<h2>Préparation de la publication<a class=\"heading-anchor\" href=\"#preparing-for-release\"><span class=\"visually-hidden\">Lien vers cette rubrique</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Écrivez l’article de blog d’annonce de la publication. Vous pouvez l’écrire dans le site d’administration tout en le marquant comme inactif. Voici quelque exemples : <a class=\"reference external\" href=\"https://www.djangoproject.com/weblog/2013/feb/19/security/\">exemple d’annonce de publication de sécurité</a>, <a class=\"reference external\" href=\"https://www.djangoproject.com/weblog/2012/mar/23/14/\">exemple d’annonce de publication normale</a>, <a class=\"reference external\" href=\"https://www.djangoproject.com/weblog/2012/nov/27/15-beta-1/\">exemple d’annonce de pré-publication</a>.</p>\n</section>\n<section id=\"actually-rolling-the-release\">\n<h2>Production réelle de la nouvelle version<a class=\"heading-anchor\" href=\"#actually-rolling-the-release\"><span class=\"visually-hidden\">Lien vers cette rubrique</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>OK, voilà donc la partie amusante où nous allons réellement produire une nouvelle version !</p>\n<ol class=\"arabic\">\n<li><p>Vérifiez que <a class=\"reference external\" href=\"https://djangoci.com\">Jenkins</a> est vert pour la ou les versions que vous allez produire. Vous ne devriez probablement pas produire de version tant que ce n’est pas vert.</p>\n</li>\n<li><p>A release always begins from a release branch, so you should make sure\nyou’re on a stable branch and up-to-date. For example:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>git<span class=\"w\"> </span>checkout<span class=\"w\"> </span>stable/4.1.x\n$<span class=\"w\"> </span>git<span class=\"w\"> </span>pull\n</code></pre></div>\n</li>\n<li><p>If this is a security release, merge the appropriate patches from\n<code class=\"docutils literal notranslate\"><span class=\"pre\">django-security</span></code>. Rebase these patches as necessary to make each one a\nplain commit on the release branch rather than a merge commit. To ensure\nthis, merge them with the <code class=\"docutils literal notranslate\"><span class=\"pre\">--ff-only</span></code> flag; for example:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>git<span class=\"w\"> </span>checkout<span class=\"w\"> </span>stable/4.1.x\n$<span class=\"w\"> </span>git<span class=\"w\"> </span>merge<span class=\"w\"> </span>--ff-only<span class=\"w\"> </span>security/4.1.x\n</code></pre></div>\n<p>(This assumes <code class=\"docutils literal notranslate\"><span class=\"pre\">security/4.1.x</span></code> is a branch in the <code class=\"docutils literal notranslate\"><span class=\"pre\">django-security</span></code> repo\ncontaining the necessary security patches for the next release in the 4.1\nseries.)</p>\n<p>If git refuses to merge with <code class=\"docutils literal notranslate\"><span class=\"pre\">--ff-only</span></code>, switch to the security-patch\nbranch and rebase it on the branch you are about to merge it into (<code class=\"docutils literal notranslate\"><span class=\"pre\">git</span>\n<span class=\"pre\">checkout</span> <span class=\"pre\">security/4.1.x;</span> <span class=\"pre\">git</span> <span class=\"pre\">rebase</span> <span class=\"pre\">stable/4.1.x</span></code>) and then switch back and\ndo the merge. Make sure the commit message for each security fix explains\nthat the commit is a security fix and that an announcement will follow\n(<a class=\"extlink-commit reference external\" href=\"https://github.com/django/django/commit/bf39978a53f117ca02e9a0c78b76664a41a54745\">example security commit</a>).</p>\n</li>\n<li><p>For a feature release, remove the <code class=\"docutils literal notranslate\"><span class=\"pre\">UNDER</span> <span class=\"pre\">DEVELOPMENT</span></code> header at the\ntop of the release notes and add the release date on the next line. For a\npatch release, remove the <code class=\"docutils literal notranslate\"><span class=\"pre\">Expected</span></code> prefix and update the release date,\nif necessary. Make this change on all branches where the release notes for a\nparticular version are located.</p></li>\n<li><p>Update the version number in <code class=\"docutils literal notranslate\"><span class=\"pre\">django/__init__.py</span></code> for the release.\nPlease see <a class=\"reference internal\" href=\"#notes-on-setting-the-version-tuple\">notes on setting the VERSION tuple</a> below for details\non <code class=\"docutils literal notranslate\"><span class=\"pre\">VERSION</span></code>.</p></li>\n<li><p>If this is a pre-release package, update the « Development Status » trove\nclassifier in <code class=\"docutils literal notranslate\"><span class=\"pre\">setup.cfg</span></code> to reflect this. Otherwise, make sure the\nclassifier is set to <code class=\"docutils literal notranslate\"><span class=\"pre\">Development</span> <span class=\"pre\">Status</span> <span class=\"pre\">::</span> <span class=\"pre\">5</span> <span class=\"pre\">-</span> <span class=\"pre\">Production/Stable</span></code>.</p></li>\n<li><p>Placez une étiquette sur la publication avec <code class=\"docutils literal notranslate\"><span class=\"pre\">git</span> <span class=\"pre\">tag</span></code>. Par exemple :</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>git<span class=\"w\"> </span>tag<span class=\"w\"> </span>--sign<span class=\"w\"> </span>--message<span class=\"o\">=</span><span class=\"s2\">&quot;Tag 4.1.1&quot;</span><span class=\"w\"> </span><span class=\"m\">4</span>.1.1\n</code></pre></div>\n<p>Vous pouvez contrôler votre travail en exécutant <code class=\"docutils literal notranslate\"><span class=\"pre\">git</span> <span class=\"pre\">tag</span> <span class=\"pre\">--verify</span> <span class=\"pre\">&lt;tag&gt;</span></code>.</p>\n</li>\n<li><p>Poussez votre travail, y compris l’étiquette : <code class=\"docutils literal notranslate\"><span class=\"pre\">git</span> <span class=\"pre\">push</span> <span class=\"pre\">--tags</span></code>.</p></li>\n<li><p>Assurez-vous d’avoir une arborescence parfaitement propre en exécutant <code class=\"docutils literal notranslate\"><span class=\"pre\">git</span> <span class=\"pre\">clean</span> <span class=\"pre\">-dfx</span></code>.</p></li>\n<li><p>Lancez <code class=\"docutils literal notranslate\"><span class=\"pre\">make</span> <span class=\"pre\">-f</span> <span class=\"pre\">extras/Makefile</span></code> pour générer les paquets à publier. Ces paquets seront créés dans un répertoire <code class=\"docutils literal notranslate\"><span class=\"pre\">dist/</span></code>.</p></li>\n<li><p>Générez les empreintes des paquets à publier :</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span><span class=\"nb\">cd</span><span class=\"w\"> </span>dist\n$<span class=\"w\"> </span>md5sum<span class=\"w\"> </span>*\n$<span class=\"w\"> </span>sha1sum<span class=\"w\"> </span>*\n$<span class=\"w\"> </span>sha256sum<span class=\"w\"> </span>*\n</code></pre></div>\n</li>\n<li><p>Créez un fichier « checksums », Django-&lt;&lt;VERSION&gt;&gt;.checksum.txt` contenant les empreintes et les informations de publication. Commencez avec ce modèle et insérez la version correcte, la date, l’identifiant de clé GPG (provenant de <code class=\"docutils literal notranslate\"><span class=\"pre\">gpg</span> <span class=\"pre\">--list-keys</span> <span class=\"pre\">--keyid-format</span> <span class=\"pre\">LONG</span></code>), le nom d’utilisateur de responsable de version GitHub, l’URL de publication et les sommes de contrôle :</p>\n<div class=\"code-block\" data-language=\"text\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Text</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Text code\"><code>This file contains MD5, SHA1, and SHA256 checksums for the source-code\ntarball and wheel files of Django &lt;&lt;VERSION&gt;&gt;, released &lt;&lt;DATE&gt;&gt;.\n\nTo use this file, you will need a working install of PGP or other\ncompatible public-key encryption software. You will also need to have\nthe Django release manager&#39;s public key in your keyring. This key has\nthe ID ``XXXXXXXXXXXXXXXX`` and can be imported from the MIT\nkeyserver, for example, if using the open-source GNU Privacy Guard\nimplementation of PGP:\n\n    gpg --keyserver pgp.mit.edu --recv-key XXXXXXXXXXXXXXXX\n\nor via the GitHub API:\n\n    curl https://github.com/&lt;&lt;RELEASE MANAGER GITHUB USERNAME&gt;&gt;.gpg | gpg --import -\n\nOnce the key is imported, verify this file:\n\n    gpg --verify &lt;&lt;THIS FILENAME&gt;&gt;\n\nOnce you have verified this file, you can use normal MD5, SHA1, or SHA256\nchecksumming applications to generate the checksums of the Django\npackage and compare them to the checksums listed below.\n\nRelease packages\n================\n\nhttps://www.djangoproject.com/m/releases/&lt;&lt;MAJOR VERSION&gt;&gt;/&lt;&lt;RELEASE TAR.GZ FILENAME&gt;&gt;\nhttps://www.djangoproject.com/m/releases/&lt;&lt;MAJOR VERSION&gt;&gt;/&lt;&lt;RELEASE WHL FILENAME&gt;&gt;\n\nMD5 checksums\n=============\n\n&lt;&lt;MD5SUM&gt;&gt;  &lt;&lt;RELEASE TAR.GZ FILENAME&gt;&gt;\n&lt;&lt;MD5SUM&gt;&gt;  &lt;&lt;RELEASE WHL FILENAME&gt;&gt;\n\nSHA1 checksums\n==============\n\n&lt;&lt;SHA1SUM&gt;&gt;  &lt;&lt;RELEASE TAR.GZ FILENAME&gt;&gt;\n&lt;&lt;SHA1SUM&gt;&gt;  &lt;&lt;RELEASE WHL FILENAME&gt;&gt;\n\nSHA256 checksums\n================\n\n&lt;&lt;SHA256SUM&gt;&gt;  &lt;&lt;RELEASE TAR.GZ FILENAME&gt;&gt;\n&lt;&lt;SHA256SUM&gt;&gt;  &lt;&lt;RELEASE WHL FILENAME&gt;&gt;\n</code></pre></div>\n</li>\n<li><p>Signez le fichier de sommes de contrôle (<code class=\"docutils literal notranslate\"><span class=\"pre\">gpg</span> <span class=\"pre\">--clearsign</span> <span class=\"pre\">--digest-algo</span> <span class=\"pre\">SHA256</span> <span class=\"pre\">Django-&lt;version&gt;.checksum.txt</span></code>). Cela produit un document signé, <code class=\"docutils literal notranslate\"><span class=\"pre\">Django-&lt;version&gt;.checksum.txt.asc</span></code> que vous pouvez ensuite vérifier avec <code class=\"docutils literal notranslate\"><span class=\"pre\">gpg</span> <span class=\"pre\">--verify</span> <span class=\"pre\">Django-&lt;version&gt;.checksum.txt.asc</span></code>.</p></li>\n</ol>\n<p>Si vous produisez plusieurs publications, répétez ces étapes pour chaque publication.</p>\n</section>\n<section id=\"making-the-release-s-available-to-the-public\">\n<h2>Rendre la ou les publications publique(s)<a class=\"heading-anchor\" href=\"#making-the-release-s-available-to-the-public\"><span class=\"visually-hidden\">Lien vers cette rubrique</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Vous êtes maintenant prêt à publier les nouveaux paquets. Pour cela :</p>\n<ol class=\"arabic\">\n<li><p>Téléversez les paquets à publier sur le serveur djangoproject, en remplaçant A.B. par le numéro de version approprié, par ex. 4.1 pour une publication 4.1.x :</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>scp<span class=\"w\"> </span>Django-*<span class=\"w\"> </span>djangoproject.com:/home/www/www/media/releases/A.B\n</code></pre></div>\n<p>S’il s’agit de la publication alpha d’une nouvelle série, vous devrez créer le répertoire A.B.</p>\n</li>\n<li><p>Téléversez les fichiers de sommes de contrôle :</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>scp<span class=\"w\"> </span>Django-A.B.C.checksum.txt.asc<span class=\"w\"> </span>djangoproject.com:/home/www/www/media/pgp/Django-A.B.C.checksum.txt\n</code></pre></div>\n</li>\n<li><p>Testez que les paquets de publication s’installent correctement avec <code class=\"docutils literal notranslate\"><span class=\"pre\">pip</span></code>.  Voici l’une des méthodes :</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span><span class=\"nv\">RELEASE_VERSION</span><span class=\"o\">=</span><span class=\"s1\">&#39;4.1.1&#39;</span>\n$<span class=\"w\"> </span><span class=\"nv\">MAJOR_VERSION</span><span class=\"o\">=</span><span class=\"sb\">`</span><span class=\"nb\">echo</span><span class=\"w\"> </span><span class=\"nv\">$RELEASE_VERSION</span><span class=\"p\">|</span><span class=\"w\"> </span>cut<span class=\"w\"> </span>-c<span class=\"w\"> </span><span class=\"m\">1</span>-3<span class=\"sb\">`</span>\n\n$<span class=\"w\"> </span>python<span class=\"w\"> </span>-m<span class=\"w\"> </span>venv<span class=\"w\"> </span>django-pip\n$<span class=\"w\"> </span>.<span class=\"w\"> </span>django-pip/bin/activate\n$<span class=\"w\"> </span>python<span class=\"w\"> </span>-m<span class=\"w\"> </span>pip<span class=\"w\"> </span>install<span class=\"w\"> </span>https://www.djangoproject.com/m/releases/<span class=\"nv\">$MAJOR_VERSION</span>/Django-<span class=\"nv\">$RELEASE_VERSION</span>.tar.gz\n$<span class=\"w\"> </span>deactivate\n$<span class=\"w\"> </span>python<span class=\"w\"> </span>-m<span class=\"w\"> </span>venv<span class=\"w\"> </span>django-pip-wheel\n$<span class=\"w\"> </span>.<span class=\"w\"> </span>django-pip-wheel/bin/activate\n$<span class=\"w\"> </span>python<span class=\"w\"> </span>-m<span class=\"w\"> </span>pip<span class=\"w\"> </span>install<span class=\"w\"> </span>https://www.djangoproject.com/m/releases/<span class=\"nv\">$MAJOR_VERSION</span>/Django-<span class=\"nv\">$RELEASE_VERSION</span>-py3-none-any.whl\n$<span class=\"w\"> </span>deactivate\n</code></pre></div>\n<p>Cela teste uniquement que les publications sont disponibles (i.e. les redirections sont actives) et qu’elles s’installent correctement, mais cela va au moins révéler d’éventuelles erreurs stupides.</p>\n</li>\n<li><p>Lancez la construction <a class=\"reference external\" href=\"https://djangoci.com/job/confirm-release/\">confirm-release</a> sur Jenkins pour vérifier les fichiers de sommes de contrôle (par ex. utilisez <code class=\"docutils literal notranslate\"><span class=\"pre\">4.2rc1</span></code> pour <a class=\"reference external\" href=\"https://media.djangoproject.com/pgp/Django-4.2rc1.checksum.txt\">https://media.djangoproject.com/pgp/Django-4.2rc1.checksum.txt</a>).</p>\n</li>\n<li><p>Envoyez les paquets à publier vers PyPI (pour les prépublications, n’envoyez que le fichier wheel) :</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>twine<span class=\"w\"> </span>upload<span class=\"w\"> </span>-s<span class=\"w\"> </span>dist/*\n</code></pre></div>\n</li>\n<li><p>Go to the <a class=\"reference external\" href=\"https://www.djangoproject.com/admin/releases/release/add/\">Add release page in the admin</a>, enter the new release number\nexactly as it appears in the name of the tarball\n(<code class=\"docutils literal notranslate\"><span class=\"pre\">Django-&lt;version&gt;.tar.gz</span></code>). So for example enter « 4.1.1 » or « 4.2rc1 »,\netc. If the release is part of an LTS branch, mark it so.</p>\n<p>If this is the alpha release of a new series, also create a Release object\nfor the <em>final</em> release, ensuring that the <em>Release date</em> field is blank,\nthus marking it as <em>unreleased</em>. For example, when creating the Release\nobject for <code class=\"docutils literal notranslate\"><span class=\"pre\">4.2a1</span></code>, also create <code class=\"docutils literal notranslate\"><span class=\"pre\">4.2</span></code> with the Release date field blank.</p>\n</li>\n<li><p>Écrivez l’article de blog annonçant que la publication est en ligne.</p></li>\n<li><p>For a new version release (e.g. 4.1, 4.2), update the default stable version\nof the docs by flipping the <code class=\"docutils literal notranslate\"><span class=\"pre\">is_default</span></code> flag to <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> on the\nappropriate <code class=\"docutils literal notranslate\"><span class=\"pre\">DocumentRelease</span></code> object in the <code class=\"docutils literal notranslate\"><span class=\"pre\">docs.djangoproject.com</span></code>\ndatabase (this will automatically flip it to <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code> for all\nothers); you can do this using the site’s admin.</p>\n<p>Create new <code class=\"docutils literal notranslate\"><span class=\"pre\">DocumentRelease</span></code> objects for each language that has an entry\nfor the previous release. Update djangoproject.com’s <a class=\"reference external\" href=\"https://github.com/django/djangoproject.com/blob/main/djangoproject/static/robots.docs.txt\">robots.docs.txt</a>\nfile by copying entries from <code class=\"docutils literal notranslate\"><span class=\"pre\">manage_translations.py</span> <span class=\"pre\">robots_txt</span></code> from the\ncurrent stable branch in the <code class=\"docutils literal notranslate\"><span class=\"pre\">django-docs-translations</span></code> repository. For\nexample, when releasing Django 4.2:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>git<span class=\"w\"> </span>checkout<span class=\"w\"> </span>stable/4.2.x\n$<span class=\"w\"> </span>git<span class=\"w\"> </span>pull\n$<span class=\"w\"> </span>python<span class=\"w\"> </span>manage_translations.py<span class=\"w\"> </span>robots_txt\n</code></pre></div>\n</li>\n<li><p>Post the release announcement to the <a class=\"reference internal\" href=\"/fr/5.0/internals/mailing-lists/#django-announce-mailing-list\"><span class=\"std std-ref\">django-announce</span></a>, <a class=\"reference internal\" href=\"/fr/5.0/internals/mailing-lists/#django-developers-mailing-list\"><span class=\"std std-ref\">django-developers</span></a>,\n<a class=\"reference internal\" href=\"/fr/5.0/internals/mailing-lists/#django-users-mailing-list\"><span class=\"std std-ref\">django-users</span></a> mailing lists, and the Django Forum. This should include a\nlink to the announcement blog post.</p></li>\n<li><p>If this is a security release, send a separate email to\n<a class=\"reference external\" href=\"mailto:oss-security&#37;&#52;&#48;lists&#46;openwall&#46;com\">oss-security<span>&#64;</span>lists<span>&#46;</span>openwall<span>&#46;</span>com</a>. Provide a descriptive subject, for example,\n« Django » plus the issue title from the release notes (including CVE ID). The\nmessage body should include the vulnerability details, for example, the\nannouncement blog post text. Include a link to the announcement blog post.</p></li>\n<li><p>Ajoutez un lien vers l’article de blog dans le sujet du canal IRC <code class=\"docutils literal notranslate\"><span class=\"pre\">#django</span></code>: <code class=\"docutils literal notranslate\"><span class=\"pre\">/msg</span> <span class=\"pre\">chanserv</span> <span class=\"pre\">TOPIC</span> <span class=\"pre\">#django</span> <span class=\"pre\">ici</span> <span class=\"pre\">le</span> <span class=\"pre\">nouveau</span> <span class=\"pre\">sujet</span></code>.</p></li>\n</ol>\n</section>\n<section id=\"post-release\">\n<h2>Après la publication<a class=\"heading-anchor\" href=\"#post-release\"><span class=\"visually-hidden\">Lien vers cette rubrique</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Vous êtes presque au bout ! Tout ce qui reste à faire est :</p>\n<ol class=\"arabic simple\">\n<li><p>Mettre à jour à nouveau le tuple <code class=\"docutils literal notranslate\"><span class=\"pre\">VERSION</span></code> dans <code class=\"docutils literal notranslate\"><span class=\"pre\">django/__init__.py</span></code>, en l’incrémentant à ce que la prochaine version devra donner. Par exemple, après la publication de 4.1.1, mettez à jour <code class=\"docutils literal notranslate\"><span class=\"pre\">VERSION</span></code> à <code class=\"docutils literal notranslate\"><span class=\"pre\">VERSION</span> <span class=\"pre\">=</span> <span class=\"pre\">(4,</span> <span class=\"pre\">1,</span> <span class=\"pre\">2,</span> <span class=\"pre\">'alpha',</span> <span class=\"pre\">0)</span></code>.</p></li>\n<li><p>Ajoutez la version dans la <a class=\"reference external\" href=\"https://code.djangoproject.com/admin/ticket/versions\">liste des versions de Trac</a> si nécessaire (et, s’il s’agit d’une version finale, mettez-la comme version par défaut en modifiant le réglage <code class=\"docutils literal notranslate\"><span class=\"pre\">default_version</span></code> dans le fichier <a class=\"reference external\" href=\"https://github.com/django/code.djangoproject.com/blob/main/trac-env/conf/trac.ini\">trac.ini</a> de code.djangoproject.com). La nouvelle version X.Y doit être ajoutée après la publication alpha et la version par défaut doit être mise à jour après la publication <code class=\"docutils literal notranslate\"><span class=\"pre\">.0</span></code>.</p>\n</li>\n<li><p>S’il s’agit d’une nouvelle version majeure, mettez à jour la branche stable actuelle et enlevez les branches de pré-publication dans le <a class=\"reference external\" href=\"https://code.djangoproject.com/#Djangoreleaseprocess\">processus de publication de Django</a> sur Trac.</p></li>\n<li><p>S’il s’est agi d’une publication de sécurité, mettez à jour <a class=\"reference internal\" href=\"/fr/5.0/releases/security/\"><span class=\"doc\">Archive des issues de sécurité</span></a> avec les détails sur les problèmes corrigés.</p></li>\n</ol>\n</section>\n<section id=\"new-stable-branch-tasks\">\n<h2>Tâches pour les nouvelles versions stables<a class=\"heading-anchor\" href=\"#new-stable-branch-tasks\"><span class=\"visually-hidden\">Lien vers cette rubrique</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Il y a plusieurs choses à faire à la suite de la création d’une nouvelle branche stable (suivant en général une publication alpha). Certaines de ces tâches n’ont pas besoin d’être réalisées par le publicateur.</p>\n<ol class=\"arabic simple\">\n<li><p>Créez un nouvel objet <code class=\"docutils literal notranslate\"><span class=\"pre\">DocumentRelease</span></code> dans la base de données <code class=\"docutils literal notranslate\"><span class=\"pre\">docs.djangoproject.com</span></code> pour la documentation de la nouvelle version et mettez à jour l’instantané JSON <code class=\"docutils literal notranslate\"><span class=\"pre\">docs/fixtures/doc_releases.json</span></code> afin que les personnes sans accès à la base de données de production puissent tout de même faire fonctionner une copie à jour du site de documentation.</p></li>\n<li><p>Créez un squelette de notes de publication pour la nouvelle version majeure. Utilisez le modèle de l’ancienne version majeure ou copiez le contenu d’une précédente version majeure en supprimant la plupart de son contenu excepté les en-têtes.</p></li>\n<li><p>Augmentez le nombre d’itérations PBKDF2 par défaut dans <code class=\"docutils literal notranslate\"><span class=\"pre\">django.contrib.auth.hashers.PBKDF2PasswordHasher</span></code> d’environ 20% (en choisissant un chiffre rond). Lancez les tests et mettez à jour les 3 tests en échec liés aux empreintes avec les nouvelles valeurs. Assurez-vous que les notes de publication mentionnent cette augmentation (voir par exemple les notes de publication de la version 4.1).</p></li>\n<li><p>Enlevez les fonctionnalités qui ont atteint la fin de leur cycle d’obsolescence. Chaque suppression doit être appliquée dans un commit séparé pour plus de clarté. Dans le message de commit, ajoutez si possible la mention « refs #XXXX » pointant vers le ticket d’origine qui a provoqué l’obsolescence.</p></li>\n<li><p>Supprimez les annotations <code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">versionadded::</span></code>, <code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">versionadded::</span></code> et <code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">deprecated::</span></code> dans la documentation concernant l’avant-dernière publication. Par exemple, dans Django 4.2, les notes pour 4.0 seront supprimées.</p></li>\n<li><p>Ajoutez la nouvelle branche sur <a class=\"reference external\" href=\"https://readthedocs.org/projects/django/\">Read the Docs</a>. Comme les noms de versions automatiquement générés («stable-A.B.x») diffèrent des noms de versions utilisés dans Read the Docs («A.B.x»), <a class=\"reference external\" href=\"https://github.com/readthedocs/readthedocs.org/issues/5537\">créez un ticket</a> demandant la nouvelle version.</p></li>\n<li><p><a class=\"reference external\" href=\"https://github.com/pypa/trove-classifiers/issues/29\">Demandez la nouvelle classification sur PyPI</a>. Par exemple, <code class=\"docutils literal notranslate\"><span class=\"pre\">Framework</span> <span class=\"pre\">::</span> <span class=\"pre\">Django</span> <span class=\"pre\">::</span> <span class=\"pre\">3.1</span></code>.</p></li>\n<li><p>Update the current branch under active development and add pre-release\nbranch in the <a class=\"reference external\" href=\"https://code.djangoproject.com/#Djangoreleaseprocess\">Django release process</a> on Trac.</p></li>\n</ol>\n</section>\n<section id=\"notes-on-setting-the-version-tuple\">\n<h2>Notes sur la définition du tuple VERSION<a class=\"heading-anchor\" href=\"#notes-on-setting-the-version-tuple\"><span class=\"visually-hidden\">Lien vers cette rubrique</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>La version de Django est contrôlée par le tuple <code class=\"docutils literal notranslate\"><span class=\"pre\">VERSION</span></code> dans <code class=\"docutils literal notranslate\"><span class=\"pre\">django/__init__.py</span></code>. C’est un tuple à cinq éléments, contenant :</p>\n<ol class=\"arabic simple\">\n<li><p>La version majeure.</p></li>\n<li><p>La version mineure.</p></li>\n<li><p>La version micro.</p></li>\n<li><p>Le statut, qui peut-être « alpha », « beta », « rc » ou « final ».</p></li>\n<li><p>Le numéro de série, dans le cas des versions alpha/beta/RC qui se font suite (autorisant, par exemple, « beta 1 », « beta 2 », etc.).</p></li>\n</ol>\n<p>Pour une version finale, le statut est toujours « final » et le numéro de série 0. Un numéro de série à 0 avec le statut « alpha » est signalé comme une « pre-alpha ».</p>\n<p>Quelques exemples :</p>\n<ul class=\"simple\">\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">(4,</span> <span class=\"pre\">1,</span> <span class=\"pre\">1,</span> <span class=\"pre\">&quot;final&quot;,</span> <span class=\"pre\">0)</span></code> → « 4.1.1 »</p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">(4,</span> <span class=\"pre\">2,</span> <span class=\"pre\">0,</span> <span class=\"pre\">&quot;alpha&quot;,</span> <span class=\"pre\">0)</span></code> → « 4.2 pre-alpha »</p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">(4,</span> <span class=\"pre\">2,</span> <span class=\"pre\">0,</span> <span class=\"pre\">&quot;beta&quot;,</span> <span class=\"pre\">1)</span></code> → « 4.2 beta 1 »</p></li>\n</ul>\n</section>","rootId":"how-is-django-formed","toc":[{"title":"Aperçu","anchor":"overview","children":[]},{"title":"Prérequis","anchor":"prerequisites","children":[]},{"title":"Tâches de pré-publication","anchor":"pre-release-tasks","children":[]},{"title":"Préparation de la publication","anchor":"preparing-for-release","children":[]},{"title":"Production réelle de la nouvelle version","anchor":"actually-rolling-the-release","children":[]},{"title":"Rendre la ou les publications publique(s)","anchor":"making-the-release-s-available-to-the-public","children":[]},{"title":"Après la publication","anchor":"post-release","children":[]},{"title":"Tâches pour les nouvelles versions stables","anchor":"new-stable-branch-tasks","children":[]},{"title":"Notes sur la définition du tuple VERSION","anchor":"notes-on-setting-the-version-tuple","children":[]}],"breadcrumbs":[{"docname":"internals/index","title":"Fonctionnement interne du projet Django","url":"/fr/5.0/internals/"}],"prev":{"docname":"internals/git","title":"Le dépôt de code source de Django","url":"/fr/5.0/internals/git/"},"next":null,"formats":{"html":"/fr/5.0/internals/howto-release-django/","markdown":"/fr/5.0/internals/howto-release-django.md","json":"/fr/5.0/internals/howto-release-django.json"},"source":"https://github.com/django/django/blob/stable/5.0.x/docs/internals/howto-release-django.txt","official":"https://docs.djangoproject.com/fr/5.0/internals/howto-release-django/","inVersions":["6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1","3.0","2.2","2.1","2.0","1.11","1.10","1.9"],"inLocales":["en","zh-hans","fr","ja","id","it","pt-br","ko","es","el","pl"]}