python-docs-fr/c-api/stable.po

306 lines
12 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Copyright (C) 2001-2018, Python Software Foundation
# For licence information, see README file.
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-09-23 16:16+0200\n"
"PO-Revision-Date: 2018-10-04 12:26+0200\n"
"Last-Translator: Julien Palard <julien@palard.fr>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: c-api/stable.rst:7
msgid "C API Stability"
msgstr ""
#: c-api/stable.rst:9
#, fuzzy
msgid ""
"Python's C API is covered by the Backwards Compatibility Policy, :pep:`387`. "
"While the C API will change with every minor release (e.g. from 3.9 to "
"3.10), most changes will be 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 ""
"L'API C de Python change à chaque version. La majorité de ces changement "
"n'affecte cependant pas la compatibilité du code source. Typiquement, des "
"API sont ajoutées, mais ni modifiées ni supprimées (bien que certaines "
"interfaces puissent être supprimées, après avoir d'abord été dépréciées)."
#: 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.10.x."
msgstr ""
#: c-api/stable.rst:21
msgid ""
"Names prefixed by an underscore, such as ``_Py_InternalState``, are private "
"API that can change without notice even in patch releases."
msgstr ""
#: c-api/stable.rst:26
msgid "Stable Application Binary Interface"
msgstr "ABI Stable"
#: c-api/stable.rst:28
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 work with "
"multiple versions of Python. Contents of the Limited API are :ref:`listed "
"below <stable-abi-list>`."
msgstr ""
#: c-api/stable.rst:33
msgid ""
"To enable this, Python provides a *Stable ABI*: a set of symbols that will "
"remain compatible across Python 3.x versions. The Stable ABI contains "
"symbols exposed in the Limited API, but also other ones for example, "
"functions necessary to support older versions of the Limited API."
msgstr ""
#: c-api/stable.rst:38
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 ""
#: c-api/stable.rst:44
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 ""
#: c-api/stable.rst:47
msgid ""
"Define ``Py_LIMITED_API`` to the value of :c:data:`PY_VERSION_HEX` "
"corresponding to the lowest Python version your extension supports. The "
"extension will work without recompilation with all Python 3 releases from "
"the specified one onward, and can use Limited API introduced up to that "
"version."
msgstr ""
#: c-api/stable.rst:53
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 ""
#: c-api/stable.rst:57
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 ""
#: c-api/stable.rst:60
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 ""
#: c-api/stable.rst:64
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 ""
#: c-api/stable.rst:71
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 ""
#: c-api/stable.rst:77
msgid "Limited API Scope and Performance"
msgstr ""
#: c-api/stable.rst:79
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 ""
#: c-api/stable.rst:82
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 ""
#: c-api/stable.rst:87
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 ""
#: c-api/stable.rst:92
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 ""
#: c-api/stable.rst:101
msgid "Limited API Caveats"
msgstr ""
#: c-api/stable.rst:103
msgid ""
"Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee "
"that code conforms to the Limited API or the Stable ABI. ``Py_LIMITED_API`` "
"only covers definitions, but an API also includes other issues, such as "
"expected semantics."
msgstr ""
#: c-api/stable.rst:108
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 ""
#: c-api/stable.rst:115
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 ""
#: c-api/stable.rst:118
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 ""
#: c-api/stable.rst:121
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 ""
#: c-api/stable.rst:126
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 ""
#: c-api/stable.rst:136
msgid "Platform Considerations"
msgstr ""
#: c-api/stable.rst:138
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 Stable "
"ABI, these details define a “platform”. They usually depend on the OS type "
"and processor architecture"
msgstr ""
#: c-api/stable.rst:143
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 ""
#: c-api/stable.rst:153
msgid "Contents of Limited API"
msgstr ""
#: c-api/stable.rst:156
msgid "Currently, the Limited API includes the following items:"
msgstr ""
#~ msgid ""
#~ "Unfortunately, the API compatibility does not extend to binary "
#~ "compatibility (the ABI). The reason is primarily the evolution of struct "
#~ "definitions, where addition of a new field, or changing the type of a "
#~ "field, might not break the API, but can break the ABI. As a consequence, "
#~ "extension modules need to be recompiled for every Python release "
#~ "(although an exception is possible on Unix when none of the affected "
#~ "interfaces are used). In addition, on Windows, extension modules link "
#~ "with a specific pythonXY.dll and need to be recompiled to link with a "
#~ "newer one."
#~ msgstr ""
#~ "Malheureusement, la compatibilité de l'API ne s'étend pas à une "
#~ "compatibilité binaire (l'ABI). L'évolution des structures en est la "
#~ "raison principale : l'ajout de nouveaux attributs, ou le changement du "
#~ "type d'un attribut peut ne pas casser l'API mais casser l'ABI. Par "
#~ "conséquent, les modules d'extension doivent être recompilés à chaque "
#~ "nouvelle version de Python (ce n'est exceptionnellement pas nécessaire "
#~ "sur Unix, si aucune des interfaces modifiées n'est utilisée). De plus, "
#~ "sous Windows, les modules d'extension sont liés à un *pythonXY.dll* "
#~ "spécifique, ils est donc nécessaire de les recompiler pour les lier au "
#~ "nouveau DLL."
#~ msgid ""
#~ "Since Python 3.2, a subset of the API has been declared to guarantee a "
#~ "stable ABI. Extension modules wishing to use this API (called \"limited "
#~ "API\") need to define ``Py_LIMITED_API``. A number of interpreter details "
#~ "then become hidden from the extension module; in return, a module is "
#~ "built that works on any 3.x version (x>=2) without recompilation."
#~ msgstr ""
#~ "Depuis Python 3.2 il est garanti qu'une certaine partie de l'API gardera "
#~ "une ABI stable. Les modules d'extension souhaitant utiliser cette API "
#~ "(Appellée \"API limitée\") doivent définir ``Py_LIMITED_API``. Des "
#~ "spécificités de l'interpréteur sont alors cachées au module, en "
#~ "contrepartie le module devient compatible avec toutes les versions de "
#~ "Python 3.x (x>=2) sans recompilation."
#~ msgid ""
#~ "In some cases, the stable ABI needs to be extended with new functions. "
#~ "Extension modules wishing to use these new APIs need to set "
#~ "``Py_LIMITED_API`` to the ``PY_VERSION_HEX`` value (see :ref:"
#~ "`apiabiversion`) of the minimum Python version they want to support (e.g. "
#~ "``0x03030000`` for Python 3.3). Such modules will work on all subsequent "
#~ "Python releases, but fail to load (because of missing symbols) on the "
#~ "older releases."
#~ msgstr ""
#~ "Dans certains cas, il est nécessaire d'étendre l'ABI stable avec de "
#~ "nouvelles fonctions. Les modules d'extension souhaitant utiliser ces "
#~ "nouvelles APIs doivent configurer ``Py_LIMITED_API`` à la valeur "
#~ "``Py_VERSION_HEX`` correspondant à la plus ancienne version de Python "
#~ "qu'ils souhaitent supporter (voir :ref:`apiabiversion`, par exemple "
#~ "``0x03030000`` pour Python 3.3). De tels modules fonctionneront dans "
#~ "toutes les versions ultérieures de Python, mais ne pourront pas se "
#~ "charger (dû à des symboles manquants) sur les versions plus anciennes."
#~ msgid ""
#~ "As of Python 3.2, the set of functions available to the limited API is "
#~ "documented in :pep:`384`. In the C API documentation, API elements that "
#~ "are not part of the limited API are marked as \"Not part of the limited "
#~ "API.\""
#~ msgstr ""
#~ "Depuis Python 3.2, l'ensemble des fonctions exposées par l'API limitée "
#~ "est documentée dans la :pep:`384`. Dans la documentation de l'API C, les "
#~ "éléments ne faisant pas partie de l'API limitée sont notés \"Ne faisant "
#~ "pas partie de l'API limitée\" (*\"Not part of the limited API\"*)."