Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Traduction de library/asyncio-dev.po#1891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jeanas merged 6 commits intopython:3.10fromGaasmann:library-asyncio-dev
Jun 7, 2022
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 105 additions & 13 deletionslibrary/asyncio-dev.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,13 +6,14 @@ msgstr ""
"Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-01 16:00+0200\n"
"PO-Revision-Date:2018-10-13 17:38+0200\n"
"Last-Translator:Julien Palard <julien@palard.fr>\n"
"PO-Revision-Date:2022-06-06 21:29-0400\n"
"Last-Translator:Nicolas Haller <nicolas@haller.im>\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"
"X-Generator: Poedit 3.0.1\n"

#: library/asyncio-dev.rst:7
msgid "Developing with asyncio"
Expand All@@ -23,94 +24,125 @@ msgid ""
"Asynchronous programming is different from classic \"sequential\" "
"programming."
msgstr ""
"La programmation asynchrone est différente de la programmation "
"« séquentielle » classique."

#: library/asyncio-dev.rst:12
msgid ""
"This page lists common mistakes and traps and explains how to avoid them."
msgstr ""
"Cette page liste les pièges et erreurs communs que le développeur pourrait "
"rencontrer et décrit comment les éviter."

#: library/asyncio-dev.rst:19
msgid "Debug Mode"
msgstr ""
msgstr "Mode débogage"

#: library/asyncio-dev.rst:21
msgid ""
"By default asyncio runs in production mode. In order to ease the "
"development asyncio has a *debug mode*."
msgstr ""
"Par défaut, *asyncio* s'exécute en mode production. Pour faciliter le "
"développement, *asyncio* possède un « mode débogage »."

#: library/asyncio-dev.rst:24
msgid "There are several ways to enable asyncio debug mode:"
msgstr ""
msgstr "Il existe plusieurs façons d'activer le mode débogage de *asyncio* :"

#: library/asyncio-dev.rst:26
msgid "Setting the :envvar:`PYTHONASYNCIODEBUG` environment variable to ``1``."
msgstr ""
"en réglant la variable d’environnement :envvar:`PYTHONASYNCIODEBUG` à ``1`` ;"

#: library/asyncio-dev.rst:28
msgid "Using the :ref:`Python Development Mode <devmode>`."
msgstr ""
"en utilisant le mode développement de Python (:ref:`Python Development Mode "
"<devmode>`) ;"

#: library/asyncio-dev.rst:30
msgid "Passing ``debug=True`` to :func:`asyncio.run`."
msgstr ""
msgstr "en passant ``debug=True`` à la fonction :func:`asyncio.run` ;"

#: library/asyncio-dev.rst:32
msgid "Calling :meth:`loop.set_debug`."
msgstr ""
msgstr "en appelant la méthode :meth:`loop.set_debug`."

#: library/asyncio-dev.rst:34
msgid "In addition to enabling the debug mode, consider also:"
msgstr ""
msgstr "En plus d'activer le mode débogage, vous pouvez également :"

#: library/asyncio-dev.rst:36
msgid ""
"setting the log level of the :ref:`asyncio logger <asyncio-logger>` to :py:"
"data:`logging.DEBUG`, for example the following snippet of code can be run "
"at startup of the application::"
msgstr ""
"régler le niveau de journalisation pour l'enregistreur d'*asyncio* (:ref:"
"`asyncio logger <asyncio-logger>`) à :py:data:`logging.DEBUG` ; par exemple, "
"le fragment de code suivant peut être exécuté au démarrage de "
"l'application ::"

#: library/asyncio-dev.rst:42
msgid ""
"configuring the :mod:`warnings` module to display :exc:`ResourceWarning` "
"warnings. One way of doing that is by using the :option:`-W` ``default`` "
"command line option."
msgstr ""
"configurer le module :mod:`warnings` afin d'afficher les avertissements de "
"type :exc:`ResourceWarning` ; vous pouvez faire cela en utilisant l'option :"
"option:`-W` ``default`` sur la ligne de commande."

#: library/asyncio-dev.rst:47
msgid "When the debug mode is enabled:"
msgstr ""
msgstr "Lorsque le mode débogage est activé :"

# long ref
#: library/asyncio-dev.rst:49
msgid ""
"asyncio checks for :ref:`coroutines that were not awaited <asyncio-coroutine-"
"not-scheduled>` and logs them; this mitigates the \"forgotten await\" "
"pitfall."
msgstr ""
"*asyncio* surveille les :ref:`coroutines qui ne sont jamais attendues "
"<asyncio-coroutine-not-scheduled>` et les journalise ; cela atténue le "
"problème des « *await* oubliés » ;"

# thread safe comment traduire
#: library/asyncio-dev.rst:53
msgid ""
"Many non-threadsafe asyncio APIs (such as :meth:`loop.call_soon` and :meth:"
"`loop.call_at` methods) raise an exception if they are called from a wrong "
"thread."
msgstr ""
"beaucoup d'*API* *asyncio* ne prenant pas en charge les fils d'exécution "
"multiples (comme les méthodes :meth:`loop.call_soon` et :meth:`loop."
"call_at`) lèvent une exception si elles sont appelées par le mauvais fil "
"d’exécution ;"

