python-docs-fr/library/asyncio-future.po

391 lines
15 KiB
Plaintext
Raw Normal View History

2018-10-13 15:54:03 +00:00
# Copyright (C) 2001-2018, Python Software Foundation
2018-11-29 20:30:02 +00:00
# For licence information, see README file.
2018-10-13 15:54:03 +00:00
#
msgid ""
msgstr ""
2019-12-05 22:15:54 +00:00
"Project-Id-Version: Python 3\n"
2018-10-13 15:54:03 +00:00
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-11-15 18:54+0100\n"
2018-10-13 15:54:03 +00:00
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
2018-11-29 20:30:02 +00:00
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
"Language: fr\n"
2018-10-13 15:54:03 +00:00
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../Doc/library/asyncio-future.rst:8
msgid "Futures"
2019-05-28 12:44:15 +00:00
msgstr "Futurs"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:10
msgid ""
"**Source code:** :source:`Lib/asyncio/futures.py`, :source:`Lib/asyncio/"
"base_futures.py`"
msgstr ""
2023-03-23 08:50:17 +00:00
"**Code source :** :source:`Lib/asyncio/futures.py`, :source:`Lib/asyncio/"
"base_futures.py`"
#: ../Doc/library/asyncio-future.rst:15
msgid ""
2018-10-13 15:54:03 +00:00
"*Future* objects are used to bridge **low-level callback-based code** with "
"high-level async/await code."
msgstr ""
2023-03-23 08:50:17 +00:00
"Les objets *Future* sont utilisés comme passerelles entre du **code bas "
"niveau basé sur des fonctions de rappel** et du code haut niveau utilisant "
"*async* et *await*."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:20
2018-10-13 15:54:03 +00:00
msgid "Future Functions"
2023-03-23 08:50:17 +00:00
msgstr "Fonctions pour *Future*"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:24
2018-10-13 15:54:03 +00:00
msgid "Return ``True`` if *obj* is either of:"
2023-03-23 08:50:17 +00:00
msgstr "Renvoie ``True`` si *obj* est soit :"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:26
2018-10-13 15:54:03 +00:00
msgid "an instance of :class:`asyncio.Future`,"
2023-03-23 08:50:17 +00:00
msgstr "une instance de :class:`asyncio.Future` ;"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:27
2018-10-13 15:54:03 +00:00
msgid "an instance of :class:`asyncio.Task`,"
2023-03-23 08:50:17 +00:00
msgstr "une instance de :class:`asyncio.Task` ;"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:28
2018-10-13 15:54:03 +00:00
msgid "a Future-like object with a ``_asyncio_future_blocking`` attribute."
msgstr ""
2023-03-23 08:50:17 +00:00
"un objet se comportant comme *Future* et possédant un attribut "
"``_asyncio_future_blocking``."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:36
2018-10-13 15:54:03 +00:00
msgid "Return:"
2023-03-23 08:50:17 +00:00
msgstr "Renvoie :"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:38
2018-10-13 15:54:03 +00:00
msgid ""
"*obj* argument as is, if *obj* is a :class:`Future`, a :class:`Task`, or a "
"Future-like object (:func:`isfuture` is used for the test.)"
msgstr ""
2023-03-23 08:50:17 +00:00
"l'objet *obj* tel quel si c'est un objet :class:`Future`, :class:`Task` ou "
"se comportant comme un *Future*. :func:`isfuture` est utilisée pour le test ;"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:42
2018-10-13 15:54:03 +00:00
msgid ""
"a :class:`Task` object wrapping *obj*, if *obj* is a coroutine (:func:"
2019-09-04 09:35:23 +00:00
"`iscoroutine` is used for the test); in this case the coroutine will be "
"scheduled by ``ensure_future()``."
2018-10-13 15:54:03 +00:00
msgstr ""
2023-03-23 08:50:17 +00:00
"un objet :class:`Task` encapsulant *obj* si ce dernier est une coroutine (:"
"func:`iscoroutine` est utilisée pour le test). Dans ce cas, lexécution de "
"la coroutine sera planifiée par ``ensure_future()`` ;"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:47
2018-10-13 15:54:03 +00:00
msgid ""
"a :class:`Task` object that would await on *obj*, if *obj* is an awaitable (:"
"func:`inspect.isawaitable` is used for the test.)"
msgstr ""
2023-03-23 08:50:17 +00:00
"un objet :class:`Task` qui attendra (*await*) *obj* si ce dernier peut être "
"attendu (*awaitable*). :func:`iscoroutine` est utilisée pour le test."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:50
2018-10-13 15:54:03 +00:00
msgid "If *obj* is neither of the above a :exc:`TypeError` is raised."
msgstr ""
2023-03-23 08:50:17 +00:00
"Si *obj* ne correspond à aucun des critères ci-dessus, une exception :exc:"
"`TypeError` est levée."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:54
2018-10-13 15:54:03 +00:00
msgid ""
"See also the :func:`create_task` function which is the preferred way for "
"creating new Tasks."
msgstr ""
2023-03-23 08:50:17 +00:00
"Voir aussi la fonction :func:`create_task` qui est la manière privilégiée "
"pour créer des nouvelles tâches."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:57
2018-10-13 15:54:03 +00:00
msgid "The function accepts any :term:`awaitable` object."
msgstr "La fonction accepte n'importe quel objet :term:`awaitable`."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:63
2018-10-13 15:54:03 +00:00
msgid ""
"Wrap a :class:`concurrent.futures.Future` object in a :class:`asyncio."
"Future` object."
msgstr ""
2023-03-23 08:50:17 +00:00
"Encapsule un objet :class:`concurrent.futures.Future` dans un objet :class:"
"`asyncio.Future`."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:68
2018-10-13 15:54:03 +00:00
msgid "Future Object"
2023-03-23 08:50:17 +00:00
msgstr "Objet *Future*"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:72
2018-10-13 15:54:03 +00:00
msgid ""
"A Future represents an eventual result of an asynchronous operation. Not "
"thread-safe."
msgstr ""
2023-03-23 08:50:17 +00:00
"Un *Future* représente le résultat final d'une opération asynchrone. Il "
"n'est pas conçu pour pouvoir être utilisé par plusieurs fils d'exécution."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:75
2018-10-13 15:54:03 +00:00
msgid ""
"Future is an :term:`awaitable` object. Coroutines can await on Future "
"objects until they either have a result or an exception set, or until they "
"are cancelled."
msgstr ""
#: ../Doc/library/asyncio-future.rst:79
2018-10-13 15:54:03 +00:00
msgid ""
"Typically Futures are used to enable low-level callback-based code (e.g. in "
"protocols implemented using asyncio :ref:`transports <asyncio-transports-"
"protocols>`) to interoperate with high-level async/await code."
msgstr ""
2023-03-23 08:50:17 +00:00
"Les *Futures* sont habituellement utilisés pour permettre à du code bas "
"niveau basé sur des fonctions de rappel (par exemple : les protocoles "
"utilisant *asyncio* :ref:`transports <asyncio-transports-protocols>`) "
"d'interagir avec du code haut niveau utilisant *async* et *await*."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:84
2018-10-13 15:54:03 +00:00
msgid ""
"The rule of thumb is to never expose Future objects in user-facing APIs, and "
"the recommended way to create a Future object is to call :meth:`loop."
"create_future`. This way alternative event loop implementations can inject "
"their own optimized implementations of a Future object."
msgstr ""
2023-03-23 08:50:17 +00:00
"Une bonne règle empirique est de ne jamais exposer des objets *Future* dans "
"des *API* destinées à l'utilisateur. La façon privilégiée de créer des "
"objets *Future* est d'appeler la méthode :meth:`loop.create_future`. Cela "
"permet aux implémentations alternatives de la boucle d'évènements d'utiliser "
"leur propre implémentation de l'objet *Future*."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:90
2018-10-13 15:54:03 +00:00
msgid "Added support for the :mod:`contextvars` module."
2019-05-28 12:44:15 +00:00
msgstr "Ajout du support du module :mod:`contextvars`."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:95
2018-10-13 15:54:03 +00:00
msgid "Return the result of the Future."
2023-03-23 08:50:17 +00:00
msgstr "Renvoie le résultat du *Future*."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:97
2018-10-13 15:54:03 +00:00
msgid ""
"If the Future is *done* and has a result set by the :meth:`set_result` "
"method, the result value is returned."
msgstr ""
2023-03-23 08:50:17 +00:00
"Si le *Future* est « terminé » et a un résultat défini par la méthode :meth:"
"`set_result`, ce résultat est renvoyé."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:100
2018-10-13 15:54:03 +00:00
msgid ""
"If the Future is *done* and has an exception set by the :meth:"
"`set_exception` method, this method raises the exception."
msgstr ""
2023-03-23 08:50:17 +00:00
"Si le *Future* est « terminé » et a une exception définie par la méthode :"
"meth:`set_exception`, cette méthode lève l'exception."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:103 ../Doc/library/asyncio-future.rst:188
2018-10-13 15:54:03 +00:00
msgid ""
"If the Future has been *cancelled*, this method raises a :exc:"
"`CancelledError` exception."
msgstr ""
2023-03-23 08:50:17 +00:00
"Si le *Future* a été *annulé*, cette méthode lève une exception :exc:"
2020-02-14 10:18:53 +00:00
"`CancelledError`."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:106
2020-02-14 10:18:53 +00:00
#, fuzzy
2018-10-13 15:54:03 +00:00
msgid ""
"If the Future's result isn't yet available, this method raises a :exc:"
"`InvalidStateError` exception."
msgstr ""
2020-02-14 10:18:53 +00:00
"Si le résultat de la tâche n'est pas encore disponible, cette méthode lève "
"une exception :exc:`InvalidStateError`."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:111
2018-10-13 15:54:03 +00:00
msgid "Mark the Future as *done* and set its result."
2023-03-23 08:50:17 +00:00
msgstr "Marque le *Future* comme « terminé » et définit son résultat."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:113 ../Doc/library/asyncio-future.rst:120
2018-10-13 15:54:03 +00:00
msgid ""
"Raises a :exc:`InvalidStateError` error if the Future is already *done*."
msgstr ""
2023-03-23 08:50:17 +00:00
"Lève une erreur :exc:`InvalidStateError` si le *Future* est déjà « terminé »."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:118
2018-10-13 15:54:03 +00:00
msgid "Mark the Future as *done* and set an exception."
2023-03-23 08:50:17 +00:00
msgstr "Marque le *Future* comme « terminé » et définit une exception."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:125
2018-10-13 15:54:03 +00:00
msgid "Return ``True`` if the Future is *done*."
2023-03-23 08:50:17 +00:00
msgstr "Renvoie ``True`` si le *Future* est « terminé »."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:127
2018-10-13 15:54:03 +00:00
msgid ""
"A Future is *done* if it was *cancelled* or if it has a result or an "
"exception set with :meth:`set_result` or :meth:`set_exception` calls."
msgstr ""
2023-03-23 08:50:17 +00:00
"Un *Future* est « terminé » s'il a été « annulé » ou si un résultat ou une "
"exception a été définie par les méthodes :meth:`set_result` ou :meth:"
"`set_exception`."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:133
2018-10-13 15:54:03 +00:00
msgid "Return ``True`` if the Future was *cancelled*."
2023-03-23 08:50:17 +00:00
msgstr "Renvoie ``True`` si le *Future* a été « annulé »."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:135
2018-10-13 15:54:03 +00:00
msgid ""
"The method is usually used to check if a Future is not *cancelled* before "
"setting a result or an exception for it::"
msgstr ""
2023-03-23 08:50:17 +00:00
"Cette méthode est habituellement utilisée pour vérifier qu'un *Future* n'est "
"pas « annulé » avant de définir un résultat ou une exception pour celui-ci ::"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:143
2018-10-13 15:54:03 +00:00
msgid "Add a callback to be run when the Future is *done*."
msgstr ""
2023-03-23 08:50:17 +00:00
"Ajoute une fonction de rappel à exécuter lorsque le *Future* est « terminé »."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:145
2018-10-13 15:54:03 +00:00
msgid "The *callback* is called with the Future object as its only argument."
msgstr ""
2023-03-23 08:50:17 +00:00
"L'argument *callback* est appelé avec l'objet *Future* comme seul argument."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:148
2018-10-13 15:54:03 +00:00
msgid ""
"If the Future is already *done* when this method is called, the callback is "
"scheduled with :meth:`loop.call_soon`."
msgstr ""
2023-03-23 08:50:17 +00:00
"Si le *Future* est déjà « terminé » lorsque la méthode est appelée, "
"l'exécution de la fonction de rappel est planifiée avec :meth:`loop."
"call_soon`."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:151
2018-10-13 15:54:03 +00:00
msgid ""
"An optional keyword-only *context* argument allows specifying a custom :"
"class:`contextvars.Context` for the *callback* to run in. The current "
"context is used when no *context* is provided."
msgstr ""
2023-03-23 08:50:17 +00:00
"L'argument nommé optionnel *context* permet de spécifier une classe :class:"
"`contextvars.Context` personnalisée dans laquelle la fonction de rappel "
"sexécutera. Le contexte actuel est utilisé si *context* n'est pas fourni."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:155
2018-10-13 15:54:03 +00:00
msgid ""
":func:`functools.partial` can be used to pass parameters to the callback, e."
"g.::"
msgstr ""
2023-03-23 08:50:17 +00:00
":func:`functools.partial` peut être utilisée pour passer des paramètres à la "
"fonction de rappel ::"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:162
2018-10-13 15:54:03 +00:00
msgid ""
"The *context* keyword-only parameter was added. See :pep:`567` for more "
"details."
msgstr ""
2023-03-23 08:50:17 +00:00
"Ajout de l'argument nommé *context*. Voir :pep:`567` pour plus de détails."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:168
2018-10-13 15:54:03 +00:00
msgid "Remove *callback* from the callbacks list."
2019-05-28 12:44:15 +00:00
msgstr "Retire *callback* de la liste de fonctions de rappel."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:170
2018-10-13 15:54:03 +00:00
msgid ""
"Returns the number of callbacks removed, which is typically 1, unless a "
"callback was added more than once."
msgstr ""
2023-03-23 08:50:17 +00:00
"Renvoie le nombre de fonctions de rappel retiré. La méthode renvoie "
"généralement 1, à moins que la fonction ait été ajoutée plus d'une fois."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:175
2018-10-13 15:54:03 +00:00
msgid "Cancel the Future and schedule callbacks."
2023-03-23 08:50:17 +00:00
msgstr "Annule le *Future* et planifie l'exécution des fonctions de rappel."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:177
2018-10-13 15:54:03 +00:00
msgid ""
"If the Future is already *done* or *cancelled*, return ``False``. Otherwise, "
"change the Future's state to *cancelled*, schedule the callbacks, and return "
"``True``."
msgstr ""
2023-03-23 08:50:17 +00:00
"Si le *Future* est déjà « terminé » ou « annulé », renvoie ``False``. "
"Autrement, change l'état du *Future* à « annulé », planifie l'exécution des "
"fonctions de rappel et renvoie ``True``."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:183
2018-10-13 15:54:03 +00:00
msgid "Return the exception that was set on this Future."
2023-03-23 08:50:17 +00:00
msgstr "Renvoie l'exception définie pour ce *Future*."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:185
2018-10-13 15:54:03 +00:00
msgid ""
"The exception (or ``None`` if no exception was set) is returned only if the "
"Future is *done*."
msgstr ""
2023-03-23 08:50:17 +00:00
"L'exception, ou ``None`` si aucune exception n'a été définie, est renvoyé "
"seulement si le *Future* est « terminé »."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:191
2018-10-13 15:54:03 +00:00
msgid ""
"If the Future isn't *done* yet, this method raises an :exc:"
"`InvalidStateError` exception."
msgstr ""
2023-03-23 08:50:17 +00:00
"Si le *Future* n'est pas encore « terminé », cette méthode lève une "
"exception :exc:`InvalidStateError`."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:196
2018-10-13 15:54:03 +00:00
msgid "Return the event loop the Future object is bound to."
2023-03-23 08:50:17 +00:00
msgstr "Renvoie la boucle d'évènements à laquelle le *Future* est attaché."
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:203
2018-10-13 15:54:03 +00:00
msgid ""
"This example creates a Future object, creates and schedules an asynchronous "
"Task to set result for the Future, and waits until the Future has a result::"
msgstr ""
2023-03-23 08:50:17 +00:00
"Cet exemple crée un objet *Future*, puis crée et planifie lexécution d'une "
"tâche asynchrone qui définira le résultat du *Future* et attend jusqu'à ce "
"que le *Future* ait un résultat ::"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:238
2018-10-13 15:54:03 +00:00
msgid ""
"The Future object was designed to mimic :class:`concurrent.futures.Future`. "
"Key differences include:"
msgstr ""
2023-03-23 08:50:17 +00:00
"L'objet *Future* est conçu pour imiter la classe :class:`concurrent.futures."
"Future`. Les principales différences sont :"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:241
2018-10-13 15:54:03 +00:00
msgid ""
"unlike asyncio Futures, :class:`concurrent.futures.Future` instances cannot "
"be awaited."
msgstr ""
2023-03-23 08:50:17 +00:00
"contrairement au *Future asyncio*, les instances de :class:`concurrent."
"futures.Future` ne peuvent pas être attendues ;"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:244
2018-10-13 15:54:03 +00:00
msgid ""
":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` do not "
"accept the *timeout* argument."
msgstr ""
2023-03-23 08:50:17 +00:00
":meth:`asyncio.Future.result` et :meth:`asyncio.Future.exception` "
"n'acceptent pas d'argument *timeout* ;"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:247
2018-10-13 15:54:03 +00:00
msgid ""
":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` raise an :"
"exc:`InvalidStateError` exception when the Future is not *done*."
msgstr ""
2023-03-23 08:50:17 +00:00
":meth:`asyncio.Future.result` et :meth:`asyncio.Future.exception` lèvent une "
"exception :exc:`InvalidStateError` lorsque le *Future* n'est pas "
 terminé » ;"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:251
2018-10-13 15:54:03 +00:00
msgid ""
"Callbacks registered with :meth:`asyncio.Future.add_done_callback` are not "
"called immediately. They are scheduled with :meth:`loop.call_soon` instead."
msgstr ""
2023-03-23 08:50:17 +00:00
"les fonctions de rappel enregistrées à l'aide de :meth:`asyncio.Future."
"add_done_callback` ne sont pas exécutées immédiatement mais planifiées avec :"
"meth:`loop.call_soon` ;"
2018-10-13 15:54:03 +00:00
#: ../Doc/library/asyncio-future.rst:255
2018-10-13 15:54:03 +00:00
msgid ""
"asyncio Future is not compatible with the :func:`concurrent.futures.wait` "
"and :func:`concurrent.futures.as_completed` functions."
msgstr ""
2023-03-23 08:50:17 +00:00
"les *Future asyncio* ne sont pas compatibles avec les fonctions :func:"
"`concurrent.futures.wait` et :func:`concurrent.futures.as_completed` ;"