{"title":"Como o Django é formado?","version":"4.0","locale":"pt-br","docname":"internals/howto-release-django","url":"/pt-br/4.0/internals/howto-release-django/","canonical":"https://djangodocs.dev/pt-br/4.0/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>Releases de segurança: divulgação e correção de uma vulnerabilidade. Isto provavelmente irá envolver duas ou três release simultâneas – ex. 1.5.x, 1.6.x, e, dependendo do momento, talvez 1.7 alpha/beta/rc.</p></li>\n<li><p>Releases de versões regulares: tanto uma release final (ex. 1.5) ou uma atualização de correção de bugs (ex. 1.5.1).</p></li>\n<li><p>Pre-release: ex. 1.6 alpha, beta, ou 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>A instalação de alguns pacotes requeridos pelo Python:</p>\n<div class=\"code-block\" data-language=\"console\"><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=\"gp\">$ </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>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.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>À 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.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>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>Se essa é uma feature release, garanta que as traduções do Transifex foram integradas. Isso é tipicamente realizado por um gerente de tradução separado ao invés do releaser, mas aqui vão os passos. Supondo que você tenha uma conta no Transifex:</p>\n<div class=\"code-block\" data-language=\"console\"><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=\"gp\">$ </span>python<span class=\"w\"> </span>scripts/manage_translations.py<span class=\"w\"> </span>fetch\n</code></pre></div>\n<p>e então faça commit da mudança/arquivos adicionados (.po e .mo). Algumas vezes existem validações de errros que precisam ser depurados, então evite fazer essa tarefa imediatamente antes de uma release ser necessária.</p>\n</li>\n<li><p><a class=\"reference internal\" href=\"/pt-br/4.0/internals/contributing/writing-documentation/#django-admin-manpage\"><span class=\"std std-ref\">Atualize a página de manual do django-admin</span></a>:</p>\n<div class=\"code-block\" data-language=\"console\"><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=\"gp\">$ </span><span class=\"nb\">cd</span><span class=\"w\"> </span>docs\n<span class=\"gp\">$ </span>make<span class=\"w\"> </span>man\n<span class=\"gp\">$ </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=\"gp\">$ </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 3.1:</p>\n<div class=\"code-block\" data-language=\"console\"><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=\"gp\">$ </span>git<span class=\"w\"> </span>checkout<span class=\"w\"> </span>-b<span class=\"w\"> </span>stable/3.1.x<span class=\"w\"> </span>origin/main\n<span class=\"gp\">$ </span>git<span class=\"w\"> </span>push<span class=\"w\"> </span>origin<span class=\"w\"> </span>-u<span class=\"w\"> </span>stable/3.1.x:stable/3.1.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 2.2:</p>\n<div class=\"code-block\" data-language=\"console\"><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=\"gp\">$ </span>git<span class=\"w\"> </span>checkout<span class=\"w\"> </span>-b<span class=\"w\"> </span>stable/2.2.x<span class=\"w\"> </span>origin/stable/2.1.x\n<span class=\"gp\">$ </span>git<span class=\"w\"> </span>push<span class=\"w\"> </span>origin<span class=\"w\"> </span>stable/2.2.x:stable/2.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 href=\"#id9\"><span class=\"problematic\" id=\"id10\">`example security release announcement`__</span></a>, <a href=\"#id9\"><span class=\"problematic\" id=\"id11\">`example regular release announcement`__</span></a>, <a href=\"#id9\"><span class=\"problematic\" id=\"id12\">`example pre-release announcement`__</span></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 href=\"#id9\"><span class=\"problematic\" id=\"id13\">`Jenkins`__</span></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>Uma release sempre começa de uma branch de release, então você terá que se certificar que você está em uma branch estável e atualizada. Por exemplo:</p>\n<div class=\"code-block\" data-language=\"console\"><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=\"gp\">$ </span>git<span class=\"w\"> </span>checkout<span class=\"w\"> </span>stable/1.5.x\n<span class=\"gp\">$ </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=\"console\"><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=\"gp\">$ </span>git<span class=\"w\"> </span>checkout<span class=\"w\"> </span>stable/1.5.x\n<span class=\"gp\">$ </span>git<span class=\"w\"> </span>merge<span class=\"w\"> </span>--ff-only<span class=\"w\"> </span>security/1.5.x\n</code></pre></div>\n<p>(This assumes <code class=\"docutils literal notranslate\"><span class=\"pre\">security/1.5.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 1.5\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/1.5.x;</span> <span class=\"pre\">git</span> <span class=\"pre\">rebase</span> <span class=\"pre\">stable/1.5.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>Para uma feature release, remova o cabeçalho <code class=\"docutils literal notranslate\"><span class=\"pre\">UNDER</span> <span class=\"pre\">DEVELOPMENT</span></code> no topo das notas da release e adicione a data da release na próxima linha. Para uma patch release, troque <code class=\"docutils literal notranslate\"><span class=\"pre\">*Under</span> <span class=\"pre\">Development*</span></code>, com a data da release. Faça essa mudança em todas as branches em que as notas de release para uma versão em particular estiverem localizadas.</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></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>Faça uma tag da release usando <code class=\"docutils literal notranslate\"><span class=\"pre\">git</span> <span class=\"pre\">tag</span></code>. Por exemplo:</p>\n<div class=\"code-block\" data-language=\"console\"><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=\"gp\">$ </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 1.5.1&quot;</span><span class=\"w\"> </span><span class=\"m\">1</span>.5.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>Rodar <code class=\"docutils literal notranslate\"><span class=\"pre\">make</span> <span class=\"pre\">-f</span> <span class=\"pre\">extras/Makefile</span></code> para gerar os pacotes da release. Isso criará os pacotes da release no diretório <code class=\"docutils literal notranslate\"><span class=\"pre\">dist/</span></code>;</p></li>\n<li><p>Gere os hashes dos pacotes da release:</p>\n<div class=\"code-block\" data-language=\"console\"><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=\"gp\">$ </span><span class=\"nb\">cd</span><span class=\"w\"> </span>dist\n<span class=\"gp\">$ </span>md5sum<span class=\"w\"> </span>*\n<span class=\"gp\">$ </span>sha1sum<span class=\"w\"> </span>*\n<span class=\"gp\">$ </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;RELEASE TAR.GZ FILENAME&gt;&gt;\nhttps://www.djangoproject.com/m/releases/&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>Faça upload do pacote (ou pacotes) da release para o servidor do djangoproject, trocando A.B. com o número de versão apropriado, ex. 1.5 para a release 1.5.x:</p>\n<div class=\"code-block\" data-language=\"console\"><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=\"gp\">$ </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>Atualize o(s) arquivo(s)  de checksum:</p>\n<div class=\"code-block\" data-language=\"console\"><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=\"gp\">$ </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\">easy_install</span></code>\nand <code class=\"docutils literal notranslate\"><span class=\"pre\">pip</span></code>. Here’s one method:</p>\n<div class=\"code-block\" data-language=\"console\"><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=\"gp\">$ </span><span class=\"nv\">RELEASE_VERSION</span><span class=\"o\">=</span><span class=\"s1\">&#39;1.7.2&#39;</span>\n<span class=\"gp\">$ </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=\"gp\">$ </span>python<span class=\"w\"> </span>-m<span class=\"w\"> </span>venv<span class=\"w\"> </span>django-easy-install\n<span class=\"gp\">$ </span>.<span class=\"w\"> </span>django-easy-install/bin/activate\n<span class=\"gp\">$ </span>easy_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=\"gp\">$ </span>deactivate\n<span class=\"gp\">$ </span>python<span class=\"w\"> </span>-m<span class=\"w\"> </span>venv<span class=\"w\"> </span>django-pip\n<span class=\"gp\">$ </span>.<span class=\"w\"> </span>django-pip/bin/activate\n<span class=\"gp\">$ </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=\"gp\">$ </span>deactivate\n<span class=\"gp\">$ </span>python<span class=\"w\"> </span>-m<span class=\"w\"> </span>venv<span class=\"w\"> </span>django-pip-wheel\n<span class=\"gp\">$ </span>.<span class=\"w\"> </span>django-pip-wheel/bin/activate\n<span class=\"gp\">$ </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=\"gp\">$ </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>Ask a few people on IRC to verify the checksums by visiting the checksums\nfile (e.g. <a class=\"reference external\" href=\"https://media.djangoproject.com/pgp/Django-1.5b1.checksum.txt\">https://media.djangoproject.com/pgp/Django-1.5b1.checksum.txt</a>)\nand following the instructions in it. For bonus points, they can also unpack\nthe downloaded release tarball and verify that its contents appear to be\ncorrect (proper version numbers, no stray <code class=\"docutils literal notranslate\"><span class=\"pre\">.pyc</span></code> or other undesirable\nfiles).</p></li>\n<li><p>Faça o upload dos pacotes da release para o PyPI (para pre-release, somente atualize o arquivo wheel):</p>\n<div class=\"code-block\" data-language=\"console\"><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=\"gp\">$ </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>Vá para ` a página Add release no admin`__, entre com o número da nova release exatamente como ele aparece no nome da tarball (Django-&lt;version&gt;.tar.gz). Então entre com “1.5.1” ou “1.4c2”, etc. Se a release é parte de uma branch LTS, marque ele como tal.</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\">3.1a1</span></code>, also create <code class=\"docutils literal notranslate\"><span class=\"pre\">3.1</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>Para uma nova versão de release (ex. 1.5, 1.6), atualize a versão estável padrão da documentação alterando a flag <code class=\"docutils literal notranslate\"><span class=\"pre\">is_default</span></code>  para <code class=\"docutils literal notranslate\"><span class=\"pre\">True</span></code> no objeto <code class=\"docutils literal notranslate\"><span class=\"pre\">DocumentRelease</span></code> apropriado no banco de dados de <code class=\"docutils literal notranslate\"><span class=\"pre\">docs.djangoproject.com</span></code> (isso irá alterar automaticamente ela para <code class=\"docutils literal notranslate\"><span class=\"pre\">False</span></code> para todos os outros); você pode fazer isso usando o site do 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 href=\"#id9\"><span class=\"problematic\" id=\"id14\">`robots.docs.txt`__</span></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 2.2:</p>\n<div class=\"code-block\" data-language=\"console\"><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=\"gp\">$ </span>git<span class=\"w\"> </span>checkout<span class=\"w\"> </span>stable/2.2.x\n<span class=\"gp\">$ </span>git<span class=\"w\"> </span>pull\n<span class=\"gp\">$ </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.0/internals/mailing-lists/#django-announce-mailing-list\"><span class=\"std std-ref\">django-announce</span></a>, <a class=\"reference internal\" href=\"/pt-br/4.0/internals/mailing-lists/#django-developers-mailing-list\"><span class=\"std std-ref\">django-developers</span></a>,\nand <a class=\"reference internal\" href=\"/pt-br/4.0/internals/mailing-lists/#django-users-mailing-list\"><span class=\"std std-ref\">django-users</span></a> mailing lists. This should include a link to the\nannouncement 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>Atualizar a 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> novamente, incrementando ela para qualquer que seja a próxima release. Por exemplo, depois de soltar a release 1.5.1, atualize <code class=\"docutils literal notranslate\"><span class=\"pre\">VERSION</span></code> para <code class=\"docutils literal notranslate\"><span class=\"pre\">VERSION</span> <span class=\"pre\">=</span> <span class=\"pre\">(1,</span> <span class=\"pre\">5,</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 href=\"#id9\"><span class=\"problematic\" id=\"id15\">`trac.ini`__</span></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>Se essa for uma release de segurança, atualize <a class=\"reference internal\" href=\"/pt-br/4.0/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>Aumente as iterações PBKDF2 padrão em <code class=\"docutils literal notranslate\"><span class=\"pre\">django.contrib.auth.hashers.PBKDF2PasswordHasher</span></code> por cerca de 20% (escolha um número redondo). Rode os testes, e atualize os 3 testes falhos de hashers com os novos valores. Certifique-se de que isso seja registrado nas notas de release (veja as notas da release 1.8 para um exemplo).</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>Remova as anotações <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>, e <code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">deprecated::</span></code>  na documentação das duas releases anteriores. Por exemplo, no Django 1.9, notas para a 1.7 serão removidas.</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</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\">(1,</span> <span class=\"pre\">2,</span> <span class=\"pre\">1,</span> <span class=\"pre\">'final',</span> <span class=\"pre\">0)</span></code> → “1.2.1”</p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">(1,</span> <span class=\"pre\">3,</span> <span class=\"pre\">0,</span> <span class=\"pre\">'alpha',</span> <span class=\"pre\">0)</span></code> → “1.3 pre-alpha”</p></li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">(1,</span> <span class=\"pre\">3,</span> <span class=\"pre\">0,</span> <span class=\"pre\">'beta',</span> <span class=\"pre\">2)</span></code> → “1.3 beta 2”</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.0/internals/"}],"prev":{"docname":"internals/git","title":"O repositório de código-fonte do Django","url":"/pt-br/4.0/internals/git/"},"next":null,"formats":{"html":"/pt-br/4.0/internals/howto-release-django/","markdown":"/pt-br/4.0/internals/howto-release-django.md","json":"/pt-br/4.0/internals/howto-release-django.json"},"source":"https://github.com/django/django/blob/stable/4.0.x/docs/internals/howto-release-django.txt","official":"https://docs.djangoproject.com/pt-br/4.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"]}