From 985f856ec189457c2c6e0580c66833d3f29222d0 Mon Sep 17 00:00:00 2001 From: Christophe Nanteuil Date: Fri, 7 Jul 2023 13:35:31 +0000 Subject: [PATCH] poursuite de la traduction asyncio (#152) Co-authored-by: Christophe Nanteuil Reviewed-on: https://git.afpy.org/AFPy/python-docs-fr/pulls/152 Reviewed-by: Julien Palard Co-authored-by: Christophe Nanteuil Co-committed-by: Christophe Nanteuil --- library/asyncio-stream.po | 195 ++++++++++++++++++++++++++++------ library/asyncio-subprocess.po | 92 +++++++++++++--- library/asyncio-sync.po | 195 ++++++++++++++++++++++++++++------ 3 files changed, 397 insertions(+), 85 deletions(-) diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po index e4a7d6c9..0414e2ea 100644 --- a/library/asyncio-stream.po +++ b/library/asyncio-stream.po @@ -6,22 +6,22 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-04-14 13:19+0200\n" -"PO-Revision-Date: 2019-09-06 13:48+0200\n" -"Last-Translator: Julien Palard \n" +"PO-Revision-Date: 2023-07-04 23:07+0200\n" +"Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \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.2.2\n" #: library/asyncio-stream.rst:7 msgid "Streams" -msgstr "Streams" +msgstr "Flux (*streams*)" #: library/asyncio-stream.rst:9 -#, fuzzy msgid "**Source code:** :source:`Lib/asyncio/streams.py`" -msgstr "**Code source :** :source:`Lib/asyncore.py`" +msgstr "**Code source :** :source:`Lib/asyncore.py`" #: library/asyncio-stream.rst:13 msgid "" @@ -29,75 +29,99 @@ msgid "" "connections. Streams allow sending and receiving data without using " "callbacks or low-level protocols and transports." msgstr "" +"Les flux sont des primitives de haut niveau compatibles avec *async*/*await* " +"pour utiliser les connexions réseau. Les flux permettent d'envoyer et de " +"recevoir des données sans utiliser de fonctions de rappel ou des protocoles " +"de bas niveau." #: library/asyncio-stream.rst:19 msgid "Here is an example of a TCP echo client written using asyncio streams::" msgstr "" +"Voici un exemple de client « écho TCP » écrit en utilisant les flux " +"*asyncio* ::" #: library/asyncio-stream.rst:42 msgid "See also the `Examples`_ section below." -msgstr "" +msgstr "Voir également la section `Exemples`_ ci-dessous." #: library/asyncio-stream.rst:46 msgid "Stream Functions" -msgstr "" +msgstr "Fonctions de flux" #: library/asyncio-stream.rst:47 msgid "" "The following top-level asyncio functions can be used to create and work " "with streams:" msgstr "" +"Les fonctions *asyncio* de haut niveau suivantes peuvent être utilisées pour " +"créer et utiliser des flux :" #: library/asyncio-stream.rst:58 msgid "" "Establish a network connection and return a pair of ``(reader, writer)`` " "objects." msgstr "" +"Établit une connexion réseau et renvoie une paire d'objets ``(lecteur, " +"écrivain)``." #: library/asyncio-stream.rst:61 msgid "" "The returned *reader* and *writer* objects are instances of :class:" "`StreamReader` and :class:`StreamWriter` classes." msgstr "" +"Les objets *lecteur* et *écrivain* renvoyés sont des instances des classes :" +"class:`StreamReader` et :class:`StreamWriter`." #: library/asyncio-stream.rst:109 msgid "" "*limit* determines the buffer size limit used by the returned :class:" "`StreamReader` instance. By default the *limit* is set to 64 KiB." msgstr "" +"*limit* détermine la limite de taille de tampon utilisée par l'instance :" +"class:`StreamReader` renvoyée. Par défaut, *limit* est fixée à 64 Kio." #: library/asyncio-stream.rst:68 msgid "" "The rest of the arguments are passed directly to :meth:`loop." "create_connection`." msgstr "" +"Le reste des arguments est passé directement à :meth:`loop." +"create_connection`." +# suit un : #: library/asyncio-stream.rst:147 msgid "" "The *sock* argument transfers ownership of the socket to the :class:" "`StreamWriter` created. To close the socket, call its :meth:`~asyncio." "StreamWriter.close` method." msgstr "" +"l'argument *sock* transfère la propriété du connecteur réseau au :class:" +"`StreamWriter` créé. Pour fermer le connecteur, appelez sa méthode :meth:" +"`~asyncio.StreamWriter.close`." +# suit un : #: library/asyncio-stream.rst:77 msgid "Added the *ssl_handshake_timeout* parameter." -msgstr "" +msgstr "ajout du paramètre *ssl_handshake_timeout*." +# suit un : #: library/asyncio-stream.rst:80 msgid "Added *happy_eyeballs_delay* and *interleave* parameters." -msgstr "" +msgstr "ajout des paramètres *happy_eyeballs_delay* et *interleave*." +# suit un : #: library/asyncio-stream.rst:125 library/asyncio-stream.rst:187 msgid "Removed the *loop* parameter." -msgstr "" +msgstr "suppression du paramètre *loop*." +# suit un : #: library/asyncio-stream.rst:128 library/asyncio-stream.rst:190 msgid "Added the *ssl_shutdown_timeout* parameter." -msgstr "" +msgstr "ajout du paramètre *ssl_shutdown_timeout*." #: library/asyncio-stream.rst:98 msgid "Start a socket server." -msgstr "" +msgstr "Démarre un serveur de connexions" #: library/asyncio-stream.rst:100 msgid "" @@ -106,6 +130,10 @@ msgid "" "arguments, instances of the :class:`StreamReader` and :class:`StreamWriter` " "classes." msgstr "" +"La fonction de rappel *client_connected_cb* est appelée chaque fois qu'une " +"nouvelle connexion client est établie. Elle reçoit une paire d'arguments " +"``(lecteur, écrivain)``, instances des classes :class:`StreamReader` et :" +"class:`StreamWriter`." #: library/asyncio-stream.rst:105 msgid "" @@ -113,70 +141,89 @@ msgid "" "`; if it is a coroutine function, it will be automatically " "scheduled as a :class:`Task`." msgstr "" +"*client_connected_cb* peut être un simple appelable ou une fonction :ref:" +"`coroutine ` ; s'il s'agit d'une fonction coroutine, elle sera " +"automatiquement planifiée en tant que :class:`Task`." #: library/asyncio-stream.rst:113 msgid "" "The rest of the arguments are passed directly to :meth:`loop.create_server`." msgstr "" +"Le reste des arguments est passé directement à :meth:`loop.create_server`." +# suit un : #: library/asyncio-stream.rst:177 msgid "" "The *sock* argument transfers ownership of the socket to the server created. " "To close the socket, call the server's :meth:`~asyncio.Server.close` method." msgstr "" +"l'argument *sock* transfère la propriété du connecteur au serveur créé. Pour " +"fermer le connecteur, appelez la méthode :meth:`~asyncio.Server.close` du " +"serveur." +# suit un : #: library/asyncio-stream.rst:122 msgid "Added the *ssl_handshake_timeout* and *start_serving* parameters." -msgstr "" +msgstr "ajout des paramètres *ssl_handshake_timeout* et *start_serving*." #: library/asyncio-stream.rst:133 msgid "Unix Sockets" -msgstr "" +msgstr "Connecteurs Unix (*sockets*)" #: library/asyncio-stream.rst:138 msgid "" "Establish a Unix socket connection and return a pair of ``(reader, writer)``." msgstr "" +"Ouvre un connecteur Unix et renvoie une paire de ``(lecteur, écrivain)``." #: library/asyncio-stream.rst:141 msgid "Similar to :func:`open_connection` but operates on Unix sockets." msgstr "" +"Similaire à :func:`open_connection` mais fonctionne sur les connecteurs Unix." #: library/asyncio-stream.rst:143 msgid "See also the documentation of :meth:`loop.create_unix_connection`." -msgstr "" +msgstr "Voir aussi la documentation de :meth:`loop.create_unix_connection`." #: library/asyncio-stream.rst:181 msgid ":ref:`Availability `: Unix." msgstr ":ref:`Disponibilité ` : Unix." +# suit un : #: library/asyncio-stream.rst:153 msgid "" "Added the *ssl_handshake_timeout* parameter. The *path* parameter can now be " "a :term:`path-like object`" msgstr "" +"ajout du paramètre *ssl_handshake_timeout*. Le paramètre *path* peut " +"désormais être un :term:`objet simili-chemin `" #: library/asyncio-stream.rst:169 msgid "Start a Unix socket server." -msgstr "" +msgstr "Démarre un connecteur Unix en mode serveur." #: library/asyncio-stream.rst:171 msgid "Similar to :func:`start_server` but works with Unix sockets." msgstr "" +"Similaire à :func:`start_server` mais fonctionne avec les connecteurs Unix." #: library/asyncio-stream.rst:173 msgid "See also the documentation of :meth:`loop.create_unix_server`." -msgstr "" +msgstr "Voir aussi la documentation de :meth:`loop.create_unix_server`." +# suit un : #: library/asyncio-stream.rst:183 msgid "" "Added the *ssl_handshake_timeout* and *start_serving* parameters. The *path* " "parameter can now be a :term:`path-like object`." msgstr "" +"ajout des paramètres *ssl_handshake_timeout* et *start_serving*. Le " +"paramètre *chemin* peut désormais être un :term:`simili-chemin`." #: library/asyncio-stream.rst:195 msgid "StreamReader" -msgstr "StreamReader" +msgstr "Flux lecteurs (*StreamReader*)" #: library/asyncio-stream.rst:199 msgid "" @@ -184,16 +231,21 @@ msgid "" "stream. As an :term:`asynchronous iterable`, the object supports the :" "keyword:`async for` statement." msgstr "" +"Représente un objet lecteur qui fournit des API pour lire les données du " +"flux d'entrée-sortie. En tant que :term:`itérable asynchrone `, l'objet prend en charge l'instruction :keyword:`async for`." #: library/asyncio-stream.rst:203 msgid "" "It is not recommended to instantiate *StreamReader* objects directly; use :" "func:`open_connection` and :func:`start_server` instead." msgstr "" +"Il n'est pas recommandé d'instancier directement les objets *StreamReader* ; " +"utilisez :func:`open_connection` et :func:`start_server` à la place." #: library/asyncio-stream.rst:209 msgid "Read up to *n* bytes from the stream." -msgstr "" +msgstr "Lit jusqu'à *n* octets du flux." #: library/asyncio-stream.rst:211 msgid "" @@ -201,10 +253,13 @@ msgid "" "read :class:`bytes`. If EOF was received and the internal buffer is empty, " "return an empty ``bytes`` object." msgstr "" +"Si *n* n'est pas fourni ou défini à ``-1``, lit jusqu'à *EOF*, puis renvoie " +"tous les :class:`bytes` lus. Si *EOF* a été reçu et que le tampon interne " +"est vide, renvoie un objet ``bytes`` vide." #: library/asyncio-stream.rst:216 msgid "If *n* is ``0``, return an empty ``bytes`` object immediately." -msgstr "" +msgstr "Si *n* vaut ``0``, renvoie immédiatement un objet ``bytes`` vide." #: library/asyncio-stream.rst:218 msgid "" @@ -212,27 +267,36 @@ msgid "" "least 1 byte is available in the internal buffer. If EOF is received before " "any byte is read, return an empty ``bytes`` object." msgstr "" +"Si *n* est positif, renvoie au plus *n* ``bytes`` disponibles dès qu'au " +"moins 1 octet est disponible dans le tampon interne. Si *EOF* est reçu avant " +"qu'aucun octet ne soit lu, renvoie un objet ``bytes`` vide." #: library/asyncio-stream.rst:225 msgid "" "Read one line, where \"line\" is a sequence of bytes ending with ``\\n``." msgstr "" +"Lit une ligne, où une « ligne » est une séquence d'octets se terminant par ``" +"\\n``." #: library/asyncio-stream.rst:228 msgid "" "If EOF is received and ``\\n`` was not found, the method returns partially " "read data." msgstr "" +"Si *EOF* est reçu et ``\\n`` n'a pas été trouvé, la méthode renvoie des " +"données partiellement lues." #: library/asyncio-stream.rst:231 msgid "" "If EOF is received and the internal buffer is empty, return an empty " "``bytes`` object." msgstr "" +"Si *EOF* est reçu et que le tampon interne est vide, renvoie un objet " +"``bytes`` vide." #: library/asyncio-stream.rst:236 msgid "Read exactly *n* bytes." -msgstr "" +msgstr "Lit exactement *n* octets." #: library/asyncio-stream.rst:238 msgid "" @@ -240,16 +304,21 @@ msgid "" "read. Use the :attr:`IncompleteReadError.partial` attribute to get the " "partially read data." msgstr "" +"Lève une :exc:`IncompleteReadError` si *EOF* est atteint avant que *n* " +"octets ne puissent être lus. Utilisez l'attribut :attr:`IncompleteReadError." +"partial` pour obtenir les données partiellement lues." #: library/asyncio-stream.rst:244 msgid "Read data from the stream until *separator* is found." -msgstr "" +msgstr "Lit les données du flux jusqu'à ce que le *separator* soit trouvé." #: library/asyncio-stream.rst:246 msgid "" "On success, the data and separator will be removed from the internal buffer " "(consumed). Returned data will include the separator at the end." msgstr "" +"En cas de succès, les données et le séparateur sont supprimés du tampon " +"interne (consommés). Les données renvoyées incluent le séparateur à la fin." #: library/asyncio-stream.rst:250 msgid "" @@ -257,6 +326,9 @@ msgid "" "`LimitOverrunError` exception is raised, and the data is left in the " "internal buffer and can be read again." msgstr "" +"Si la quantité de données lues dépasse la limite de flux configurée, une " +"exception :exc:`LimitOverrunError` est levée et les données sont laissées " +"dans le tampon interne et peuvent être lues à nouveau." #: library/asyncio-stream.rst:254 msgid "" @@ -265,25 +337,34 @@ msgid "" "reset. The :attr:`IncompleteReadError.partial` attribute may contain a " "portion of the separator." msgstr "" +"Si *EOF* est atteint avant que le séparateur complet ne soit trouvé, une " +"exception :exc:`IncompleteReadError` est levée et le tampon interne est " +"réinitialisé. L'attribut :attr:`IncompleteReadError.partial` peut contenir " +"une partie du séparateur." #: library/asyncio-stream.rst:263 msgid "Return ``True`` if the buffer is empty and :meth:`feed_eof` was called." msgstr "" +"Renvoie ``True`` si le tampon est vide et que :meth:`feed_eof` a été appelée." #: library/asyncio-stream.rst:268 msgid "StreamWriter" -msgstr "StreamWriter" +msgstr "Flux écrivains (*StreamWriter*)" #: library/asyncio-stream.rst:272 msgid "" "Represents a writer object that provides APIs to write data to the IO stream." msgstr "" +"Représente un objet écrivain qui fournit des API pour écrire des données " +"dans le flux d'entrée-sortie." #: library/asyncio-stream.rst:275 msgid "" "It is not recommended to instantiate *StreamWriter* objects directly; use :" "func:`open_connection` and :func:`start_server` instead." msgstr "" +"Il n'est pas recommandé d'instancier directement les objets *StreamWriter* ; " +"utilisez :func:`open_connection` et :func:`start_server` à la place." #: library/asyncio-stream.rst:281 msgid "" @@ -291,10 +372,13 @@ msgid "" "immediately. If that fails, the data is queued in an internal write buffer " "until it can be sent." msgstr "" +"La méthode tente d'écrire immédiatement les *data* dans le connecteur sous-" +"jacent. Si cela échoue, les données sont mises en file d'attente dans un " +"tampon d'écriture interne jusqu'à ce qu'elles puissent être envoyées." #: library/asyncio-stream.rst:297 msgid "The method should be used along with the ``drain()`` method::" -msgstr "" +msgstr "La méthode doit être utilisée avec la méthode ``drain()`` ::" #: library/asyncio-stream.rst:292 msgid "" @@ -302,41 +386,55 @@ msgid "" "immediately. If that fails, the data is queued in an internal write buffer " "until it can be sent." msgstr "" +"La méthode écrit immédiatement une liste (ou tout itérable) d'octets dans le " +"connecteur sous-jacent. Si cela échoue, les données sont mises en file " +"d'attente dans un tampon d'écriture interne jusqu'à ce qu'elles puissent " +"être envoyées." #: library/asyncio-stream.rst:304 msgid "The method closes the stream and the underlying socket." -msgstr "" +msgstr "La méthode ferme le flux et le connecteur sous-jacent." #: library/asyncio-stream.rst:306 msgid "" "The method should be used, though not mandatory, along with the " "``wait_closed()`` method::" msgstr "" +"La méthode doit être utilisée, bien que ce ne soit pas obligatoire, avec la " +"méthode ``wait_closed()`` ::" #: library/asyncio-stream.rst:314 msgid "" "Return ``True`` if the underlying transport supports the :meth:`write_eof` " "method, ``False`` otherwise." msgstr "" +"Renvoie ``True`` si le transport sous-jacent gère la méthode :meth:" +"`write_eof`, ``False`` sinon." #: library/asyncio-stream.rst:319 msgid "" "Close the write end of the stream after the buffered write data is flushed." msgstr "" +"Ferme le flux en écriture après le vidage des données d'écriture en mémoire " +"tampon." #: library/asyncio-stream.rst:324 msgid "Return the underlying asyncio transport." -msgstr "" +msgstr "Renvoie le transport asynchrone sous-jacent." #: library/asyncio-stream.rst:328 msgid "" "Access optional transport information; see :meth:`BaseTransport." "get_extra_info` for details." msgstr "" +"Donne accès aux informations de transport facultatives ; voir :meth:" +"`BaseTransport.get_extra_info` pour plus de détails." #: library/asyncio-stream.rst:333 msgid "Wait until it is appropriate to resume writing to the stream. Example::" msgstr "" +"Attend qu'il soit approprié de reprendre l'écriture dans le flux. Par " +"exemple ::" #: library/asyncio-stream.rst:339 msgid "" @@ -346,24 +444,31 @@ msgid "" "writing can be resumed. When there is nothing to wait for, the :meth:" "`drain` returns immediately." msgstr "" +"Il s'agit d'une méthode de contrôle de flux qui interagit avec le tampon " +"d'écriture entrée-sortie sous-jacent. Lorsque la taille du tampon atteint la " +"limite haute, *drain()* bloque jusqu'à ce que la taille du tampon soit " +"drainée jusqu'à la limite basse et que l'écriture puisse reprendre. " +"Lorsqu'il n'y a rien à attendre, :meth:`drain` termine immédiatement." #: library/asyncio-stream.rst:349 msgid "Upgrade an existing stream-based connection to TLS." -msgstr "" +msgstr "Bascule la connexion basée sur le flux existant vers TLS." #: library/asyncio-stream.rst:351 msgid "Parameters:" -msgstr "" +msgstr "Paramètres :" #: library/asyncio-stream.rst:353 msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`." -msgstr "" +msgstr "*sslcontext* : une instance configurée de :class:`~ssl.SSLContext`." #: library/asyncio-stream.rst:355 msgid "" "*server_hostname*: sets or overrides the host name that the target server's " "certificate will be matched against." msgstr "" +"*server_hostname* : définit ou remplace le nom d'hôte auquel le certificat " +"du serveur cible sera comparé." #: library/asyncio-stream.rst:358 msgid "" @@ -371,15 +476,18 @@ msgid "" "to complete before aborting the connection. ``60.0`` seconds if ``None`` " "(default)." msgstr "" +"*ssl_handshake_timeout* est le temps en secondes à attendre pour que la " +"poignée de main TLS se termine avant d'abandonner la connexion. ``60.0`` " +"secondes si ``None`` (par défaut)." #: library/asyncio-stream.rst:366 msgid "" "Return ``True`` if the stream is closed or in the process of being closed." -msgstr "" +msgstr "Renvoie ``True`` si le flux est fermé ou en cours de fermeture." #: library/asyncio-stream.rst:373 msgid "Wait until the stream is closed." -msgstr "" +msgstr "Attend que le flux soit fermé." #: library/asyncio-stream.rst:375 msgid "" @@ -387,6 +495,9 @@ msgid "" "is closed, ensuring that all data has been flushed before e.g. exiting the " "program." msgstr "" +"Doit être appelée après :meth:`close` pour attendre que la connexion sous-" +"jacente soit fermée, en s'assurant que toutes les données ont été vidées " +"avant, par exemple, de quitter le programme." #: library/asyncio-stream.rst:383 msgid "Examples" @@ -394,11 +505,12 @@ msgstr "Exemples" #: library/asyncio-stream.rst:388 msgid "TCP echo client using streams" -msgstr "" +msgstr "Client d'écho TCP utilisant des flux" #: library/asyncio-stream.rst:390 msgid "TCP echo client using the :func:`asyncio.open_connection` function::" msgstr "" +"Client d'écho TCP utilisant la fonction :func:`asyncio.open_connection` ::" #: library/asyncio-stream.rst:414 msgid "" @@ -406,14 +518,17 @@ msgid "" "` example uses the low-level :meth:" "`loop.create_connection` method." msgstr "" +"L'exemple :ref:`asyncio_example_tcp_echo_client_protocol` utilise la méthode " +"de bas niveau :meth:`loop.create_connection`." #: library/asyncio-stream.rst:421 msgid "TCP echo server using streams" -msgstr "" +msgstr "Serveur d'écho TCP utilisant des flux" #: library/asyncio-stream.rst:423 msgid "TCP echo server using the :func:`asyncio.start_server` function::" msgstr "" +"Serveur d'écho TCP utilisant la fonction :func:`asyncio.start_server` ::" #: library/asyncio-stream.rst:457 msgid "" @@ -421,15 +536,19 @@ msgid "" "` example uses the :meth:`loop." "create_server` method." msgstr "" +"L'exemple de :ref:`asyncio_example_tcp_echo_server_protocol` utilise la " +"méthode :meth:`loop.create_server`." #: library/asyncio-stream.rst:462 msgid "Get HTTP headers" -msgstr "Récupère les en-têtes HTTP" +msgstr "Récupération des en-têtes HTTP" #: library/asyncio-stream.rst:464 msgid "" "Simple example querying HTTP headers of the URL passed on the command line::" msgstr "" +"Exemple simple d'interrogation des en-têtes HTTP de l'URL transmise sur la " +"ligne de commande ::" #: library/asyncio-stream.rst:503 msgid "Usage::" @@ -441,13 +560,15 @@ msgstr "ou avec HTTPS ::" #: library/asyncio-stream.rst:515 msgid "Register an open socket to wait for data using streams" -msgstr "" +msgstr "Ouverture d'un connecteur pour attendre les données à l'aide de flux" #: library/asyncio-stream.rst:517 msgid "" "Coroutine waiting until a socket receives data using the :func:" "`open_connection` function::" msgstr "" +"Coroutine attendant qu'un connecteur reçoive des données en utilisant la " +"fonction :func:`open_connection` ::" #: library/asyncio-stream.rst:552 msgid "" @@ -455,6 +576,8 @@ msgid "" "` example uses a low-level protocol and " "the :meth:`loop.create_connection` method." msgstr "" +"L'exemple :ref:`asyncio_example_create_connection` utilise un protocole de " +"bas niveau et la méthode :meth:`loop.create_connection`." #: library/asyncio-stream.rst:556 msgid "" @@ -462,3 +585,5 @@ msgid "" "` example uses the low-level :meth:`loop." "add_reader` method to watch a file descriptor." msgstr "" +"L'exemple :ref:`asyncio_example_watch_fd` utilise la méthode de bas niveau :" +"meth:`loop.add_reader` pour surveiller un descripteur de fichier." diff --git a/library/asyncio-subprocess.po b/library/asyncio-subprocess.po index e93b9831..a74da26f 100644 --- a/library/asyncio-subprocess.po +++ b/library/asyncio-subprocess.po @@ -6,14 +6,14 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-01-15 22:33+0100\n" -"PO-Revision-Date: 2023-03-19 14:41+0100\n" -"Last-Translator: Julien Palard \n" +"PO-Revision-Date: 2023-06-17 10:31+0200\n" +"Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \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" +"X-Generator: Poedit 3.2.2\n" #: library/asyncio-subprocess.rst:7 msgid "Subprocesses" @@ -24,6 +24,8 @@ msgid "" "**Source code:** :source:`Lib/asyncio/subprocess.py`, :source:`Lib/asyncio/" "base_subprocess.py`" msgstr "" +"**Code source :** :source:`Lib/asyncio/subprocess.py`, :source:`Lib/asyncio/" +"base_subprocess.py`" #: library/asyncio-subprocess.rst:14 msgid "" @@ -46,7 +48,6 @@ msgid "will print::" msgstr "affiche ::" #: library/asyncio-subprocess.rst:46 -#, fuzzy msgid "" "Because all asyncio subprocess functions are asynchronous and asyncio " "provides many tools to work with such functions, it is easy to execute and " @@ -56,7 +57,8 @@ msgstr "" "Puisque toutes les fonctions à sous-processus d'*asyncio* sont synchrones et " "qu'*asyncio* fournit de nombreux outils pour travailler avec de telles " "fonctions, il est facile d'exécuter et de surveiller de nombreux processus " -"en parallèle ::" +"en parallèle. Il est en effet trivial de modifier l'exemple ci-dessus pour " +"exécuter plusieurs commandes simultanément ::" #: library/asyncio-subprocess.rst:58 msgid "See also the `Examples`_ subsection." @@ -92,9 +94,10 @@ msgstr "" "Voir la documentation de :meth:`loop.subprocess_exec` pour d'autres " "paramètres." +# suit un : #: library/asyncio-subprocess.rst:78 library/asyncio-subprocess.rst:105 msgid "Removed the *loop* parameter." -msgstr "Suppression du paramètre *loop*." +msgstr "suppression du paramètre *loop*." #: library/asyncio-subprocess.rst:85 msgid "Run the *cmd* shell command." @@ -124,18 +127,18 @@ msgstr "" "caractères spéciaux dans les chaînes utilisées pour construire des commandes " "shell." +# suit un : #: library/asyncio-subprocess.rst:110 msgid "" "Subprocesses are available for Windows if a :class:`ProactorEventLoop` is " "used. See :ref:`Subprocess Support on Windows ` " "for details." msgstr "" -"Les sous-processus sont disponibles pour Windows si un :class:" +"les sous-processus sont disponibles pour Windows si un :class:" "`ProactorEventLoop` est utilisé. Voir :ref:`Support des sous-processus sous " "Windows ` pour plus de précisions." #: library/asyncio-subprocess.rst:116 -#, fuzzy msgid "" "asyncio also has the following *low-level* APIs to work with subprocesses: :" "meth:`loop.subprocess_exec`, :meth:`loop.subprocess_shell`, :meth:`loop." @@ -144,7 +147,10 @@ msgid "" "Protocols `." msgstr "" "*asyncio* propose aussi les API de « bas niveau » suivantes pour travailler " -"avec les sous-processus :" +"avec les sous-processus : :meth:`loop.subprocess_exec`, :meth:`loop." +"subprocess_shell`, :meth:`loop.connect_read_pipe`, :meth:`loop." +"connect_write_pipe`, ainsi que les :ref:`asyncio-subprocess-transports` et :" +"ref:`asyncio-subprocess-protocols`." #: library/asyncio-subprocess.rst:124 msgid "Constants" @@ -171,7 +177,7 @@ msgid "" "` attributes will point to :class:" "`StreamReader` instances." msgstr "" -"Si *PIPE* est passé au paramètre *stdout* ou *stderr* , l'attribut :attr:" +"Si *PIPE* est passé au paramètre *stdout* ou *stderr*, l'attribut :attr:" "`Process.stdout ` et :attr:`Process." "stderr ` pointeront vers des instances " "de :class:`StreamReader`." @@ -205,24 +211,34 @@ msgid "" "level wrapper that allows communicating with subprocesses and watching for " "their completion." msgstr "" +"Les fonctions :func:`create_subprocess_exec` et :func:" +"`create_subprocess_shell` renvoient des instances de la classe *Process*. " +"*Process* est une enveloppe de haut niveau qui permet de communiquer avec " +"les sous-processus et de surveiller leur achèvement." #: library/asyncio-subprocess.rst:165 msgid "" "An object that wraps OS processes created by the :func:" "`create_subprocess_exec` and :func:`create_subprocess_shell` functions." msgstr "" +"Objet qui encapsule les processus du système d'exploitation créés par les " +"fonctions :func:`create_subprocess_exec` et :func:`create_subprocess_shell`." #: library/asyncio-subprocess.rst:169 msgid "" "This class is designed to have a similar API to the :class:`subprocess." "Popen` class, but there are some notable differences:" msgstr "" +"Cette classe est conçue pour avoir une API similaire à la classe :class:" +"`subprocess.Popen`, mais il existe quelques différences notables :" #: library/asyncio-subprocess.rst:173 msgid "" "unlike Popen, Process instances do not have an equivalent to the :meth:" "`~subprocess.Popen.poll` method;" msgstr "" +"contrairement à *Popen*, les instances Process n'ont pas d'équivalent à la " +"méthode :meth:`~subprocess.Popen.poll` ;" #: library/asyncio-subprocess.rst:176 msgid "" @@ -230,6 +246,9 @@ msgid "" "subprocess.Process.wait` methods don't have a *timeout* parameter: use the :" "func:`~asyncio.wait_for` function;" msgstr "" +"les méthodes :meth:`~asyncio.subprocess.Process.communicate` et :meth:" +"`~asyncio.subprocess.Process.wait` n'ont pas de paramètre *timeout* : " +"utilisez la fonction :func:`~asyncio.wait_for` ;" #: library/asyncio-subprocess.rst:180 msgid "" @@ -237,6 +256,9 @@ msgid "" "asynchronous, whereas :meth:`subprocess.Popen.wait` method is implemented as " "a blocking busy loop;" msgstr "" +":meth:`asyncio.subprocess.Process.wait` est asynchrone, tandis que la " +"méthode :meth:`subprocess.Popen.wait` est implémentée comme une boucle " +"bloquante ;" #: library/asyncio-subprocess.rst:184 msgid "the *universal_newlines* parameter is not supported." @@ -264,6 +286,7 @@ msgstr "Attend que le sous processus s'arrête." msgid "Set and return the :attr:`returncode` attribute." msgstr "Définit et renvoie l'attribut :attr:`returncode`." +# suit un : #: library/asyncio-subprocess.rst:199 msgid "" "This method can deadlock when using ``stdout=PIPE`` or ``stderr=PIPE`` and " @@ -271,7 +294,7 @@ msgid "" "pipe buffer to accept more data. Use the :meth:`communicate` method when " "using pipes to avoid this condition." msgstr "" -"Cette méthode peut générer un interblocage quand ``stdout=PIPE`` ou " +"cette méthode peut générer un interblocage quand ``stdout=PIPE`` ou " "``stderr=PIPE`` est utilisé et que le sous-processus génère tellement de " "sorties qu'il se bloque, dans l'attente que le tampon du tube côté OS " "accepte des données supplémentaires. Pour éviter cette situation, choisissez " @@ -283,13 +306,13 @@ msgstr "Interagit avec le processus :" #: library/asyncio-subprocess.rst:209 msgid "send data to *stdin* (if *input* is not ``None``);" -msgstr "envoie des données sur le *stdin* (si *input* n'est pas ``None``);" +msgstr "envoie des données sur le *stdin* (si *input* n'est pas ``None``) ;" #: library/asyncio-subprocess.rst:210 msgid "read data from *stdout* and *stderr*, until EOF is reached;" msgstr "" "lit les données sur *stdout* et *stderr*, jusqu'à ce que le EOF soit " -"atteint ;" +"atteint ;" #: library/asyncio-subprocess.rst:211 msgid "wait for process to terminate." @@ -305,7 +328,7 @@ msgstr "" #: library/asyncio-subprocess.rst:216 msgid "Return a tuple ``(stdout_data, stderr_data)``." -msgstr "Renvoie un tuple ``(stdout_data, stderr_data)``." +msgstr "Renvoie un *n*-uplet ``(stdout_data, stderr_data)``." #: library/asyncio-subprocess.rst:218 msgid "" @@ -314,6 +337,10 @@ msgid "" "condition occurs when the process exits before all data are written into " "*stdin*." msgstr "" +"Si l'une des exceptions :exc:`BrokenPipeError` ou :exc:" +"`ConnectionResetError` est levée lors de l'écriture de *input* dans *stdin*, " +"l'exception est ignorée. Cette condition se produit lorsque le processus se " +"termine avant que toutes les données ne soient écrites dans *stdin*." #: library/asyncio-subprocess.rst:223 msgid "" @@ -322,6 +349,10 @@ msgid "" "``None`` in the result tuple, the process has to be created with " "``stdout=PIPE`` and/or ``stderr=PIPE`` arguments." msgstr "" +"Si vous souhaitez envoyer des données au processus *stdin*, le processus " +"doit être créé avec ``stdin=PIPE``. De même, pour obtenir autre chose que " +"``None`` dans le *n*-uplet résultat, le processus doit être créé avec les " +"arguments ``stdout=PIPE`` et/ou ``stderr=PIPE``." #: library/asyncio-subprocess.rst:229 msgid "" @@ -335,13 +366,14 @@ msgstr "" msgid "Sends the signal *signal* to the child process." msgstr "Envoie le signal *signal* au sous-processus." +# suit un : #: library/asyncio-subprocess.rst:238 msgid "" "On Windows, :py:data:`SIGTERM` is an alias for :meth:`terminate`. " "``CTRL_C_EVENT`` and ``CTRL_BREAK_EVENT`` can be sent to processes started " "with a *creationflags* parameter which includes ``CREATE_NEW_PROCESS_GROUP``." msgstr "" -"Sous Windows, :py:data:`SIGTERM` est un alias pour :meth:`terminate`. " +"sous Windows, :py:data:`SIGTERM` est un alias pour :meth:`terminate`. " "*CTRL_C_EVENT* et *CTRL_BREAK_EVENT* peuvent être envoyés aux processus " "démarrés avec un paramètre *creationflags* incluant " "``CREATE_NEW_PROCESS_GROUP``." @@ -363,6 +395,8 @@ msgid "" "On Windows the Win32 API function :c:func:`TerminateProcess` is called to " "stop the child process." msgstr "" +"Sous Windows, la fonction API Win32 :c:func:`TerminateProcess` est appelée " +"pour arrêter le processus enfant." #: library/asyncio-subprocess.rst:255 msgid "Kill the child process." @@ -384,19 +418,26 @@ msgid "" "Standard input stream (:class:`StreamWriter`) or ``None`` if the process was " "created with ``stdin=None``." msgstr "" +"Flux d'entrée standard (:class:`StreamWriter`) ou ``None`` si le processus a " +"été créé avec ``stdin=None``." #: library/asyncio-subprocess.rst:269 msgid "" "Standard output stream (:class:`StreamReader`) or ``None`` if the process " "was created with ``stdout=None``." msgstr "" +"Flux de sortie standard (:class:`StreamReader`) ou ``None`` si le processus " +"a été créé avec ``stdout=None``." #: library/asyncio-subprocess.rst:274 msgid "" "Standard error stream (:class:`StreamReader`) or ``None`` if the process was " "created with ``stderr=None``." msgstr "" +"Flux d'erreur standard (:class:`StreamReader`) ou ``None`` si le processus a " +"été créé avec ``stderr=None``." +# suit un : #: library/asyncio-subprocess.rst:279 msgid "" "Use the :meth:`communicate` method rather than :attr:`process.stdin.write() " @@ -404,6 +445,10 @@ msgid "" "process.stderr.read() `. This avoids deadlocks due to streams " "pausing reading or writing and blocking the child process." msgstr "" +"utilisez la méthode :meth:`communicate` plutôt que :attr:`process.stdin." +"write() `, :attr:`wait process.stdout.read() ` ou :attr:`wait " +"process.stderr.read() `. Cela évite les interblocages dus aux flux " +"qui interrompent la lecture ou l'écriture et bloquent le processus enfant." #: library/asyncio-subprocess.rst:288 msgid "Process identification number (PID)." @@ -416,6 +461,8 @@ msgid "" "Note that for processes created by the :func:`create_subprocess_shell` " "function, this attribute is the PID of the spawned shell." msgstr "" +"Notez que pour les processus créés par la fonction :func:" +"`create_subprocess_shell`, cet attribut est le PID du shell généré." #: library/asyncio-subprocess.rst:295 msgid "Return code of the process when it exits." @@ -423,7 +470,7 @@ msgstr "Code de retour du processus quand il se termine." #: library/asyncio-subprocess.rst:297 msgid "A ``None`` value indicates that the process has not terminated yet." -msgstr "" +msgstr "Une valeur ``None`` indique que le processus n'est pas encore terminé." #: library/asyncio-subprocess.rst:299 msgid "" @@ -442,24 +489,34 @@ msgid "" "Standard asyncio event loop supports running subprocesses from different " "threads by default." msgstr "" +"La boucle d'événement asynchrone standard prend en charge l'exécution de " +"sous-processus à partir de différents fils d'exécution par défaut." #: library/asyncio-subprocess.rst:311 msgid "" "On Windows subprocesses are provided by :class:`ProactorEventLoop` only " "(default), :class:`SelectorEventLoop` has no subprocess support." msgstr "" +"Sous Windows, les sous-processus sont fournis par :class:`ProactorEventLoop` " +"uniquement (par défaut), :class:`SelectorEventLoop` ne prend pas en charge " +"les sous-processus." #: library/asyncio-subprocess.rst:314 msgid "" "On UNIX *child watchers* are used for subprocess finish waiting, see :ref:" "`asyncio-watchers` for more info." msgstr "" +"Sous UNIX, les *observateurs d'enfants (child watchers)* sont utilisés pour " +"l'attente de fin de sous-processus, voir :ref:`asyncio-watchers` pour plus " +"d'informations." #: library/asyncio-subprocess.rst:320 msgid "" "UNIX switched to use :class:`ThreadedChildWatcher` for spawning subprocesses " "from different threads without any limitation." msgstr "" +"UNIX est passé à l'utilisation de :class:`ThreadedChildWatcher` pour générer " +"des sous-processus à partir de différents threads sans aucune limitation." #: library/asyncio-subprocess.rst:323 msgid "" @@ -478,12 +535,13 @@ msgstr "" "comporter leurs propres limitations. Veuillez vous référer à leur " "documentation." +# suit un : #: library/asyncio-subprocess.rst:331 msgid "" "The :ref:`Concurrency and multithreading in asyncio ` section." msgstr "" -"La section :ref:`Exécution concurrente et multi-fils d'exécution `." #: library/asyncio-subprocess.rst:336 diff --git a/library/asyncio-sync.po b/library/asyncio-sync.po index 23da6c14..6757fc30 100644 --- a/library/asyncio-sync.po +++ b/library/asyncio-sync.po @@ -6,34 +6,40 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-01-15 22:33+0100\n" -"PO-Revision-Date: 2018-10-15 00:46+0200\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2023-06-11 16:49+0200\n" +"Last-Translator: Christophe Nanteuil \n" "Language-Team: FRENCH \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.2.2\n" #: library/asyncio-sync.rst:7 -#, fuzzy msgid "Synchronization Primitives" msgstr "Primitives de synchronisation" #: library/asyncio-sync.rst:9 msgid "**Source code:** :source:`Lib/asyncio/locks.py`" -msgstr "" +msgstr "**Code source :** :source:`Lib/asyncio/locks.py`" #: library/asyncio-sync.rst:13 msgid "" "asyncio synchronization primitives are designed to be similar to those of " "the :mod:`threading` module with two important caveats:" msgstr "" +"Les primitives de synchronisation *asyncio* sont conçues pour être " +"similaires à celles du module :mod:`threading` avec deux mises en garde " +"importantes :" #: library/asyncio-sync.rst:16 msgid "" "asyncio primitives are not thread-safe, therefore they should not be used " "for OS thread synchronization (use :mod:`threading` for that);" msgstr "" +"les primitives *asyncio* ne sont pas *thread-safe*, elles ne doivent donc " +"pas être utilisées pour la synchronisation des fils d'exécution du système " +"d'exploitation (utilisez :mod:`threading` pour cela) ;" #: library/asyncio-sync.rst:20 msgid "" @@ -41,10 +47,14 @@ msgid "" "argument; use the :func:`asyncio.wait_for` function to perform operations " "with timeouts." msgstr "" +"les méthodes de ces primitives de synchronisation n'acceptent pas l'argument " +"*timeout* ; utilisez la fonction :func:`asyncio.wait_for` pour effectuer des " +"opérations avec des délais d'attente." #: library/asyncio-sync.rst:24 msgid "asyncio has the following basic synchronization primitives:" msgstr "" +"*asyncio* possède les primitives de synchronisation de base suivantes :" #: library/asyncio-sync.rst:26 msgid ":class:`Lock`" @@ -67,89 +77,104 @@ msgid ":class:`BoundedSemaphore`" msgstr ":class:`BoundedSemaphore`" #: library/asyncio-sync.rst:31 -#, fuzzy msgid ":class:`Barrier`" -msgstr ":class:`Semaphore`" +msgstr ":class:`Barrier`" #: library/asyncio-sync.rst:38 msgid "Lock" -msgstr "" +msgstr "Verrou (*lock*)" #: library/asyncio-sync.rst:42 msgid "Implements a mutex lock for asyncio tasks. Not thread-safe." msgstr "" +"Implémente un verrou exclusif (*mutex*) pour les tâches asynchrones. Ce " +"n'est pas compatible avec les programmes à fils d'exécution multiples." #: library/asyncio-sync.rst:44 msgid "" "An asyncio lock can be used to guarantee exclusive access to a shared " "resource." msgstr "" +"Un verrou *asyncio* peut être utilisé pour garantir un accès exclusif à une " +"ressource partagée." #: library/asyncio-sync.rst:47 msgid "The preferred way to use a Lock is an :keyword:`async with` statement::" msgstr "" +"La meilleure façon d'utiliser un verrou est une instruction :keyword:`async " +"with` ::" #: library/asyncio-sync.rst:199 library/asyncio-sync.rst:298 msgid "which is equivalent to::" -msgstr "" +msgstr "ce qui équivaut à ::" +# suit un : #: library/asyncio-sync.rst:112 library/asyncio-sync.rst:286 #: library/asyncio-sync.rst:341 -#, fuzzy msgid "Removed the *loop* parameter." -msgstr "Le paramètre *loop*." +msgstr "suppression du paramètre *loop*." #: library/asyncio-sync.rst:72 msgid "Acquire the lock." -msgstr "" +msgstr "Verrouille (ou acquiert) le verrou." #: library/asyncio-sync.rst:74 msgid "" "This method waits until the lock is *unlocked*, sets it to *locked* and " "returns ``True``." msgstr "" +"Cette méthode attend que le verrou soit déverrouillé (*unlocked*), le " +"verrouille (positionné sur *locked*) et renvoie ``True``." #: library/asyncio-sync.rst:77 msgid "" "When more than one coroutine is blocked in :meth:`acquire` waiting for the " "lock to be unlocked, only one coroutine eventually proceeds." msgstr "" +"Lorsque plus d'une coroutine est bloquée dans :meth:`acquire` en attendant " +"que le verrou soit déverrouillé, seule une coroutine continue finalement." #: library/asyncio-sync.rst:81 msgid "" "Acquiring a lock is *fair*: the coroutine that proceeds will be the first " "coroutine that started waiting on the lock." msgstr "" +"L'acquisition d'un verrou est *équitable* : la coroutine qui acquiert le " +"verrou est celle qui était la première à attendre le verrou." #: library/asyncio-sync.rst:86 msgid "Release the lock." -msgstr "Libère un verrou." +msgstr "Libère le verrou." #: library/asyncio-sync.rst:88 msgid "When the lock is *locked*, reset it to *unlocked* and return." -msgstr "" +msgstr "Lorsque le verrou est verrouillé, le déverrouille et termine." #: library/asyncio-sync.rst:90 msgid "If the lock is *unlocked*, a :exc:`RuntimeError` is raised." -msgstr "" +msgstr "Si le verrou est déjà déverrouillé, une :exc:`RuntimeError` est levée." #: library/asyncio-sync.rst:94 msgid "Return ``True`` if the lock is *locked*." -msgstr "Donne ``True`` si le verrou est verrouillé." +msgstr "Renvoie ``True`` si le verrou est verrouillé." #: library/asyncio-sync.rst:98 msgid "Event" -msgstr "" +msgstr "Événement (*Event*)" #: library/asyncio-sync.rst:102 msgid "An event object. Not thread-safe." msgstr "" +"Objet événement. Non compatible avec les programmes à plusieurs fils " +"d'exécution." #: library/asyncio-sync.rst:104 msgid "" "An asyncio event can be used to notify multiple asyncio tasks that some " "event has happened." msgstr "" +"Un événement asynchrone peut être utilisé pour notifier plusieurs tâches " +"asynchrones qu'un événement s'est produit." #: library/asyncio-sync.rst:107 msgid "" @@ -158,6 +183,11 @@ msgid "" "method. The :meth:`~Event.wait` method blocks until the flag is set to " "*true*. The flag is set to *false* initially." msgstr "" +"Un objet *Event* gère un drapeau interne qui peut être activé (ou mis à " +"*vrai*) avec la méthode :meth:`~Event.set` et désactivé (ou mis à *faux*) " +"avec la méthode :meth:`clear`. La méthode :meth:`~Event.wait` se bloque " +"jusqu'à ce que l'indicateur soit activé. L'indicateur est initialement " +"désactivé." #: library/asyncio-sync.rst:365 msgid "Example::" @@ -165,49 +195,59 @@ msgstr "Exemple ::" #: library/asyncio-sync.rst:142 msgid "Wait until the event is set." -msgstr "Attend que l'évènement ait une valeur." +msgstr "Attend que l'évènement soit activé." #: library/asyncio-sync.rst:144 msgid "" "If the event is set, return ``True`` immediately. Otherwise block until " "another task calls :meth:`~Event.set`." msgstr "" +"Si l'événement est activé (*vrai*), renvoie ``True`` immédiatement. Sinon " +"bloque jusqu'à ce qu'une autre tâche appelle :meth:`~Event.set`." #: library/asyncio-sync.rst:149 msgid "Set the event." -msgstr "" +msgstr "Active l'événement." #: library/asyncio-sync.rst:151 msgid "All tasks waiting for event to be set will be immediately awakened." msgstr "" +"Toutes les tâches en attente de l'événement sont immédiatement réveillées." #: library/asyncio-sync.rst:156 msgid "Clear (unset) the event." -msgstr "" +msgstr "Efface (désactive) l'événement." #: library/asyncio-sync.rst:158 msgid "" "Tasks awaiting on :meth:`~Event.wait` will now block until the :meth:`~Event." "set` method is called again." msgstr "" +"Les tâches en attente sur :meth:`~Event.wait` seront désormais bloquées " +"jusqu'à ce que la méthode :meth:`~Event.set` soit à nouveau appelée." #: library/asyncio-sync.rst:163 msgid "Return ``True`` if the event is set." -msgstr "Renvoie ``True`` si l'évènement a une valeur." +msgstr "Renvoie ``True`` si l'évènement est actif." #: library/asyncio-sync.rst:167 msgid "Condition" -msgstr "" +msgstr "Condition" #: library/asyncio-sync.rst:171 msgid "A Condition object. Not thread-safe." msgstr "" +"Objet Condition. Non compatible avec les programmes à plusieurs fils " +"d'exécution." #: library/asyncio-sync.rst:173 msgid "" "An asyncio condition primitive can be used by a task to wait for some event " "to happen and then get exclusive access to a shared resource." msgstr "" +"Une primitive de condition asynchrone peut être utilisée par une tâche pour " +"attendre qu'un événement se produise, puis obtenir un accès exclusif à une " +"ressource partagée." #: library/asyncio-sync.rst:177 msgid "" @@ -217,33 +257,46 @@ msgid "" "shared resource between different tasks interested in particular states of " "that shared resource." msgstr "" +"Essentiellement, un objet *Condition* combine les fonctionnalités d'un :" +"class:`Event` et d'un :class:`Lock`. Il est possible que plusieurs objets " +"*Condition* partagent un seul verrou, ce qui permet de coordonner l'accès " +"exclusif à une ressource partagée entre différentes tâches intéressées par " +"des états particuliers de cette ressource partagée." #: library/asyncio-sync.rst:183 msgid "" "The optional *lock* argument must be a :class:`Lock` object or ``None``. In " "the latter case a new Lock object is created automatically." msgstr "" +"L'argument optionnel *lock* doit être un objet :class:`Lock` ou ``None``. " +"Dans ce dernier cas, un nouvel objet *Lock* est créé automatiquement." #: library/asyncio-sync.rst:190 msgid "" "The preferred way to use a Condition is an :keyword:`async with` statement::" msgstr "" +"La meilleure façon d'utiliser une *Condition* est une instruction :keyword:" +"`async with` ::" #: library/asyncio-sync.rst:212 msgid "Acquire the underlying lock." -msgstr "" +msgstr "Verrouille le verrou sous-jacent." #: library/asyncio-sync.rst:214 msgid "" "This method waits until the underlying lock is *unlocked*, sets it to " "*locked* and returns ``True``." msgstr "" +"Cette méthode attend que le verrou sous-jacent soit déverrouillé, le " +"verrouille et renvoie ``True``." #: library/asyncio-sync.rst:219 msgid "" "Wake up at most *n* tasks (1 by default) waiting on this condition. The " "method is no-op if no tasks are waiting." msgstr "" +"Réveille au plus *n* tâches (1 par défaut) en attente de cette condition. La " +"méthode ne fait rien si aucune tâche n'est en attente." #: library/asyncio-sync.rst:237 msgid "" @@ -251,18 +304,23 @@ msgid "" "after. If called with an *unlocked* lock a :exc:`RuntimeError` error is " "raised." msgstr "" +"Le verrou doit être verrouillé avant que cette méthode ne soit appelée et " +"libéré peu de temps après. S'il est appelé avec un verrou déverrouillé, une " +"erreur :exc:`RuntimeError` est levée." #: library/asyncio-sync.rst:228 msgid "Return ``True`` if the underlying lock is acquired." -msgstr "" +msgstr "Renvoie ``True`` si le verrou sous-jacent est verrouillé." #: library/asyncio-sync.rst:232 msgid "Wake up all tasks waiting on this condition." -msgstr "" +msgstr "Réveille toutes les tâches en attente sur cette condition." #: library/asyncio-sync.rst:234 msgid "This method acts like :meth:`notify`, but wakes up all waiting tasks." msgstr "" +"Cette méthode agit comme :meth:`notify`, mais réveille toutes les tâches en " +"attente." #: library/asyncio-sync.rst:243 msgid "Release the underlying lock." @@ -271,16 +329,20 @@ msgstr "Libère le verrou sous-jacent." #: library/asyncio-sync.rst:245 msgid "When invoked on an unlocked lock, a :exc:`RuntimeError` is raised." msgstr "" +"Lorsqu'elle est invoquée sur un verrou déverrouillé, une :exc:`RuntimeError` " +"est levée." #: library/asyncio-sync.rst:250 msgid "Wait until notified." -msgstr "Attends d'être notifié." +msgstr "Attend d'être notifié." #: library/asyncio-sync.rst:252 msgid "" "If the calling task has not acquired the lock when this method is called, a :" "exc:`RuntimeError` is raised." msgstr "" +"Si la tâche appelante n'a pas verrouillé le verrou lorsque cette méthode est " +"appelée, une :exc:`RuntimeError` est levée." #: library/asyncio-sync.rst:255 msgid "" @@ -288,16 +350,22 @@ msgid "" "awakened by a :meth:`notify` or :meth:`notify_all` call. Once awakened, the " "Condition re-acquires its lock and this method returns ``True``." msgstr "" +"Cette méthode libère le verrou sous-jacent, puis se bloque jusqu'à ce " +"qu'elle soit réveillée par un appel :meth:`notify` ou :meth:`notify_all`. " +"Une fois réveillée, la *Condition* verrouille à nouveau son verrou et cette " +"méthode renvoie ``True``." #: library/asyncio-sync.rst:262 msgid "Wait until a predicate becomes *true*." -msgstr "Attends jusqu'à ce qu'un prédicat devienne vrai." +msgstr "Attend jusqu'à ce qu'un prédicat devienne vrai." #: library/asyncio-sync.rst:264 msgid "" "The predicate must be a callable which result will be interpreted as a " "boolean value. The final value is the return value." msgstr "" +"Le prédicat doit être un appelable dont le résultat est interprété comme une " +"valeur booléenne. La valeur finale est la valeur de retour." #: library/asyncio-sync.rst:270 msgid "Semaphore" @@ -306,6 +374,8 @@ msgstr "Sémaphore" #: library/asyncio-sync.rst:274 msgid "A Semaphore object. Not thread-safe." msgstr "" +"Objet *Sémaphore*. Non compatible avec les programmes à plusieurs fils " +"d'exécution." #: library/asyncio-sync.rst:276 msgid "" @@ -314,6 +384,11 @@ msgid "" "never go below zero; when :meth:`acquire` finds that it is zero, it blocks, " "waiting until some task calls :meth:`release`." msgstr "" +"Un sémaphore gère un compteur interne qui est décrémenté à chaque appel :" +"meth:`acquire` et incrémenté à chaque appel :meth:`release`. Le compteur ne " +"peut jamais descendre en dessous de zéro ; quand :meth:`acquire` trouve " +"qu'il est égal à zéro, il se bloque, en attendant qu'une tâche appelle :meth:" +"`release`." #: library/asyncio-sync.rst:282 msgid "" @@ -321,15 +396,20 @@ msgid "" "counter (``1`` by default). If the given value is less than ``0`` a :exc:" "`ValueError` is raised." msgstr "" +"L'argument optionnel *value* donne la valeur initiale du compteur interne " +"(``1`` par défaut). Si la valeur donnée est inférieure à ``0`` une :exc:" +"`ValueError` est levée." #: library/asyncio-sync.rst:289 msgid "" "The preferred way to use a Semaphore is an :keyword:`async with` statement::" msgstr "" +"La meilleure façon d'utiliser un sémaphore est une instruction :keyword:" +"`async with` ::" #: library/asyncio-sync.rst:311 msgid "Acquire a semaphore." -msgstr "" +msgstr "Acquiert un sémaphore." #: library/asyncio-sync.rst:313 msgid "" @@ -337,30 +417,40 @@ msgid "" "``True`` immediately. If it is zero, wait until a :meth:`release` is called " "and return ``True``." msgstr "" +"Si le compteur interne est supérieur à zéro, le décrémente d'une unité et " +"renvoie ``True`` immédiatement. Si c'est zéro, attend que :meth:`release` " +"soit appelée et renvoie ``True``." #: library/asyncio-sync.rst:319 msgid "Returns ``True`` if semaphore can not be acquired immediately." msgstr "" +"Renvoie ``True`` si le sémaphore ne peut pas être acquis immédiatement." #: library/asyncio-sync.rst:323 msgid "" "Release a semaphore, incrementing the internal counter by one. Can wake up a " "task waiting to acquire the semaphore." msgstr "" +"Relâche un sémaphore, incrémentant le compteur interne d'une unité. Peut " +"réveiller une tâche en attente d'acquisition du sémaphore." #: library/asyncio-sync.rst:326 msgid "" "Unlike :class:`BoundedSemaphore`, :class:`Semaphore` allows making more " "``release()`` calls than ``acquire()`` calls." msgstr "" +"Contrairement à :class:`BoundedSemaphore`, :class:`Semaphore` permet de " +"faire plus d'appels ``release()`` que d'appels ``acquire()``." #: library/asyncio-sync.rst:331 msgid "BoundedSemaphore" -msgstr "BoundedSemaphore" +msgstr "Sémaphore capé (*BoundedSemaphore*)" #: library/asyncio-sync.rst:335 msgid "A bounded semaphore object. Not thread-safe." msgstr "" +"Objet sémaphore capé. Non compatible avec les programmes à plusieurs fils " +"d'exécution." #: library/asyncio-sync.rst:337 msgid "" @@ -368,14 +458,19 @@ msgid "" "`ValueError` in :meth:`~Semaphore.release` if it increases the internal " "counter above the initial *value*." msgstr "" +"*Bounded Semaphore* est une version de :class:`Semaphore` qui lève une :exc:" +"`ValueError` dans :meth:`~Semaphore.release` s'il augmente le compteur " +"interne au-dessus de la *value* initiale." #: library/asyncio-sync.rst:346 msgid "Barrier" -msgstr "" +msgstr "Barrière (*Barrier*)" #: library/asyncio-sync.rst:350 msgid "A barrier object. Not thread-safe." msgstr "" +"Objet barrière. Non compatible avec les programmes à plusieurs fils " +"d'exécution." #: library/asyncio-sync.rst:352 msgid "" @@ -385,26 +480,35 @@ msgid "" "tasks end up waiting on :meth:`~Barrier.wait`. At that point all of the " "waiting tasks would unblock simultaneously." msgstr "" +"Une barrière est une simple primitive de synchronisation qui permet de " +"bloquer jusqu'à ce que *parties* tâches l'attendent. Les tâches attendent " +"sur la méthode :meth:`~Barrier.wait` et sont bloquées jusqu'à ce que le " +"nombre spécifié de tâches attendent sur :meth:`~Barrier.wait`. À ce stade, " +"toutes les tâches en attente se débloquent simultanément." #: library/asyncio-sync.rst:358 msgid "" ":keyword:`async with` can be used as an alternative to awaiting on :meth:" "`~Barrier.wait`." msgstr "" +":keyword:`async with` peut être utilisé comme alternative à l'attente sur :" +"meth:`~Barrier.wait`." #: library/asyncio-sync.rst:361 msgid "The barrier can be reused any number of times." -msgstr "" +msgstr "La barrière peut être réutilisée un nombre illimité de fois." #: library/asyncio-sync.rst:388 msgid "Result of this example is::" -msgstr "" +msgstr "Le résultat de cet exemple est ::" #: library/asyncio-sync.rst:399 msgid "" "Pass the barrier. When all the tasks party to the barrier have called this " "function, they are all unblocked simultaneously." msgstr "" +"Passe la barrière. Lorsque toutes les tâches bloquées à la barrière ont " +"appelé cette fonction, elles sont toutes débloquées simultanément." #: library/asyncio-sync.rst:402 msgid "" @@ -412,6 +516,9 @@ msgid "" "the barrier which stays in the same state. If the state of the barrier is " "\"filling\", the number of waiting task decreases by 1." msgstr "" +"Lorsqu'une tâche en attente ou bloquée à la barrière est annulée, cette " +"tâche sort de la barrière qui reste dans le même état. Si la barrière est en " +"cours de « remplissage », le nombre de tâche en attente diminue de 1." #: library/asyncio-sync.rst:407 msgid "" @@ -419,6 +526,9 @@ msgid "" "for each task. This can be used to select a task to do some special " "housekeeping, e.g.::" msgstr "" +"La valeur de retour est un entier compris entre 0 et ``parties-1``, " +"différent pour chaque tâche. Cela peut être utilisé pour sélectionner une " +"tâche qui fera du ménage, par exemple ::" #: library/asyncio-sync.rst:417 msgid "" @@ -426,18 +536,25 @@ msgid "" "is broken or reset while a task is waiting. It could raise a :exc:" "`CancelledError` if a task is cancelled." msgstr "" +"Cette méthode peut lever une exception :class:`BrokenBarrierError` si la " +"barrière est brisée ou réinitialisée alors qu'une tâche est en attente. Cela " +"peut lever une :exc:`CancelledError` si une tâche est annulée." #: library/asyncio-sync.rst:423 msgid "" "Return the barrier to the default, empty state. Any tasks waiting on it " "will receive the :class:`BrokenBarrierError` exception." msgstr "" +"Ramène la barrière à l'état vide par défaut. Toutes les tâches en attente " +"reçoivent l'exception :class:`BrokenBarrierError`." #: library/asyncio-sync.rst:426 msgid "" "If a barrier is broken it may be better to just leave it and create a new " "one." msgstr "" +"Si une barrière est brisée, il peut être préférable de la quitter et d'en " +"créer une nouvelle." #: library/asyncio-sync.rst:430 msgid "" @@ -445,28 +562,40 @@ msgid "" "to :meth:`wait` to fail with the :class:`BrokenBarrierError`. Use this for " "example if one of the tasks needs to abort, to avoid infinite waiting tasks." msgstr "" +"Met la barrière dans un état cassé. Cela provoque l'échec de tout appel " +"actif ou futur à :meth:`wait` avec une :class:`BrokenBarrierError`. Utilisez " +"ceci par exemple si l'une des tâches doit être abandonnée, pour éviter des " +"tâches en attente infinie." #: library/asyncio-sync.rst:437 msgid "The number of tasks required to pass the barrier." -msgstr "" +msgstr "Le nombre de tâches nécessaires pour franchir la barrière." #: library/asyncio-sync.rst:441 msgid "The number of tasks currently waiting in the barrier while filling." msgstr "" +"Le nombre de tâches actuellement en attente à la barrière pendant le " +"remplissage." #: library/asyncio-sync.rst:445 msgid "A boolean that is ``True`` if the barrier is in the broken state." -msgstr "" +msgstr "Booléen qui vaut ``True`` si la barrière est rompue." #: library/asyncio-sync.rst:450 msgid "" "This exception, a subclass of :exc:`RuntimeError`, is raised when the :class:" "`Barrier` object is reset or broken." msgstr "" +"Cette exception, une sous-classe de :exc:`RuntimeError`, est déclenchée " +"lorsque l'objet :class:`Barrier` est réinitialisé ou cassé." +# suit un : #: library/asyncio-sync.rst:458 msgid "" "Acquiring a lock using ``await lock`` or ``yield from lock`` and/or :keyword:" "`with` statement (``with await lock``, ``with (yield from lock)``) was " "removed. Use ``async with lock`` instead." msgstr "" +"l'acquisition d'un verrou en utilisant ``wait lock`` ou ``yield from lock`` " +"ou :keyword:`with` (``with await lock``, ``with (yield from lock)``) a été " +"supprimée. Utilisez ``async with lock`` à la place."