#: library/asyncio-dev.rst:57
msgid ""
"The execution time of the I/O selector is logged if it takes too long to "
"perform an I/O operation."
msgstr ""
"le temps d'exécution du sélecteur d'entrée-sortie est journalisé si une "
"opération prend trop de temps à s'effectuer ;"

#: library/asyncio-dev.rst:60
msgid ""
"Callbacks taking longer than 100ms are logged. The :attr:`loop."
"slow_callback_duration` attribute can be used to set the minimum execution "
"duration in seconds that is considered \"slow\"."
msgstr ""
"les fonctions de rappel prenant plus de 100 ms sont journalisées ; "
"l'attribut :attr:`loop.slow_callback_duration` peut être utilisé pour "
"changer la limite (en secondes) après laquelle une fonction de rappel est "
"considérée comme « lent »."

#: library/asyncio-dev.rst:68
msgid "Concurrency and Multithreading"
msgstr "Concouranceet*multithreading*"
msgstr "Programmation concurrenteetmulti-fils"

#: library/asyncio-dev.rst:70
msgid ""
Expand All@@ -120,12 +152,21 @@ msgid ""
"``await`` expression, the running Task gets suspended, and the event loop "
"executes the next Task."
msgstr ""
"Une boucle d'évènements s'exécute dans un fil d’exécution (typiquement dans "
"le fil principal) et traite toutes les fonctions de rappel (*callbacks*) "
"ainsi que toutes les tâches dans ce même fil. Lorsqu'une tâche est en cours "
"d'exécution dans la boucle d'évènements, aucune autre tâche ne peut "
"s'exécuter dans ce fil. Quand une tâche traite une expression ``await``, "
"elle se suspend et laisse la boucle d’évènements traiter la tâche suivante."

#: library/asyncio-dev.rst:76
msgid ""
"To schedule a :term:`callback` from another OS thread, the :meth:`loop."
"call_soon_threadsafe` method should be used. Example::"
msgstr ""
"Pour planifier un :term:`rappel <callback>` depuis un autre fil d'exécution "
"système, utilisez la méthode :meth:`loop.call_soon_threadsafe`. Par "
"exemple ::"

#: library/asyncio-dev.rst:81
msgid ""
Expand All@@ -134,19 +175,30 @@ msgid ""
"a callback. If there's a need for such code to call a low-level asyncio "
"API, the :meth:`loop.call_soon_threadsafe` method should be used, e.g.::"
msgstr ""
"La plupart des objets *asyncio* ne sont pas conçus pour être exécutés dans "
"un contexte multi-fils (*thread-safe*) mais cela n'est en général pas un "
"problème à moins que l'objet ne fasse appel à du code se trouvant en dehors "
"d'une tâche ou d'une fonction de rappel. Dans ce dernier cas, si le code "
"appelle les *API* bas niveau de *asyncio*, utilisez la méthode :meth:`loop."
"call_soon_threadsafe`. Par exemple ::"

#: library/asyncio-dev.rst:89
msgid ""
"To schedule a coroutine object from a different OS thread, the :func:"
"`run_coroutine_threadsafe` function should be used. It returns a :class:"
"`concurrent.futures.Future` to access the result::"
msgstr ""
"Pour planifier un objet concurrent depuis un autre fil d'exécution système, "
"utilisez :func:`run_coroutine_threadsafe`. Cette fonction renvoie un objet :"
"class:`concurrent.futures.Future` pour accéder au résultat ::"

#: library/asyncio-dev.rst:102
msgid ""
"To handle signals and to execute subprocesses, the event loop must be run in "
"the main thread."
msgstr ""
"Pour pouvoir traiter les signaux et démarrer des processus enfants, la "
"boucle d'évènements doit être exécutée dans le fil principal."

#: library/asyncio-dev.rst:105
msgid ""
Expand All@@ -155,6 +207,10 @@ msgid ""
"different OS thread without blocking the OS thread that the event loop runs "
"in."
msgstr ""
"La méthode :meth:`loop.run_in_executor` peut être utilisée avec :class:"
"`concurrent.futures.ThreadPoolExecutor` pour exécuter du code bloquant dans "
"un autre fil d'exécution, afin de ne pas bloquer le fil où la boucle "
"d'évènements se trouve."

#: library/asyncio-dev.rst:110
msgid ""
Expand All@@ -168,24 +224,44 @@ msgid ""
"a :class:`concurrent.futures.ProcessPoolExecutor` to execute code in a "
"different process."
msgstr ""
"Il n'y a actuellement aucune façon de planifier des coroutines ou des "
"rappels directement depuis un autre processus (comme, par exemple, un "
"processus démarré avec :mod:`multiprocessing`). La section :ref:`Méthodes de "
"la boucle d'évènements <asyncio-event-loop>` liste les *API* pouvant lire "
"les tubes (*pipes*) et surveiller les descripteurs de fichiers sans bloquer "
"la boucle d'évènements. De plus, les *API* :ref:`Subprocess <asyncio-"
"subprocess>` d'*asyncio* fournissent un moyen de démarrer un processus et de "
"communiquer avec lui depuis la boucle d'évènements. Enfin, la méthode :meth:"
"`loop.run_in_executor` peut également être utilisée avec :class:`concurrent."
"futures.ProcessPoolExecutor` pour exécuter du code dans un processus "
"différent."

