# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2025, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # # Translators: # Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-01-03 14:53+0000\n" "PO-Revision-Date: 2025-07-18 19:57+0000\n" "Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Portuguese (Brazil) (https://app.transifex.com/python-doc/" "teams/5390/pt_BR/)\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % " "1000000 == 0 ? 1 : 2;\n" #: ../../c-api/stable.rst:7 msgid "C API Stability" msgstr "Estabilidade da API C" #: ../../c-api/stable.rst:9 msgid "" "Unless documented otherwise, Python's C API is covered by the Backwards " "Compatibility Policy, :pep:`387`. Most changes to it are source-compatible " "(typically by only adding new API). Changing existing API or removing API is " "only done after a deprecation period or to fix serious issues." msgstr "" "A menos que documentado de outra forma, a API C do Python é coberta pela " "Política de Compatibilidade com versões anteriores, :pep:`387`. A maioria " "das alterações são compatíveis com a fonte (normalmente adicionando apenas " "uma nova API). A alteração ou remoção da API existente só é feita após um " "período de descontinuação ou para corrigir problemas sérios." #: ../../c-api/stable.rst:15 msgid "" "CPython's Application Binary Interface (ABI) is forward- and backwards-" "compatible across a minor release (if these are compiled the same way; see :" "ref:`stable-abi-platform` below). So, code compiled for Python 3.10.0 will " "work on 3.10.8 and vice versa, but will need to be compiled separately for " "3.9.x and 3.11.x." msgstr "" "A Interface Binária de Aplicação (ABI) do CPython é compatível para frente e " "para trás através de uma versão menor (se elas forem compiladas da mesma " "maneira; veja :ref:`stable-abi-platform` abaixo). Portanto, o código " "compilado para Python 3.10.0 funcionará em 3.10.8 e vice-versa, mas " "precisará ser compilado separadamente para 3.9.x e 3.11.x." #: ../../c-api/stable.rst:21 msgid "There are two tiers of C API with different stability expectations:" msgstr "" "Existem dois níveis de API C com diferentes expectativas de estabilidade:" #: ../../c-api/stable.rst:23 msgid "" ":ref:`Unstable API `, may change in minor versions without a " "deprecation period. It is marked by the ``PyUnstable`` prefix in names." msgstr "" ":ref:`API Instável ` (\"Unstable API\"), pode mudar em " "versões menores sem período de depreciação. É marcado pelo prefixo " "``PyUnstable`` nos nomes." #: ../../c-api/stable.rst:25 msgid "" ":ref:`Limited API `, is compatible across several minor " "releases. When :c:macro:`Py_LIMITED_API` is defined, only this subset is " "exposed from ``Python.h``." msgstr "" ":ref:`API Limitada ` (\"Limited API\"), é compatível em " "várias versões menores. Quando :c:macro:`Py_LIMITED_API` é definido, apenas " "este subconjunto é exposto de ``Python.h``." #: ../../c-api/stable.rst:29 msgid "These are discussed in more detail below." msgstr "Elas são discutidas em mais detalhes abaixo." #: ../../c-api/stable.rst:31 msgid "" "Names prefixed by an underscore, such as ``_Py_InternalState``, are private " "API that can change without notice even in patch releases. If you need to " "use this API, consider reaching out to `CPython developers `_ to discuss adding public API for your use " "case." msgstr "" "Nomes prefixados por um sublinhado, como ``_Py_InternalState``, são APIs " "privadas que podem ser alteradas sem aviso prévio, mesmo em lançamentos de " "correção. Se você precisa usar essa API, considere entrar em contato com os " "`desenvolvedores do CPython `_ para discutir a adição de uma API pública para o seu caso de uso." #: ../../c-api/stable.rst:40 msgid "Unstable C API" msgstr "API C Instável" #: ../../c-api/stable.rst:44 msgid "" "Any API named with the ``PyUnstable`` prefix exposes CPython implementation " "details, and may change in every minor release (e.g. from 3.9 to 3.10) " "without any deprecation warnings. However, it will not change in a bugfix " "release (e.g. from 3.10.0 to 3.10.1)." msgstr "" "Qualquer API nomeada com o prefixo \"PyUnstable\" expõe detalhes de " "implementação do CPython e pode mudar em cada versão menor (por exemplo, de " "3.9 para 3.10) sem nenhum aviso de depreciação. No entanto, não mudará em " "uma versão de correção de bugs (por exemplo, de 3.10.0 para 3.10.1)." #: ../../c-api/stable.rst:49 msgid "" "It is generally intended for specialized, low-level tools like debuggers." msgstr "" "É geralmente destinado a ferramentas especializadas de baixo nível, como " "depuradores." #: ../../c-api/stable.rst:51 msgid "" "Projects that use this API are expected to follow CPython development and " "spend extra effort adjusting to changes." msgstr "" "Projetos que utilizam esta API são esperados para seguir o desenvolvimento " "do CPython e dedicar esforço extra para se ajustar às mudanças." #: ../../c-api/stable.rst:56 msgid "Stable Application Binary Interface" msgstr "Interface Binária de Aplicação Estável" #: ../../c-api/stable.rst:58 msgid "" "For simplicity, this document talks about *extensions*, but the Limited API " "and Stable ABI work the same way for all uses of the API – for example, " "embedding Python." msgstr "" "Para simplificar, este documento fala sobre *extensões*, mas a API Limitada " "e a ABI Estável funcionam da mesma maneira para todos os usos da API -- por " "exemplo, embutir o Python." #: ../../c-api/stable.rst:65 msgid "Limited C API" msgstr "API C Limitada" #: ../../c-api/stable.rst:67 msgid "" "Python 3.2 introduced the *Limited API*, a subset of Python's C API. " "Extensions that only use the Limited API can be compiled once and be loaded " "on multiple versions of Python. Contents of the Limited API are :ref:`listed " "below `." msgstr "" "Python 3.2 introduziu a *API Limitada*, um subconjunto da API C do Python. " "Extensões que apenas usam o Limited API podem ser compiladas uma vez e ser " "carregadas em várias versões do Python. Os conteúdos da API Limitada estão :" "ref:`listados abaixo `." #: ../../c-api/stable.rst:74 msgid "" "Define this macro before including ``Python.h`` to opt in to only use the " "Limited API, and to select the Limited API version." msgstr "" "Defina essa macro antes de incluir ``Python.h`` para optar por usar apenas a " "API Limitada e selecionar a versão da API Limitada." #: ../../c-api/stable.rst:77 msgid "" "Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX` " "corresponding to the lowest Python version your extension supports. The " "extension will be ABI-compatible with all Python 3 releases from the " "specified one onward, and can use Limited API introduced up to that version." msgstr "" "Defina ``Py_LIMITED_API`` com o valor de :c:macro:`PY_VERSION_HEX` " "correspondente à versão mais baixa do Python que sua extensão suporta. A " "extensão terá compatibilidade com a ABI de todas as versões do Python 3 a " "partir daquela especificada, e poderá usar a API Limitada introduzida até " "aquela versão." #: ../../c-api/stable.rst:83 msgid "" "Rather than using the ``PY_VERSION_HEX`` macro directly, hardcode a minimum " "minor version (e.g. ``0x030A0000`` for Python 3.10) for stability when " "compiling with future Python versions." msgstr "" "Em vez de usar diretamente a macro ``PY_VERSION_HEX``, codifique uma versão " "menor mínima (por exemplo, ``0x030A0000`` para o Python 3.10) para garantir " "estabilidade ao compilar com versões futuras do Python." #: ../../c-api/stable.rst:87 msgid "" "You can also define ``Py_LIMITED_API`` to ``3``. This works the same as " "``0x03020000`` (Python 3.2, the version that introduced Limited API)." msgstr "" "Você também pode definir ``Py_LIMITED_API`` como ``3``. Isso funciona da " "mesma forma que ``0x03020000`` (Python 3.2, a versão que introduziu a API " "Limitada)." #: ../../c-api/stable.rst:94 msgid "Stable ABI" msgstr "ABI Estável" #: ../../c-api/stable.rst:96 msgid "" "To enable this, Python provides a *Stable ABI*: a set of symbols that will " "remain ABI-compatible across Python 3.x versions." msgstr "" "Para habilitar isso, o Python fornece uma *ABI Estável*: um conjunto de " "símbolos que permanecerão compatíveis com ABI em todas as versões do Python " "3.x." #: ../../c-api/stable.rst:101 msgid "" "The Stable ABI prevents ABI issues, like linker errors due to missing " "symbols or data corruption due to changes in structure layouts or function " "signatures. However, other changes in Python can change the *behavior* of " "extensions. See Python's Backwards Compatibility Policy (:pep:`387`) for " "details." msgstr "" "O ABI Estável previne problemas de ABI, como erros de ligador devido a " "símbolos ausentes ou corrupção de dados devido a alterações em layouts de " "estrutura ou assinaturas de função. No entanto, outras alterações no Python " "podem alterar o *comportamento* das extensões. Veja a Política de " "Retrocompatibilidade do Python (:pep:`387`) para detalhes." #: ../../c-api/stable.rst:107 msgid "" "The Stable ABI contains symbols exposed in the :ref:`Limited API `, but also other ones – for example, functions necessary to support " "older versions of the Limited API." msgstr "" "A ABI Estável contém símbolos expostos na :ref:`API Limitada `, mas também outros -- por exemplo, funções necessárias para suportar " "versões mais antigas da API Limitada." #: ../../c-api/stable.rst:111 msgid "" "On Windows, extensions that use the Stable ABI should be linked against " "``python3.dll`` rather than a version-specific library such as ``python39." "dll``." msgstr "" "No Windows, as extensões que usam a ABI Estável devem ser vinculadas a " "``python3.dll`` em vez de uma biblioteca específica de versão, como " "``python39.dll``." #: ../../c-api/stable.rst:115 msgid "" "On some platforms, Python will look for and load shared library files named " "with the ``abi3`` tag (e.g. ``mymodule.abi3.so``). It does not check if such " "extensions conform to a Stable ABI. The user (or their packaging tools) need " "to ensure that, for example, extensions built with the 3.10+ Limited API are " "not installed for lower versions of Python." msgstr "" "Em algumas plataformas, o Python procurará e carregará arquivos de " "biblioteca compartilhada com o nome marcado como ``abi3`` (por exemplo, " "``meumódulo.abi3.so``). Ele não verifica se essas extensões estão em " "conformidade com uma ABI Estável. O usuário (ou suas ferramentas de " "empacotamento) precisa garantir que, por exemplo, as extensões construídas " "com a API Limitada 3.10+ não sejam instaladas em versões mais baixas do " "Python." #: ../../c-api/stable.rst:122 msgid "" "All functions in the Stable ABI are present as functions in Python's shared " "library, not solely as macros. This makes them usable from languages that " "don't use the C preprocessor." msgstr "" "Todas as funções na ABI estável estão presentes como funções na biblioteca " "compartilhada do Python, não apenas como macros. Isso as torna utilizáveis " "em linguagens que não utilizam o pré-processador C." #: ../../c-api/stable.rst:128 msgid "Limited API Scope and Performance" msgstr "Escopo e Desempenho da API Limitada" #: ../../c-api/stable.rst:130 msgid "" "The goal for the Limited API is to allow everything that is possible with " "the full C API, but possibly with a performance penalty." msgstr "" "O objetivo da API Limitada é permitir tudo o que é possível com a API C " "completa, mas possivelmente com uma penalidade de desempenho." #: ../../c-api/stable.rst:133 msgid "" "For example, while :c:func:`PyList_GetItem` is available, its “unsafe” macro " "variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster because it " "can rely on version-specific implementation details of the list object." msgstr "" "Por exemplo, enquanto :c:func:`PyList_GetItem` está disponível, sua variante " "de macro \"insegura\" :c:func:`PyList_GET_ITEM` não está. A macro pode ser " "mais rápida porque pode depender de detalhes de implementação específicos da " "versão do objeto da lista." #: ../../c-api/stable.rst:138 msgid "" "Without ``Py_LIMITED_API`` defined, some C API functions are inlined or " "replaced by macros. Defining ``Py_LIMITED_API`` disables this inlining, " "allowing stability as Python's data structures are improved, but possibly " "reducing performance." msgstr "" "Sem a definição de ``Py_LIMITED_API``, algumas funções da API C são " "colocadas \"inline\" ou substituídas por macros. Definir ``Py_LIMITED_API`` " "desativa esse inline, permitindo estabilidade à medida que as estruturas de " "dados do Python são aprimoradas, mas possivelmente reduzindo o desempenho." #: ../../c-api/stable.rst:143 msgid "" "By leaving out the ``Py_LIMITED_API`` definition, it is possible to compile " "a Limited API extension with a version-specific ABI. This can improve " "performance for that Python version, but will limit compatibility. Compiling " "with ``Py_LIMITED_API`` will then yield an extension that can be distributed " "where a version-specific one is not available – for example, for prereleases " "of an upcoming Python version." msgstr "" "Ao deixar de fora a definição ``Py_LIMITED_API``, é possível compilar uma " "extensão da API Limitada com uma ABI específica da versão. Isso pode " "melhorar o desempenho para essa versão do Python, mas limitará a " "compatibilidade. Compilar com ``Py_LIMITED_API`` vai produzir uma extensão " "que pode ser distribuída quando uma específica da versão não estiver " "disponível -- por exemplo, para pré-lançamentos de uma próxima versão do " "Python." #: ../../c-api/stable.rst:152 msgid "Limited API Caveats" msgstr "Limitações da API Limitada" #: ../../c-api/stable.rst:154 msgid "" "Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee " "that code conforms to the :ref:`Limited API ` or the :ref:" "`Stable ABI `. ``Py_LIMITED_API`` only covers definitions, but " "an API also includes other issues, such as expected semantics." msgstr "" "Observe que compilar com ``Py_LIMITED_API`` *não* é uma garantia completa de " "que o código esteja em conformidade com a :ref:`API Limitada ` ou com a :ref:`ABI Estável `. ``Py_LIMITED_API`` abrange " "apenas definições, mas uma API também inclui outras questões, como semântica " "esperada." #: ../../c-api/stable.rst:159 msgid "" "One issue that ``Py_LIMITED_API`` does not guard against is calling a " "function with arguments that are invalid in a lower Python version. For " "example, consider a function that starts accepting ``NULL`` for an argument. " "In Python 3.9, ``NULL`` now selects a default behavior, but in Python 3.8, " "the argument will be used directly, causing a ``NULL`` dereference and " "crash. A similar argument works for fields of structs." msgstr "" "Uma questão que ``Py_LIMITED_API`` não protege é a chamada de uma função com " "argumentos inválidos em uma versão inferior do Python. Por exemplo, " "considere uma função que começa a aceitar ``NULL`` como argumento. No Python " "3.9, ``NULL`` agora seleciona um comportamento padrão, mas no Python 3.8, o " "argumento será usado diretamente, causando uma referência ``NULL`` e uma " "falha. Um argumento similar funciona para campos de estruturas." #: ../../c-api/stable.rst:166 msgid "" "Another issue is that some struct fields are currently not hidden when " "``Py_LIMITED_API`` is defined, even though they're part of the Limited API." msgstr "" "Outra questão é que alguns campos de estrutura não estão atualmente ocultos " "quando ``Py_LIMITED_API`` é definido, mesmo que eles façam parte da API " "Limitada." #: ../../c-api/stable.rst:169 msgid "" "For these reasons, we recommend testing an extension with *all* minor Python " "versions it supports, and preferably to build with the *lowest* such version." msgstr "" "Por esses motivos, recomendamos testar uma extensão com *todas* as versões " "menores do Python que ela oferece suporte e, preferencialmente, construir " "com a versão *mais baixa* dessas." #: ../../c-api/stable.rst:172 msgid "" "We also recommend reviewing documentation of all used API to check if it is " "explicitly part of the Limited API. Even with ``Py_LIMITED_API`` defined, a " "few private declarations are exposed for technical reasons (or even " "unintentionally, as bugs)." msgstr "" "Também recomendamos revisar a documentação de todas as APIs utilizadas para " "verificar se ela faz parte explicitamente da API Limitada. Mesmo com a " "definição de ``Py_LIMITED_API``, algumas declarações privadas são expostas " "por razões técnicas (ou até mesmo acidentalmente, como bugs)." #: ../../c-api/stable.rst:177 msgid "" "Also note that the Limited API is not necessarily stable: compiling with " "``Py_LIMITED_API`` with Python 3.8 means that the extension will run with " "Python 3.12, but it will not necessarily *compile* with Python 3.12. In " "particular, parts of the Limited API may be deprecated and removed, provided " "that the Stable ABI stays stable." msgstr "" "Também observe que a API Limitada não é necessariamente estável: compilar " "com ``Py_LIMITED_API`` com Python 3.8 significa que a extensão será " "executada com Python 3.12, mas não necessariamente será *compilada* com " "Python 3.12. Em particular, partes da API Limitada podem ser descontinuadas " "e removidas, desde que a ABI Estável permaneça estável." #: ../../c-api/stable.rst:187 msgid "Platform Considerations" msgstr "Considerações da plataforma" #: ../../c-api/stable.rst:189 msgid "" "ABI stability depends not only on Python, but also on the compiler used, " "lower-level libraries and compiler options. For the purposes of the :ref:" "`Stable ABI `, these details define a “platform”. They usually " "depend on the OS type and processor architecture" msgstr "" "A estabilidade da ABI depende não apenas do Python, mas também do compilador " "utilizado, das bibliotecas de nível inferior e das opções do compilador. " "Para os fins da :ref:`ABI Estável`, esses detalhes definem uma " "\"plataforma\". Geralmente, eles dependem do tipo de sistema operacional e " "da arquitetura do processador." #: ../../c-api/stable.rst:194 msgid "" "It is the responsibility of each particular distributor of Python to ensure " "that all Python versions on a particular platform are built in a way that " "does not break the Stable ABI. This is the case with Windows and macOS " "releases from ``python.org`` and many third-party distributors." msgstr "" "É responsabilidade de cada distribuidor particular do Python garantir que " "todas as versões do Python em uma plataforma específica sejam construídas de " "forma a não quebrar a ABI estável. Isso é válido para as versões do Windows " "e macOS disponibilizadas pela ``python.org`` e por muitos distribuidores " "terceiros." #: ../../c-api/stable.rst:204 msgid "Contents of Limited API" msgstr "Conteúdo da API Limitada" #: ../../c-api/stable.rst:207 msgid "" "Currently, the :ref:`Limited API ` includes the following " "items:" msgstr "" "Atualmente, a :ref:`API Limitada ` inclui os seguintes itens:" #: ../../c-api/stable.rst:42 msgid "PyUnstable" msgstr "PyUnstable"