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

826 lines
28 KiB
Plaintext
Raw Normal View History

2016-10-30 09:46:26 +00:00
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2016, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
2017-04-02 20:14:06 +00:00
"POT-Creation-Date: 2017-04-02 22:11+0200\n"
2016-10-30 09:46:26 +00:00
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
2017-05-23 22:40:56 +00:00
"Language: fr\n"
2016-10-30 09:46:26 +00:00
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../Doc/library/asyncio-task.rst:4
msgid "Tasks and coroutines"
msgstr "Tâches et coroutines"
#: ../Doc/library/asyncio-task.rst:9
msgid "Coroutines"
msgstr "Coroutines"
#: ../Doc/library/asyncio-task.rst:11
msgid ""
"Coroutines used with :mod:`asyncio` may be implemented using the :keyword:"
"`async def` statement, or by using :term:`generators <generator>`. The :"
"keyword:`async def` type of coroutine was added in Python 3.5, and is "
"recommended if there is no need to support older Python versions."
msgstr ""
#: ../Doc/library/asyncio-task.rst:16
msgid ""
"Generator-based coroutines should be decorated with :func:`@asyncio."
"coroutine <asyncio.coroutine>`, although this is not strictly enforced. The "
"decorator enables compatibility with :keyword:`async def` coroutines, and "
"also serves as documentation. Generator-based coroutines use the ``yield "
"from`` syntax introduced in :pep:`380`, instead of the original ``yield`` "
"syntax."
msgstr ""
#: ../Doc/library/asyncio-task.rst:23
msgid ""
"The word \"coroutine\", like the word \"generator\", is used for two "
"different (though related) concepts:"
msgstr ""
#: ../Doc/library/asyncio-task.rst:26
msgid ""
"The function that defines a coroutine (a function definition using :keyword:"
"`async def` or decorated with ``@asyncio.coroutine``). If disambiguation is "
"needed we will call this a *coroutine function* (:func:`iscoroutinefunction` "
"returns ``True``)."
msgstr ""
#: ../Doc/library/asyncio-task.rst:32
msgid ""
"The object obtained by calling a coroutine function. This object represents "
"a computation or an I/O operation (usually a combination) that will complete "
"eventually. If disambiguation is needed we will call it a *coroutine "
"object* (:func:`iscoroutine` returns ``True``)."
msgstr ""
#: ../Doc/library/asyncio-task.rst:37
msgid "Things a coroutine can do:"
msgstr "Les choses que les coroutines peuvent faire :"
#: ../Doc/library/asyncio-task.rst:39
msgid ""
"``result = await future`` or ``result = yield from future`` -- suspends the "
"coroutine until the future is done, then returns the future's result, or "
"raises an exception, which will be propagated. (If the future is cancelled, "
"it will raise a ``CancelledError`` exception.) Note that tasks are futures, "
"and everything said about futures also applies to tasks."
msgstr ""
#: ../Doc/library/asyncio-task.rst:46
msgid ""
"``result = await coroutine`` or ``result = yield from coroutine`` -- wait "
"for another coroutine to produce a result (or raise an exception, which will "
"be propagated). The ``coroutine`` expression must be a *call* to another "
"coroutine."
msgstr ""
#: ../Doc/library/asyncio-task.rst:51
msgid ""
"``return expression`` -- produce a result to the coroutine that is waiting "
"for this one using :keyword:`await` or ``yield from``."
msgstr ""
#: ../Doc/library/asyncio-task.rst:54
msgid ""
"``raise exception`` -- raise an exception in the coroutine that is waiting "
"for this one using :keyword:`await` or ``yield from``."
msgstr ""
#: ../Doc/library/asyncio-task.rst:57
msgid ""
"Calling a coroutine does not start its code running -- the coroutine object "
"returned by the call doesn't do anything until you schedule its execution. "
"There are two basic ways to start it running: call ``await coroutine`` or "
"``yield from coroutine`` from another coroutine (assuming the other "
"coroutine is already running!), or schedule its execution using the :func:"
"`ensure_future` function or the :meth:`AbstractEventLoop.create_task` method."
msgstr ""
#: ../Doc/library/asyncio-task.rst:66
msgid "Coroutines (and tasks) can only run when the event loop is running."
msgstr ""
#: ../Doc/library/asyncio-task.rst:70
msgid ""
"Decorator to mark generator-based coroutines. This enables the generator "
"use :keyword:`!yield from` to call :keyword:`async def` coroutines, and also "
"enables the generator to be called by :keyword:`async def` coroutines, for "
"instance using an :keyword:`await` expression."
msgstr ""
#: ../Doc/library/asyncio-task.rst:76
msgid ""
"There is no need to decorate :keyword:`async def` coroutines themselves."
msgstr ""
#: ../Doc/library/asyncio-task.rst:78
msgid ""
"If the generator is not yielded from before it is destroyed, an error "
"message is logged. See :ref:`Detect coroutines never scheduled <asyncio-"
"coroutine-not-scheduled>`."
msgstr ""
#: ../Doc/library/asyncio-task.rst:84
msgid ""
"In this documentation, some methods are documented as coroutines, even if "
"they are plain Python functions returning a :class:`Future`. This is "
"intentional to have a freedom of tweaking the implementation of these "
"functions in the future. If such a function is needed to be used in a "
"callback-style code, wrap its result with :func:`ensure_future`."
msgstr ""
#: ../Doc/library/asyncio-task.rst:94
msgid "Example: Hello World coroutine"
msgstr "Exemple : Coroutine \"Hello World\""
#: ../Doc/library/asyncio-task.rst:96
msgid "Example of coroutine displaying ``\"Hello World\"``::"
msgstr ""
#: ../Doc/library/asyncio-task.rst:110
msgid ""
"The :ref:`Hello World with call_soon() <asyncio-hello-world-callback>` "
"example uses the :meth:`AbstractEventLoop.call_soon` method to schedule a "
"callback."
msgstr ""
#: ../Doc/library/asyncio-task.rst:118
msgid "Example: Coroutine displaying the current date"
msgstr "Exemple : Coroutine affichant la date actuelle"
#: ../Doc/library/asyncio-task.rst:120
msgid ""
"Example of coroutine displaying the current date every second during 5 "
"seconds using the :meth:`sleep` function::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:141
2016-10-30 09:46:26 +00:00
msgid ""
"The :ref:`display the current date with call_later() <asyncio-date-"
"callback>` example uses a callback with the :meth:`AbstractEventLoop."
"call_later` method."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:147
2016-10-30 09:46:26 +00:00
msgid "Example: Chain coroutines"
msgstr "Exemple : Chaîner des coroutines"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:149
2016-10-30 09:46:26 +00:00
msgid "Example chaining coroutines::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:166
2016-10-30 09:46:26 +00:00
msgid ""
"``compute()`` is chained to ``print_sum()``: ``print_sum()`` coroutine waits "
"until ``compute()`` is completed before returning its result."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:169
2016-10-30 09:46:26 +00:00
msgid "Sequence diagram of the example:"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:174
2016-10-30 09:46:26 +00:00
msgid ""
"The \"Task\" is created by the :meth:`AbstractEventLoop.run_until_complete` "
"method when it gets a coroutine object instead of a task."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:177
2016-10-30 09:46:26 +00:00
msgid ""
"The diagram shows the control flow, it does not describe exactly how things "
"work internally. For example, the sleep coroutine creates an internal future "
"which uses :meth:`AbstractEventLoop.call_later` to wake up the task in 1 "
"second."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:183
2016-10-30 09:46:26 +00:00
msgid "InvalidStateError"
msgstr "InvalidStateError"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:187
2016-10-30 09:46:26 +00:00
msgid "The operation is not allowed in this state."
msgstr "L'opération n'est pas autorisée dans cet état."
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:191
2016-10-30 09:46:26 +00:00
msgid "TimeoutError"
msgstr "TimeoutError"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:195
2016-10-30 09:46:26 +00:00
msgid "The operation exceeded the given deadline."
msgstr "L'opération a dépassé la deadline donnée."
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:199
2016-10-30 09:46:26 +00:00
msgid ""
"This exception is different from the builtin :exc:`TimeoutError` exception!"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:203
2016-10-30 09:46:26 +00:00
msgid "Future"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:207
2016-10-30 09:46:26 +00:00
msgid ""
"This class is *almost* compatible with :class:`concurrent.futures.Future`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:209
2016-10-30 09:46:26 +00:00
msgid "Differences:"
msgstr "Différences :"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:211
2016-10-30 09:46:26 +00:00
msgid ""
":meth:`result` and :meth:`exception` do not take a timeout argument and "
"raise an exception when the future isn't done yet."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:214
2016-10-30 09:46:26 +00:00
msgid ""
"Callbacks registered with :meth:`add_done_callback` are always called via "
"the event loop's :meth:`~AbstractEventLoop.call_soon_threadsafe`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:217
2016-10-30 09:46:26 +00:00
msgid ""
"This class is not compatible with the :func:`~concurrent.futures.wait` and :"
"func:`~concurrent.futures.as_completed` functions in the :mod:`concurrent."
"futures` package."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:221 ../Doc/library/asyncio-task.rst:388
2016-10-30 09:46:26 +00:00
msgid "This class is :ref:`not thread safe <asyncio-multithreading>`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:225
2016-10-30 09:46:26 +00:00
msgid "Cancel the future and schedule callbacks."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:227
2016-10-30 09:46:26 +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 ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:233
2016-10-30 09:46:26 +00:00
msgid "Return ``True`` if the future was cancelled."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:237
2016-10-30 09:46:26 +00:00
msgid "Return ``True`` if the future is done."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:239
2016-10-30 09:46:26 +00:00
msgid ""
"Done means either that a result / exception are available, or that the "
"future was cancelled."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:244
2016-10-30 09:46:26 +00:00
msgid "Return the result this future represents."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:246
2016-10-30 09:46:26 +00:00
msgid ""
"If the future has been cancelled, raises :exc:`CancelledError`. If the "
"future's result isn't yet available, raises :exc:`InvalidStateError`. If the "
"future is done and has an exception set, this exception is raised."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:252
2016-10-30 09:46:26 +00:00
msgid "Return the exception that was set on this future."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:254
2016-10-30 09:46:26 +00:00
msgid ""
"The exception (or ``None`` if no exception was set) is returned only if the "
"future is done. If the future has been cancelled, raises :exc:"
"`CancelledError`. If the future isn't done yet, raises :exc:"
"`InvalidStateError`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:261
2016-10-30 09:46:26 +00:00
msgid "Add a callback to be run when the future becomes done."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:263
2016-10-30 09:46:26 +00:00
msgid ""
"The callback is called with a single argument - the future object. If the "
"future is already done when this is called, the callback is scheduled with :"
"meth:`~AbstractEventLoop.call_soon`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:267
2016-10-30 09:46:26 +00:00
msgid ""
":ref:`Use functools.partial to pass parameters to the callback <asyncio-pass-"
"keywords>`. For example, ``fut.add_done_callback(functools.partial(print, "
"\"Future:\", flush=True))`` will call ``print(\"Future:\", fut, "
"flush=True)``."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:274
2016-10-30 09:46:26 +00:00
msgid "Remove all instances of a callback from the \"call when done\" list."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:276
2016-10-30 09:46:26 +00:00
msgid "Returns the number of callbacks removed."
msgstr "Donne le nombre de fonctions de rappel supprimées."
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:280
2016-10-30 09:46:26 +00:00
msgid "Mark the future done and set its result."
msgstr "Marque le futur comme terminé et définit son résultat."
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:282 ../Doc/library/asyncio-task.rst:289
2016-10-30 09:46:26 +00:00
msgid ""
"If the future is already done when this method is called, raises :exc:"
"`InvalidStateError`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:287
2016-10-30 09:46:26 +00:00
msgid "Mark the future done and set an exception."
msgstr "Marque le futur comme terminé et définit une exception."
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:294
2016-10-30 09:46:26 +00:00
msgid "Example: Future with run_until_complete()"
msgstr "Exemple : Futur avec ``run_until_complete()``"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:296
2016-10-30 09:46:26 +00:00
msgid ""
"Example combining a :class:`Future` and a :ref:`coroutine function "
"<coroutine>`::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:312
2016-10-30 09:46:26 +00:00
msgid ""
"The coroutine function is responsible for the computation (which takes 1 "
"second) and it stores the result into the future. The :meth:"
"`~AbstractEventLoop.run_until_complete` method waits for the completion of "
"the future."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:318
2016-10-30 09:46:26 +00:00
msgid ""
"The :meth:`~AbstractEventLoop.run_until_complete` method uses internally "
"the :meth:`~Future.add_done_callback` method to be notified when the future "
"is done."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:324
2016-10-30 09:46:26 +00:00
msgid "Example: Future with run_forever()"
msgstr "Exemple : Futur avec ``run_forever()``"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:326
2016-10-30 09:46:26 +00:00
msgid ""
"The previous example can be written differently using the :meth:`Future."
"add_done_callback` method to describe explicitly the control flow::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:349
2016-10-30 09:46:26 +00:00
msgid ""
"In this example, the future is used to link ``slow_operation()`` to "
"``got_result()``: when ``slow_operation()`` is done, ``got_result()`` is "
"called with the result."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:355
2016-10-30 09:46:26 +00:00
msgid "Task"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:359
2016-10-30 09:46:26 +00:00
msgid ""
"Schedule the execution of a :ref:`coroutine <coroutine>`: wrap it in a "
"future. A task is a subclass of :class:`Future`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:362
2016-10-30 09:46:26 +00:00
msgid ""
"A task is responsible for executing a coroutine object in an event loop. If "
"the wrapped coroutine yields from a future, the task suspends the execution "
"of the wrapped coroutine and waits for the completion of the future. When "
"the future is done, the execution of the wrapped coroutine restarts with the "
"result or the exception of the future."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:368
2016-10-30 09:46:26 +00:00
msgid ""
"Event loops use cooperative scheduling: an event loop only runs one task at "
"a time. Other tasks may run in parallel if other event loops are running in "
"different threads. While a task waits for the completion of a future, the "
"event loop executes a new task."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:373
2016-10-30 09:46:26 +00:00
msgid ""
"The cancellation of a task is different from the cancelation of a future. "
"Calling :meth:`cancel` will throw a :exc:`~concurrent.futures."
"CancelledError` to the wrapped coroutine. :meth:`~Future.cancelled` only "
"returns ``True`` if the wrapped coroutine did not catch the :exc:"
"`~concurrent.futures.CancelledError` exception, or raised a :exc:"
"`~concurrent.futures.CancelledError` exception."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:381
2016-10-30 09:46:26 +00:00
msgid ""
"If a pending task is destroyed, the execution of its wrapped :ref:`coroutine "
"<coroutine>` did not complete. It is probably a bug and a warning is logged: "
"see :ref:`Pending task destroyed <asyncio-pending-task-destroyed>`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:385
2016-10-30 09:46:26 +00:00
msgid ""
"Don't directly create :class:`Task` instances: use the :func:`ensure_future` "
"function or the :meth:`AbstractEventLoop.create_task` method."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:392
2016-10-30 09:46:26 +00:00
msgid "Return a set of all tasks for an event loop."
msgstr "Donne l'ensemble des tâches d'une boucle d'évènements."
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:394
2016-10-30 09:46:26 +00:00
msgid "By default all tasks for the current event loop are returned."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:398
2016-10-30 09:46:26 +00:00
msgid "Return the currently running task in an event loop or ``None``."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:400
2016-10-30 09:46:26 +00:00
msgid "By default the current task for the current event loop is returned."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:402
2016-10-30 09:46:26 +00:00
msgid "``None`` is returned when called not in the context of a :class:`Task`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:406
2016-10-30 09:46:26 +00:00
msgid "Request that this task cancel itself."
msgstr "Demande à ce qu'une tâche s'annule elle même."
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:408
2016-10-30 09:46:26 +00:00
msgid ""
"This arranges for a :exc:`~concurrent.futures.CancelledError` to be thrown "
"into the wrapped coroutine on the next cycle through the event loop. The "
"coroutine then has a chance to clean up or even deny the request using try/"
"except/finally."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:413
2016-10-30 09:46:26 +00:00
msgid ""
"Unlike :meth:`Future.cancel`, this does not guarantee that the task will be "
"cancelled: the exception might be caught and acted upon, delaying "
"cancellation of the task or preventing cancellation completely. The task may "
"also return a value or raise a different exception."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:418
2016-10-30 09:46:26 +00:00
msgid ""
"Immediately after this method is called, :meth:`~Future.cancelled` will not "
"return ``True`` (unless the task was already cancelled). A task will be "
"marked as cancelled when the wrapped coroutine terminates with a :exc:"
"`~concurrent.futures.CancelledError` exception (even if :meth:`cancel` was "
"not called)."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:426
2016-10-30 09:46:26 +00:00
msgid "Return the list of stack frames for this task's coroutine."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:428
2016-10-30 09:46:26 +00:00
msgid ""
"If the coroutine is not done, this returns the stack where it is suspended. "
"If the coroutine has completed successfully or was cancelled, this returns "
"an empty list. If the coroutine was terminated by an exception, this "
"returns the list of traceback frames."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:434
2016-10-30 09:46:26 +00:00
msgid "The frames are always ordered from oldest to newest."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:436
2016-10-30 09:46:26 +00:00
msgid ""
"The optional limit gives the maximum number of frames to return; by default "
"all available frames are returned. Its meaning differs depending on whether "
"a stack or a traceback is returned: the newest frames of a stack are "
"returned, but the oldest frames of a traceback are returned. (This matches "
"the behavior of the traceback module.)"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:442
2016-10-30 09:46:26 +00:00
msgid ""
"For reasons beyond our control, only one stack frame is returned for a "
"suspended coroutine."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:447
2016-10-30 09:46:26 +00:00
msgid "Print the stack or traceback for this task's coroutine."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:449
2016-10-30 09:46:26 +00:00
msgid ""
"This produces output similar to that of the traceback module, for the frames "
"retrieved by get_stack(). The limit argument is passed to get_stack(). The "
"file argument is an I/O stream to which the output is written; by default "
"output is written to sys.stderr."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:456
2016-10-30 09:46:26 +00:00
msgid "Example: Parallel execution of tasks"
msgstr "Exemple : Exécution parallèle de tâches"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:458
2016-10-30 09:46:26 +00:00
msgid "Example executing 3 tasks (A, B, C) in parallel::"
msgstr "Exemple d'exécution de trois tâches (A, B, C) en parallèle : ::"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:478
2016-10-30 09:46:26 +00:00
msgid "Output::"
msgstr "Sortie::"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:490
2016-10-30 09:46:26 +00:00
msgid ""
"A task is automatically scheduled for execution when it is created. The "
"event loop stops when all tasks are done."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:495
2016-10-30 09:46:26 +00:00
msgid "Task functions"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:499
2016-10-30 09:46:26 +00:00
msgid ""
"In the functions below, the optional *loop* argument allows explicitly "
"setting the event loop object used by the underlying task or coroutine. If "
"it's not provided, the default event loop is used."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:505
2016-10-30 09:46:26 +00:00
msgid ""
"Return an iterator whose values, when waited for, are :class:`Future` "
"instances."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:508
2016-10-30 09:46:26 +00:00
msgid ""
"Raises :exc:`asyncio.TimeoutError` if the timeout occurs before all Futures "
"are done."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:511
2016-10-30 09:46:26 +00:00
msgid "Example::"
msgstr "Exemples ::"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:519
2016-10-30 09:46:26 +00:00
msgid "The futures ``f`` are not necessarily members of fs."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:523
2016-10-30 09:46:26 +00:00
msgid ""
"Schedule the execution of a :ref:`coroutine object <coroutine>`: wrap it in "
"a future. Return a :class:`Task` object."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:526
2016-10-30 09:46:26 +00:00
msgid "If the argument is a :class:`Future`, it is returned directly."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:530
2016-10-30 09:46:26 +00:00
msgid "The function accepts any :term:`awaitable` object."
msgstr "La fonction accepte n'importe quel objet :term:`awaitable`."
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:535
2016-10-30 09:46:26 +00:00
msgid "The :meth:`AbstractEventLoop.create_task` method."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:539
2016-10-30 09:46:26 +00:00
msgid "A deprecated alias to :func:`ensure_future`."
msgstr "Un alias déprécié de :func:`ensure_future`."
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:545
2016-10-30 09:46:26 +00:00
msgid ""
"Return a future aggregating results from the given coroutine objects or "
"futures."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:548
2016-10-30 09:46:26 +00:00
msgid ""
"All futures must share the same event loop. If all the tasks are done "
"successfully, the returned future's result is the list of results (in the "
"order of the original sequence, not necessarily the order of results "
"arrival). If *return_exceptions* is true, exceptions in the tasks are "
"treated the same as successful results, and gathered in the result list; "
"otherwise, the first raised exception will be immediately propagated to the "
"returned future."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:556
2016-10-30 09:46:26 +00:00
msgid ""
"Cancellation: if the outer Future is cancelled, all children (that have not "
"completed yet) are also cancelled. If any child is cancelled, this is "
"treated as if it raised :exc:`~concurrent.futures.CancelledError` -- the "
"outer Future is *not* cancelled in this case. (This is to prevent the "
"cancellation of one child to cause other children to be cancelled.)"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:564
2016-10-30 09:46:26 +00:00
msgid ""
"Return ``True`` if *obj* is a :ref:`coroutine object <coroutine>`, which may "
"be based on a generator or an :keyword:`async def` coroutine."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:569
2016-10-30 09:46:26 +00:00
msgid ""
"Return ``True`` if *func* is determined to be a :ref:`coroutine function "
"<coroutine>`, which may be a decorated generator function or an :keyword:"
"`async def` function."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:575
2016-10-30 09:46:26 +00:00
msgid "Submit a :ref:`coroutine object <coroutine>` to a given event loop."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:577
2016-10-30 09:46:26 +00:00
msgid "Return a :class:`concurrent.futures.Future` to access the result."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:579
2016-10-30 09:46:26 +00:00
msgid ""
"This function is meant to be called from a different thread than the one "
"where the event loop is running. Usage::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:589
2016-10-30 09:46:26 +00:00
msgid ""
"If an exception is raised in the coroutine, the returned future will be "
"notified. It can also be used to cancel the task in the event loop::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:602
2016-10-30 09:46:26 +00:00
msgid ""
"See the :ref:`concurrency and multithreading <asyncio-multithreading>` "
"section of the documentation."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:607
2016-10-30 09:46:26 +00:00
msgid ""
"Unlike other functions from the module, :func:`run_coroutine_threadsafe` "
"requires the *loop* argument to be passed explicitly."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:615
2016-10-30 09:46:26 +00:00
msgid ""
"Create a :ref:`coroutine <coroutine>` that completes after a given time (in "
"seconds). If *result* is provided, it is produced to the caller when the "
"coroutine completes."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:619
2016-10-30 09:46:26 +00:00
msgid ""
"The resolution of the sleep depends on the :ref:`granularity of the event "
"loop <asyncio-delayed-calls>`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:622 ../Doc/library/asyncio-task.rst:686
2016-10-30 09:46:26 +00:00
msgid "This function is a :ref:`coroutine <coroutine>`."
msgstr "Cette fonction est une :ref:`coroutine <coroutine>`."
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:626
2016-10-30 09:46:26 +00:00
msgid "Wait for a future, shielding it from cancellation."
msgstr "Attends un future, en le protégeant des annulations."
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:628
2016-10-30 09:46:26 +00:00
msgid "The statement::"
msgstr "L'instruction : ::"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:632
2016-10-30 09:46:26 +00:00
msgid "is exactly equivalent to the statement::"
msgstr "est exactement équivalente à l'instruction : ::"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:636
2016-10-30 09:46:26 +00:00
msgid ""
"*except* that if the coroutine containing it is cancelled, the task running "
"in ``something()`` is not cancelled. From the point of view of "
"``something()``, the cancellation did not happen. But its caller is still "
"cancelled, so the yield-from expression still raises :exc:`~concurrent."
"futures.CancelledError`. Note: If ``something()`` is cancelled by other "
"means this will still cancel ``shield()``."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:643
2016-10-30 09:46:26 +00:00
msgid ""
"If you want to completely ignore cancellation (not recommended) you can "
"combine ``shield()`` with a try/except clause, as follows::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:655
2016-10-30 09:46:26 +00:00
msgid ""
"Wait for the Futures and coroutine objects given by the sequence *futures* "
"to complete. Coroutines will be wrapped in Tasks. Returns two sets of :"
"class:`Future`: (done, pending)."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:659
2016-10-30 09:46:26 +00:00
msgid "The sequence *futures* must not be empty."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:661
2016-10-30 09:46:26 +00:00
msgid ""
"*timeout* can be used to control the maximum number of seconds to wait "
"before returning. *timeout* can be an int or float. If *timeout* is not "
"specified or ``None``, there is no limit to the wait time."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:665
2016-10-30 09:46:26 +00:00
msgid ""
"*return_when* indicates when this function should return. It must be one of "
"the following constants of the :mod:`concurrent.futures` module:"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:671
2016-10-30 09:46:26 +00:00
msgid "Constant"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:671
2016-10-30 09:46:26 +00:00
msgid "Description"
msgstr "Description"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:673
2016-10-30 09:46:26 +00:00
msgid ":const:`FIRST_COMPLETED`"
msgstr ":const:`FIRST_COMPLETED`"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:673
2016-10-30 09:46:26 +00:00
msgid "The function will return when any future finishes or is cancelled."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:676
2016-10-30 09:46:26 +00:00
msgid ":const:`FIRST_EXCEPTION`"
msgstr ":const:`FIRST_EXCEPTION`"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:676
2016-10-30 09:46:26 +00:00
msgid ""
"The function will return when any future finishes by raising an exception. "
"If no future raises an exception then it is equivalent to :const:"
"`ALL_COMPLETED`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:682
2016-10-30 09:46:26 +00:00
msgid ":const:`ALL_COMPLETED`"
msgstr ":const:`ALL_COMPLETED`"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:682
2016-10-30 09:46:26 +00:00
msgid "The function will return when all futures finish or are cancelled."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:688
2016-10-30 09:46:26 +00:00
msgid "Usage::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:694
2016-10-30 09:46:26 +00:00
msgid ""
"This does not raise :exc:`asyncio.TimeoutError`! Futures that aren't done "
"when the timeout occurs are returned in the second set."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:700
2016-10-30 09:46:26 +00:00
msgid ""
"Wait for the single :class:`Future` or :ref:`coroutine object <coroutine>` "
"to complete with timeout. If *timeout* is ``None``, block until the future "
"completes."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:704
2016-10-30 09:46:26 +00:00
msgid "Coroutine will be wrapped in :class:`Task`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:706
2016-10-30 09:46:26 +00:00
msgid ""
"Returns result of the Future or coroutine. When a timeout occurs, it "
"cancels the task and raises :exc:`asyncio.TimeoutError`. To avoid the task "
"cancellation, wrap it in :func:`shield`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:710
2016-10-30 09:46:26 +00:00
msgid "If the wait is cancelled, the future *fut* is also cancelled."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:712
2016-10-30 09:46:26 +00:00
msgid "This function is a :ref:`coroutine <coroutine>`, usage::"
msgstr "Cette fonction est une :ref:`coroutine <coroutine>`, utilisation : ::"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/asyncio-task.rst:716
2016-10-30 09:46:26 +00:00
msgid "If the wait is cancelled, the future *fut* is now also cancelled."
msgstr ""
2017-04-02 20:14:06 +00:00
#~ msgid "The same coroutine implemented using a generator::"
#~ msgstr "La même coroutine implémentée en utilisant un générateur : ::"