#: library/asyncio-dev.rst:124
msgid "Running Blocking Code"
msgstr ""
msgstr "Exécution de code bloquant"

#: library/asyncio-dev.rst:126
msgid ""
"Blocking (CPU-bound) code should not be called directly. For example, if a "
"function performs a CPU-intensive calculation for 1 second, all concurrent "
"asyncio Tasks and IO operations would be delayed by 1 second."
msgstr ""
"Du code bloquant sur des opérations de calcul (*CPU-bound*) ne devrait pas "
"être appelé directement. Par exemple, si une fonction effectue des calculs "
"utilisant le CPU intensivement pendant une seconde, toutes les tâches "
"*asyncio* concurrentes et les opérations d'entrées-sorties seront bloquées "
"pour une seconde."

#: library/asyncio-dev.rst:131
msgid ""
"An executor can be used to run a task in a different thread or even in a "
"different process to avoid blocking the OS thread with the event loop. See "
"the :meth:`loop.run_in_executor` method for more details."
msgstr ""
"Un exécuteur peut être utilisé pour traiter une tâche dans un fil "
"d'exécution ou un processus différent, afin d'éviter de bloquer le fil "
"d'exécution système dans lequel se trouve la boucle d’évènements. Voir :meth:"
"`loop.run_in_executor` pour plus de détails."

#: library/asyncio-dev.rst:140
msgid "Logging"
Expand All@@ -196,23 +272,31 @@ msgid ""
"asyncio uses the :mod:`logging` module and all logging is performed via the "
"``\"asyncio\"`` logger."
msgstr ""
"*Asyncio* utilise le module :mod:`logging`. Toutes les opérations de "
"journalisation sont effectuées via l'enregistreur (*logger*) ``\"asyncio\"``."

#: library/asyncio-dev.rst:145
msgid ""
"The default log level is :py:data:`logging.INFO`, which can be easily "
"adjusted::"
msgstr ""
"Le niveau de journalisation par défaut est :py:data:`logging.INFO` mais peut "
"être ajusté facilement ::"

#: library/asyncio-dev.rst:154
msgid "Detect never-awaited coroutines"
msgstr ""
msgstr "Détection des coroutines jamais attendues"

#: library/asyncio-dev.rst:156
msgid ""
"When a coroutine function is called, but not awaited (e.g. ``coro()`` "
"instead of ``await coro()``) or the coroutine is not scheduled with :meth:"
"`asyncio.create_task`, asyncio will emit a :exc:`RuntimeWarning`::"
msgstr ""
"Lorsqu'une fonction coroutine est appelée mais qu'elle n'est pas attendue "
"(p. ex. ``coro()`` au lieu de ``await coro()``) ou si la coroutine n'est "
"pas planifiée avec :meth:`asyncio.create_task`, *asyncio* émet un :exc:"
"`RuntimeWarning` ::"

#: library/asyncio-dev.rst:216
msgid "Output::"
Expand All@@ -227,10 +311,12 @@ msgid ""
"The usual fix is to either await the coroutine or call the :meth:`asyncio."
"create_task` function::"
msgstr ""
"La façon habituelle de régler ce problème est d'attendre (*await*) la "
"coroutine ou bien d'appeler la fonction :meth:`asyncio.create_task` ::"

#: library/asyncio-dev.rst:197
msgid "Detect never-retrieved exceptions"
msgstr ""
msgstr "Détection des exceptions jamais récupérées"

#: library/asyncio-dev.rst:199
msgid ""
Expand All@@ -239,13 +325,19 @@ msgid ""
"this case, asyncio would emit a log message when the Future object is "
"garbage collected."
msgstr ""
"Si la méthode :meth:`Future.set_exception` est appelée mais que l'objet "
"*Future* n'est pas attendu, l'exception n'est pas propagée au code "
"utilisateur. Dans ce cas, *asyncio* écrit un message dans le journal lorsque "
"l'objet *Future* est récupéré par le ramasse-miette."

#: library/asyncio-dev.rst:204
msgid "Example of an unhandled exception::"
msgstr ""
msgstr "Exemple d'une exception non-gérée ::"

#: library/asyncio-dev.rst:227
msgid ""
":ref:`Enable the debug mode <asyncio-debug-mode>` to get the traceback where "
"the task was created::"
msgstr ""
":ref:`Activez le mode débogage <asyncio-debug-mode>` pour récupérer la trace "
"d'appels indiquant où la tâche a été créée ::"

[8]ページ先頭

©2009-2025 Movatter.jp