{"title":"Como o Django é formado?","version":"4.2","locale":"pt-br","docname":"internals/howto-release-django","url":"/pt-br/4.2/internals/howto-release-django/","canonical":"https://djangodocs.dev/pt-br/4.2/internals/howto-release-django/","summary":"Este documento explica como fazer uma release do Django. Por favor, mantenha essas instruções atualizadas se você fizer mudanças! A ideia aqui é ser descritivo, não…","html":"<h1>Como o Django é formado?<a class=\"heading-anchor\" href=\"#how-is-django-formed\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>Este documento explica como fazer uma release do Django.</p>\n<p><strong>Por favor, mantenha essas instruções atualizadas se você fizer mudanças!</strong> A ideia aqui é ser descritivo, não prescritivo, então sinta-se à vontade para agilizar ou por outro lado fazer mudanças, mas <strong>atualize este documento de acordo</strong></p>\n<section id=\"overview\">\n<h2>Visão Geral<a class=\"heading-anchor\" href=\"#overview\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Existem três tipos de releases que você pode precisar fazer:</p>\n<ul class=\"simple\">\n<li><p>Security releases: disclosing and fixing a vulnerability. This’ll\ngenerally involve two or three simultaneous releases – e.g.\n3.2.x, 4.0.x, and, depending on timing, perhaps a 4.1.x.</p></li>\n<li><p>Regular version releases: either a final release (e.g. 4.1) or a\nbugfix update (e.g. 4.1.1).</p></li>\n<li><p>Pre-releases: e.g. 4.2 alpha, beta, or rc.</p></li>\n</ul>\n<p>Uma curta versão dos passos envolvidos é a seguinte:</p>\n<ol class=\"arabic simple\">\n<li><p>Se esta é uma release de segurança, pre-notificar a lista de distribuição de segurança uma semana antes da release atual.</p></li>\n<li><p>Revisar as notas de release, buscando por melhor organização e erros de escrita. Esboçar um post de blog e um e-mail de anúncio.</p></li>\n<li><p>Atualizar os números de versão e criar um ou mais pacotes de release.</p></li>\n<li><p>Fazer upload do pacote (ou dos pacotes) para o servidor <code class=\"docutils literal notranslate\"><span class=\"pre\">djangoproject.com</span></code>.</p></li>\n<li><p>Fazer upload da nova versão (ou versões) para o PyPI.</p></li>\n<li><p>Declare a nova versão no admin em <code class=\"docutils literal notranslate\"><span class=\"pre\">djangoproject.com</span></code>.</p></li>\n<li><p>Postar a entrada no blog e enviar os anúncios de e-mail.</p></li>\n<li><p>Atualizar os números de versão pós-release.</p></li>\n</ol>\n<p>Existem vários detalhes, então por favor continue lendo.</p>\n</section>\n<section id=\"prerequisites\">\n<h2>Pré-requisitos<a class=\"heading-anchor\" href=\"#prerequisites\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Você vai precisar de algumas coisas antes de começar:</p>\n<ul>\n<li><p>Uma chage GPG. Se a chave que você quer usar não é sua chave de assinatura padrão, você vai precisar adicionar <code class=\"docutils literal notranslate\"><span class=\"pre\">-u</span> <span class=\"pre\">you&#64;example.com</span></code> para cada comando de assinatura GPG abaixo, onde <code class=\"docutils literal notranslate\"><span class=\"pre\">you&#64;example.com</span></code> é um endereço de email associado com a chave que você quer usar.</p></li>\n<li><p>An install of some required Python packages:</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>build<span class=\"w\"> </span>twine\n</code></pre></div>\n</li>\n<li><p>Acesso ao registro do Django no PyPI. Criar um arquivo com suas credenciais:</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\">[pypi]</span>\n<span class=\"na\">username</span><span class=\"o\">:</span><span class=\"s\">YourUsername</span>\n<span class=\"na\">password</span><span class=\"o\">:</span><span class=\"s\">YourPassword</span>\n</code></pre></figure>\n</li>\n<li><p>Acessar o servidor de <code class=\"docutils literal notranslate\"><span class=\"pre\">djangoproject.com</span></code> para atualizar os arquivos.</p></li>\n<li><p>Acesso para o admin em <code class=\"docutils literal notranslate\"><span class=\"pre\">djangoproject.com</span></code> como um “Site maintainer”.</p></li>\n<li><p>Acesso para postar em <code class=\"docutils literal notranslate\"><span class=\"pre\">django-announce</span></code>.</p></li>\n<li><p>Se essa é uma release de segurança, acesso para a lista de distribuição de segurança.</p></li>\n</ul>\n<p>If this is your first release, you’ll need to coordinate with another releaser\nto get all these things lined up.</p>\n</section>\n<section id=\"pre-release-tasks\">\n<h2>Tarefas de pré-release<a class=\"heading-anchor\" href=\"#pre-release-tasks\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Alguns itens precisam ser realizados antes mesmo de começar o processo de release. Isso começa por volta de uma semana antes da release; a maior parte dele pode ser feita a qualquer momento culminando na release em si:</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=\"/pt-br/4.2/internals/security/#security-disclosure\"><span class=\"std std-ref\">notify django-announce</span></a> of the upcoming\nsecurity release.</p></li>\n<li><p>À medida em que a release se aproxima, acompanhe o Track para se certificar de que nenhum problema que possa bloquear a release prestes a ser lançada tenha restado sem solução.</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=\"/pt-br/4.2/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>Verifique duas vezes as menções de depreciação ao longo do tempo nas notas da release em busca de quaisquer APIs listadas como depreciadas, e que as notas mencionam quaisquer mudanças na versão suportada do Python.</p></li>\n<li><p>Verifique duas vezes se o índice das notas de release possuem um link para as notas da nova release; isso estará em <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=\"/pt-br/4.2/internals/contributing/writing-documentation/#django-admin-manpage\"><span class=\"std std-ref\">Update the django-admin manual page</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>e então faça commit da página man alterada.</p>\n</li>\n<li><p>If this is the alpha release of a new series, create a new stable branch\nfrom main. For example, 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/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>Preparando para a release<a class=\"heading-anchor\" href=\"#preparing-for-release\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Escreva o post no blog para o anúncio da release. Você pode entrar dentro do admin a qualquer momento e marcar ele como inativo. Aqui vão alguns exemplos: <a class=\"reference external\" href=\"https://www.djangoproject.com/weblog/2013/feb/19/security/\">example security release announcement</a>, <a class=\"reference external\" href=\"https://www.djangoproject.com/weblog/2012/mar/23/14/\">example regular release announcement</a>, <a class=\"reference external\" href=\"https://www.djangoproject.com/weblog/2012/nov/27/15-beta-1/\">example pre-release announcement</a>.</p>\n</section>\n<section id=\"actually-rolling-the-release\">\n<h2>Lançando a release<a class=\"heading-anchor\" href=\"#actually-rolling-the-release\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>OK, esta é a parte divertida, quando nós efetivamente fazemos o push da release!</p>\n<ol class=\"arabic\">\n<li><p>Veja se o status do <a class=\"reference external\" href=\"https://djangoci.com\">Jenkins</a> é verde para a versão (ou versões) que você está soltando. Você provavelmente não deve lançar uma release enquanto ele não estiver com o status verde.</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>Atualize o número da versão em <code class=\"docutils literal notranslate\"><span class=\"pre\">django/__init__.py</span></code> para a release. Por favor veja <a class=\"reference internal\" href=\"#notes-on-setting-the-version-tuple\">as notas sobre configurando a tupla VERSION</a> abaixo para mais detalhes sobre <code class=\"docutils literal notranslate\"><span class=\"pre\">VERSION</span></code>.</p>\n<ol class=\"arabic simple\">\n<li><p>If this is a pre-release package also update the “Development Status”\ntrove classifier in <code class=\"docutils literal notranslate\"><span class=\"pre\">pyproject.toml</span></code> to reflect this. An <code class=\"docutils literal notranslate\"><span class=\"pre\">rc</span></code>\npre-release should not change the trove classifier (<a class=\"extlink-commit reference external\" href=\"https://github.com/django/django/commit/eeeacc52a967234e920c001b7908c4acdfd7a848\">example\ncommit for alpha release</a>,\n<a class=\"extlink-commit reference external\" href=\"https://github.com/django/django/commit/25fec8940b24107e21314ab6616e18ce8dec1c1c\">example commit for beta release</a>).</p></li>\n<li><p>Otherwise, make sure the classifier is set to\n<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</ol>\n</li>\n<li><p>Tag the release using <code class=\"docutils literal notranslate\"><span class=\"pre\">git</span> <span class=\"pre\">tag</span></code>. 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>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>Você pode checar o seu trabalho rodando o comando <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>Faça o push do seu trabalho, incluindo a tag: <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>Certifique-se de que você tem uma árvore absolutamente limpa rodando o comando git clean -dfx`.</p></li>\n<li><p>Run <code class=\"docutils literal notranslate\"><span class=\"pre\">python</span> <span class=\"pre\">-m</span> <span class=\"pre\">build</span></code> to generate the release packages. This will create\nthe release packages in a <code class=\"docutils literal notranslate\"><span class=\"pre\">dist/</span></code> directory.</p></li>\n<li><p>Generate the hashes of the release packages:</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>Create a “checksums” file, <code class=\"docutils literal notranslate\"><span class=\"pre\">Django-&lt;&lt;VERSION&gt;&gt;.checksum.txt</span></code> containing\nthe hashes and release information. Start with this template and insert the\ncorrect version, date, GPG key ID (from\n<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>), release manager’s GitHub username,\nrelease URL, and checksums:</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>Assine o arquivo de checksum (<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>). Isso gera um documento assinado, <code class=\"docutils literal notranslate\"><span class=\"pre\">Django-&lt;version&gt;.checksum.txt.asc</span></code> que você pode então verificar usando <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>Se você estiver lançando múltiplas releases, repita esses passos para cada release.</p>\n</section>\n<section id=\"making-the-release-s-available-to-the-public\">\n<h2>Fazendo a release (ou as releases) disponível ao público<a class=\"heading-anchor\" href=\"#making-the-release-s-available-to-the-public\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Agora você está pronto para lançar a release efetivamente. Para isso faça:</p>\n<ol class=\"arabic\">\n<li><p>Upload the release package(s) to the djangoproject server, replacing\nA.B. with the appropriate version number, e.g. 4.1 for a 4.1.x release:</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>If this is the alpha release of a new series, you will need to create the\ndirectory A.B.</p>\n</li>\n<li><p>Upload the checksum file(s):</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>Test that the release packages install correctly using <code class=\"docutils literal notranslate\"><span class=\"pre\">pip</span></code>. Here’s one\nmethod:</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>Isso só verifica se as tarballs estão disponíveis (ex. redirecionamentos estão funcionando) e que eles instalaram corretamente, mas eles irão pegar erros bobos.</p>\n</li>\n<li><p>Run the <a class=\"reference external\" href=\"https://djangoci.com/job/confirm-release/\">confirm-release</a> build on Jenkins to verify the checksum file(s)\n(e.g. use <code class=\"docutils literal notranslate\"><span class=\"pre\">4.2rc1</span></code> for\n<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>Upload the release packages to PyPI (for pre-releases, only upload the wheel\nfile):</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>Faça um post no blog anunciando que a release foi lançada.</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=\"/pt-br/4.2/internals/mailing-lists/#django-announce-mailing-list\"><span class=\"std std-ref\">django-announce</span></a>, <a class=\"reference internal\" href=\"/pt-br/4.2/internals/mailing-lists/#django-developers-mailing-list\"><span class=\"std std-ref\">django-developers</span></a>,\n<a class=\"reference internal\" href=\"/pt-br/4.2/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>Add a link to the blog post in the topic of the <code class=\"docutils literal notranslate\"><span class=\"pre\">#django</span></code> IRC channel:\n<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\">new</span> <span class=\"pre\">topic</span> <span class=\"pre\">goes</span> <span class=\"pre\">here</span></code>.</p></li>\n</ol>\n</section>\n<section id=\"post-release\">\n<h2>Pós-release<a class=\"heading-anchor\" href=\"#post-release\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Você quase terminou! Tudo que resta a fazer agora é:</p>\n<ol class=\"arabic simple\">\n<li><p>Update the <code class=\"docutils literal notranslate\"><span class=\"pre\">VERSION</span></code> tuple in <code class=\"docutils literal notranslate\"><span class=\"pre\">django/__init__.py</span></code> again,\nincrementing to whatever the next expected release will be. For\nexample, after releasing 4.1.1, update <code class=\"docutils literal notranslate\"><span class=\"pre\">VERSION</span></code> to\n<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>Add the release in <a class=\"reference external\" href=\"https://code.djangoproject.com/admin/ticket/versions\">Trac’s versions list</a> if necessary (and make it the\ndefault by changing the <code class=\"docutils literal notranslate\"><span class=\"pre\">default_version</span></code> setting in the\ncode.djangoproject.com’s <a class=\"reference external\" href=\"https://github.com/django/code.djangoproject.com/blob/main/trac-env/conf/trac.ini\">trac.ini</a>, if it’s a final release). The new X.Y\nversion should be added after the alpha release and the default version\nshould be updated after “dot zero” release.</p>\n</li>\n<li><p>If it’s a final release, update the current stable branch and remove the\npre-release branch in the <a class=\"reference external\" href=\"https://code.djangoproject.com/#Djangoreleaseprocess\">Django release process</a> on Trac.</p></li>\n<li><p>Se essa for uma release de segurança, atualize <a class=\"reference internal\" href=\"/pt-br/4.2/releases/security/\"><span class=\"doc\">Archive of security issues</span></a> com detalhes dos problemas endereçados.</p></li>\n</ol>\n</section>\n<section id=\"new-stable-branch-tasks\">\n<h2>Tarefas para novas branches estáveis<a class=\"heading-anchor\" href=\"#new-stable-branch-tasks\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Existem várias coisas para fazer no momento posterior a criação de uma nova branch estável (geralmente após uma alpha release). Algumas dessas tarefas não precisam ser feitas pelo releaser.</p>\n<ol class=\"arabic simple\">\n<li><p>Crie um novo objeto <code class=\"docutils literal notranslate\"><span class=\"pre\">DocumentRelease</span></code> no banco de dados de <code class=\"docutils literal notranslate\"><span class=\"pre\">docs.djangoproject.com</span></code> para a nova versão da documentação, e atualize o JSON fixture <code class=\"docutils literal notranslate\"><span class=\"pre\">docs/fixtures/doc_releases.json</span></code>, para que pessoas sem acesso ao DB de produção possam ainda rodar uma cópia atualizada do site da documentação.</p></li>\n<li><p>Criar um esboço de uma nota de release para a nova versão. Use o esboço de versões de releases anteriores ou copie os conteúdos de versões prévias e exclua a maior parte do conteúdo deixando apenas os cabeçalhos.</p></li>\n<li><p>Increase the default PBKDF2 iterations in\n<code class=\"docutils literal notranslate\"><span class=\"pre\">django.contrib.auth.hashers.PBKDF2PasswordHasher</span></code> by about 20%\n(pick a round number). Run the tests, and update the 3 failing\nhasher tests with the new values. Make sure this gets noted in the\nrelease notes (see the 4.1 release notes for an example).</p></li>\n<li><p>Remova as funcionalidades que chegaram ao fim de seu clico de depreciação. Cada remoção deve ser feita em um commit separado para claridade. Na mensagem de commit, adiciona um “refs #XXXX” para o ticket original onde a depreciação começou se possível.</p></li>\n<li><p>Remove <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>, and <code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">deprecated::</span></code>\nannotations in the documentation from two releases ago. For example, in\nDjango 4.2, notes for 4.0 will be removed.</p></li>\n<li><p>Add the new branch to <a class=\"reference external\" href=\"https://readthedocs.org/projects/django/\">Read the Docs</a>. Since the automatically\ngenerated version names (“stable-A.B.x”) differ from the version names\nused in Read the Docs (“A.B.x”), <a class=\"reference external\" href=\"https://github.com/readthedocs/readthedocs.org/issues/5537\">create a ticket</a> requesting\nthe new version.</p></li>\n<li><p><a class=\"reference external\" href=\"https://github.com/pypa/trove-classifiers/issues/29\">Request the new classifier on PyPI</a>. For example\n<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>Considerações quanto a configuração da tupla VERSION<a class=\"heading-anchor\" href=\"#notes-on-setting-the-version-tuple\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>O reporte de versões do Django é controlado por uma tupla <code class=\"docutils literal notranslate\"><span class=\"pre\">VERSION</span></code> em <code class=\"docutils literal notranslate\"><span class=\"pre\">django/__init__.py</span></code>. Essa é uma tupla de cinco elementos, cujos elementos são:</p>\n<ol class=\"arabic simple\">\n<li><p>Versão principal.</p></li>\n<li><p>Versão secundária.</p></li>\n<li><p>Micro versão.</p></li>\n<li><p>Status – pode ser “alpha”, “beta”, “rc” ou “final”.</p></li>\n<li><p>Número das séries, para alpha/beta/RC packages que rodam em sequência (permitindo, por exemplo, “beta 1”, “beta 2”, etc.).</p></li>\n</ol>\n<p>Para uma release final, o status é sempre “final” e o número das séries é sempre 0. Um número de séries 0 com um status “alpha” será reportado como “pre-alpha”.</p>\n<p>Alguns exemplos:</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":"Visão Geral","anchor":"overview","children":[]},{"title":"Pré-requisitos","anchor":"prerequisites","children":[]},{"title":"Tarefas de pré-release","anchor":"pre-release-tasks","children":[]},{"title":"Preparando para a release","anchor":"preparing-for-release","children":[]},{"title":"Lançando a release","anchor":"actually-rolling-the-release","children":[]},{"title":"Fazendo a release (ou as releases) disponível ao público","anchor":"making-the-release-s-available-to-the-public","children":[]},{"title":"Pós-release","anchor":"post-release","children":[]},{"title":"Tarefas para novas branches estáveis","anchor":"new-stable-branch-tasks","children":[]},{"title":"Considerações quanto a configuração da tupla VERSION","anchor":"notes-on-setting-the-version-tuple","children":[]}],"breadcrumbs":[{"docname":"internals/index","title":"Funcionamento interno do Projeto Django","url":"/pt-br/4.2/internals/"}],"prev":{"docname":"internals/git","title":"O repositório de código-fonte do Django","url":"/pt-br/4.2/internals/git/"},"next":null,"formats":{"html":"/pt-br/4.2/internals/howto-release-django/","markdown":"/pt-br/4.2/internals/howto-release-django.md","json":"/pt-br/4.2/internals/howto-release-django.json"},"source":"https://github.com/django/django/blob/stable/4.2.x/docs/internals/howto-release-django.txt","official":"https://docs.djangoproject.com/pt-br/4.2/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"]}