1
0
Fork 0

Backporting from 3.11 after upstream merge.

This commit is contained in:
Julien Palard 2023-03-22 23:00:40 +01:00
parent 422cb123ca
commit 7acacbb2a4
Signed by: mdk
GPG Key ID: 0EFC1AC1006886F8
13 changed files with 162 additions and 111 deletions

View File

@ -421,13 +421,12 @@ msgstr ""
"compiler :" "compiler :"
#: extending/embedding.rst:304 #: extending/embedding.rst:304
#, fuzzy
msgid "" msgid ""
"``pythonX.Y-config --ldflags --embed`` will give you the recommended flags " "``pythonX.Y-config --ldflags --embed`` will give you the recommended flags "
"when linking:" "when linking:"
msgstr "" msgstr ""
"``pythonX.Y-config --ldflags`` vous donnera les drapeaux recommandés lors de " "``pythonX.Y-config --ldflags --embed`` vous donnera les drapeaux recommandés "
"l'édition de lien :" "lors de l'édition de lien :"
#: extending/embedding.rst:313 #: extending/embedding.rst:313
msgid "" msgid ""

View File

@ -132,6 +132,11 @@ msgid ""
"parent's ``__annotations__``. In Python 3.10 and newer, the child class's " "parent's ``__annotations__``. In Python 3.10 and newer, the child class's "
"annotations will be an empty dict instead." "annotations will be an empty dict instead."
msgstr "" msgstr ""
"Dans les versions antérieures à Python 3.10, l'accès aux ``__annotations__`` "
"d'une classe qui n'a pas d'annotation mais dont un parent de cette classe en "
"a, aurait renvoyé les ``__annotations__`` de la classe parent. Dans les "
"versions 3.10 et plus récentes, le résultat d'annotations de la classe "
"enfant est un dictionnaire vide."
#: howto/annotations.rst:68 #: howto/annotations.rst:68
msgid "Accessing The Annotations Dict Of An Object In Python 3.9 And Older" msgid "Accessing The Annotations Dict Of An Object In Python 3.9 And Older"

View File

@ -526,7 +526,6 @@ msgstr ""
"Journalisation en production à l'aide d'un connecteur en écoute sur le réseau" "Journalisation en production à l'aide d'un connecteur en écoute sur le réseau"
#: howto/logging-cookbook.rst:770 #: howto/logging-cookbook.rst:770
#, fuzzy
msgid "" msgid ""
"To run a logging listener in production, you may need to use a process-" "To run a logging listener in production, you may need to use a process-"
"management tool such as `Supervisor <http://supervisord.org/>`_. `Here is a " "management tool such as `Supervisor <http://supervisord.org/>`_. `Here is a "
@ -534,84 +533,90 @@ msgid ""
"the above functionality using Supervisor. It consists of the following files:" "the above functionality using Supervisor. It consists of the following files:"
msgstr "" msgstr ""
"Pour de la journalisation en production *via* un connecteur réseau en " "Pour de la journalisation en production *via* un connecteur réseau en "
"écoute, il est probable que vous ayez besoin d'utiliser un outil de " "écoute, il est probable que vous ayez besoin dutiliser un outil de "
"surveillance tel que `Supervisor <http://supervisord.org/>`_. Vous trouverez " "surveillance tel que `Supervisor <http://supervisord.org/>`_. Vous trouverez "
"dans ce `Gist <https://gist.github.com/" "dans ce `Gist <socket-listener-gist_>`__ des gabarits pour assurer cette "
"vsajip/4b227eeec43817465ca835ca66f75e2b>`_ des gabarits pour assurer cette " "fonction avec *Supervisor*. Il est composé des fichiers suivants :"
"fonction avec *Supervisor* : vous aurez besoin de modifier les parties ``/"
"path/to/`` du *Gist* pour refléter les chemins réels que vous utilisez."
#: howto/logging-cookbook.rst:777 #: howto/logging-cookbook.rst:777
msgid "File" msgid "File"
msgstr "" msgstr "Fichier"
#: howto/logging-cookbook.rst:777 #: howto/logging-cookbook.rst:777
msgid "Purpose" msgid "Purpose"
msgstr "" msgstr "Objectif"
#: howto/logging-cookbook.rst:779 #: howto/logging-cookbook.rst:779
msgid ":file:`prepare.sh`" msgid ":file:`prepare.sh`"
msgstr "" msgstr ":file:`prepare.sh`"
#: howto/logging-cookbook.rst:779 #: howto/logging-cookbook.rst:779
msgid "A Bash script to prepare the environment for testing" msgid "A Bash script to prepare the environment for testing"
msgstr "" msgstr "Script Bash pour préparer l'environnement de test"
#: howto/logging-cookbook.rst:782 #: howto/logging-cookbook.rst:782
msgid ":file:`supervisor.conf`" msgid ":file:`supervisor.conf`"
msgstr "" msgstr ":file:`supervisor.conf`"
#: howto/logging-cookbook.rst:782 #: howto/logging-cookbook.rst:782
msgid "" msgid ""
"The Supervisor configuration file, which has entries for the listener and a " "The Supervisor configuration file, which has entries for the listener and a "
"multi-process web application" "multi-process web application"
msgstr "" msgstr ""
"Fichier de configuration de *Supervisor*, avec les entrées pour le "
"connecteur en écoute et l'application web multi-processus"
#: howto/logging-cookbook.rst:786 #: howto/logging-cookbook.rst:786
msgid ":file:`ensure_app.sh`" msgid ":file:`ensure_app.sh`"
msgstr "" msgstr ":file:`ensure_app.sh`"
#: howto/logging-cookbook.rst:786 #: howto/logging-cookbook.rst:786
msgid "" msgid ""
"A Bash script to ensure that Supervisor is running with the above " "A Bash script to ensure that Supervisor is running with the above "
"configuration" "configuration"
msgstr "" msgstr ""
"Script Bash pour s'assurer que *Supervisor* fonctionne bien avec la "
"configuration ci-dessus"
#: howto/logging-cookbook.rst:789 #: howto/logging-cookbook.rst:789
msgid ":file:`log_listener.py`" msgid ":file:`log_listener.py`"
msgstr "" msgstr ":file:`log_listener.py`"
#: howto/logging-cookbook.rst:789 #: howto/logging-cookbook.rst:789
msgid "" msgid ""
"The socket listener program which receives log events and records them to a " "The socket listener program which receives log events and records them to a "
"file" "file"
msgstr "" msgstr ""
"Programme en écoute sur le réseau qui reçoit les événements de "
"journalisation et les enregistre dans un fichier"
#: howto/logging-cookbook.rst:792 #: howto/logging-cookbook.rst:792
msgid ":file:`main.py`" msgid ":file:`main.py`"
msgstr "" msgstr ":file:`main.py`"
#: howto/logging-cookbook.rst:792 #: howto/logging-cookbook.rst:792
msgid "" msgid ""
"A simple web application which performs logging via a socket connected to " "A simple web application which performs logging via a socket connected to "
"the listener" "the listener"
msgstr "" msgstr "Application web simple qui journalise *via* un connecteur réseau"
#: howto/logging-cookbook.rst:795 #: howto/logging-cookbook.rst:795
msgid ":file:`webapp.json`" msgid ":file:`webapp.json`"
msgstr "" msgstr ":file:`webapp.json`"
#: howto/logging-cookbook.rst:795 #: howto/logging-cookbook.rst:795
msgid "A JSON configuration file for the web application" msgid "A JSON configuration file for the web application"
msgstr "" msgstr "Fichier JSON de configuration de l'application web"
#: howto/logging-cookbook.rst:797 #: howto/logging-cookbook.rst:797
msgid ":file:`client.py`" msgid ":file:`client.py`"
msgstr "" msgstr ":file:`client.py`"
#: howto/logging-cookbook.rst:797 #: howto/logging-cookbook.rst:797
msgid "A Python script to exercise the web application" msgid "A Python script to exercise the web application"
msgstr "" msgstr ""
"Script Python qui interagit avec l'application web pour effectuer des appels "
"à la journalisation"
#: howto/logging-cookbook.rst:800 #: howto/logging-cookbook.rst:800
msgid "" msgid ""
@ -621,20 +626,30 @@ msgid ""
"same log file without conflicting with one another --- they all go through " "same log file without conflicting with one another --- they all go through "
"the socket listener." "the socket listener."
msgstr "" msgstr ""
"L'application Web utilise `Gunicorn <https://gunicorn.org/>`_, qui est un "
"serveur d'applications Web populaire qui démarre plusieurs processus de "
"travail pour gérer les demandes. Cet exemple de configuration montre comment "
"les processus peuvent écrire dans le même fichier journal sans entrer en "
"conflit les uns avec les autres — ils passent tous par le connecteur en "
"écoute."
#: howto/logging-cookbook.rst:805 #: howto/logging-cookbook.rst:805
msgid "To test these files, do the following in a POSIX environment:" msgid "To test these files, do the following in a POSIX environment:"
msgstr "" msgstr ""
"Pour tester ces fichiers, suivez cette procédure dans un environnement "
"POSIX :"
#: howto/logging-cookbook.rst:807 #: howto/logging-cookbook.rst:807
msgid "" msgid ""
"Download `the Gist <socket-listener-gist_>`__ as a ZIP archive using the :" "Download `the Gist <socket-listener-gist_>`__ as a ZIP archive using the :"
"guilabel:`Download ZIP` button." "guilabel:`Download ZIP` button."
msgstr "" msgstr ""
"Téléchargez l'archive ZIP du `Gist <socket-listener-gist_>`__ à l'aide du "
"bouton :guilabel:`Download ZIP`."
#: howto/logging-cookbook.rst:810 #: howto/logging-cookbook.rst:810
msgid "Unzip the above files from the archive into a scratch directory." msgid "Unzip the above files from the archive into a scratch directory."
msgstr "" msgstr "Décompressez les fichiers de l'archive dans un répertoire de travail."
#: howto/logging-cookbook.rst:812 #: howto/logging-cookbook.rst:812
msgid "" msgid ""
@ -643,18 +658,27 @@ msgid ""
"files, and a :file:`venv` subdirectory to contain a virtual environment into " "files, and a :file:`venv` subdirectory to contain a virtual environment into "
"which ``bottle``, ``gunicorn`` and ``supervisor`` are installed." "which ``bottle``, ``gunicorn`` and ``supervisor`` are installed."
msgstr "" msgstr ""
"Dans le répertoire de travail, exécutez le script de préparation par ``bash "
"prepare.sh``. Cela crée un sous-répertoire :file:`run` pour contenir les "
"fichiers journaux et ceux relatifs à *Supervisor*, ainsi qu'un sous-"
"répertoire :file:`venv` pour contenir un environnement virtuel dans lequel "
"``bottle``, ``gunicorn`` et ``supervisor`` sont installés."
#: howto/logging-cookbook.rst:817 #: howto/logging-cookbook.rst:817
msgid "" msgid ""
"Run ``bash ensure_app.sh`` to ensure that Supervisor is running with the " "Run ``bash ensure_app.sh`` to ensure that Supervisor is running with the "
"above configuration." "above configuration."
msgstr "" msgstr ""
"Exécutez ``bash ensure_app.sh`` pour vous assurer que *Supervisor* s'exécute "
"avec la configuration ci-dessus."
#: howto/logging-cookbook.rst:820 #: howto/logging-cookbook.rst:820
msgid "" msgid ""
"Run ``venv/bin/python client.py`` to exercise the web application, which " "Run ``venv/bin/python client.py`` to exercise the web application, which "
"will lead to records being written to the log." "will lead to records being written to the log."
msgstr "" msgstr ""
"Exécutez ``venv/bin/python client.py`` pour tester l'application Web, ce qui "
"entraîne l'écriture d'enregistrements dans le journal."
#: howto/logging-cookbook.rst:823 #: howto/logging-cookbook.rst:823
msgid "" msgid ""
@ -663,18 +687,28 @@ msgid ""
"won't be in any particular order, since they have been handled concurrently " "won't be in any particular order, since they have been handled concurrently "
"by different worker processes in a non-deterministic way." "by different worker processes in a non-deterministic way."
msgstr "" msgstr ""
"Inspectez les fichiers journaux dans le sous-répertoire :file:`run`. Vous "
"devriez voir les lignes de journal les plus récentes dans les fichiers de "
"type :file:`app.log*`. Ils ne seront pas dans un ordre particulier, car ils "
"ont été traités par les différents processus de travail de manière non "
"déterministe."
#: howto/logging-cookbook.rst:828 #: howto/logging-cookbook.rst:828
msgid "" msgid ""
"You can shut down the listener and the web application by running ``venv/bin/" "You can shut down the listener and the web application by running ``venv/bin/"
"supervisorctl -c supervisor.conf shutdown``." "supervisorctl -c supervisor.conf shutdown``."
msgstr "" msgstr ""
"Vous pouvez arrêter le connecteur en écoute et l'application Web en "
"exécutant ``venv/bin/supervisorctl -c supervisor.conf shutdown``."
#: howto/logging-cookbook.rst:831 #: howto/logging-cookbook.rst:831
msgid "" msgid ""
"You may need to tweak the configuration files in the unlikely event that the " "You may need to tweak the configuration files in the unlikely event that the "
"configured ports clash with something else in your test environment." "configured ports clash with something else in your test environment."
msgstr "" msgstr ""
"Vous devrez peut-être modifier les fichiers de configuration dans le cas peu "
"probable où les ports configurés entrent en conflit avec autre chose dans "
"votre environnement de test."
#: howto/logging-cookbook.rst:837 #: howto/logging-cookbook.rst:837
msgid "Adding contextual information to your logging output" msgid "Adding contextual information to your logging output"
@ -1596,11 +1630,15 @@ msgid ""
"An example of how you can define a namer and rotator is given in the " "An example of how you can define a namer and rotator is given in the "
"following runnable script, which shows gzip compression of the log file::" "following runnable script, which shows gzip compression of the log file::"
msgstr "" msgstr ""
"Lextrait de code suivant fournit un exemple de la façon dont vous pouvez "
"définir un nom et un rotateur, avec la compression par *zlib* du journal ::"
#: howto/logging-cookbook.rst:2015 #: howto/logging-cookbook.rst:2015
msgid "" msgid ""
"After running this, you will see six new files, five of which are compressed:" "After running this, you will see six new files, five of which are compressed:"
msgstr "" msgstr ""
"Après l'avoir exécuté, vous verrez six nouveaux fichiers, dont cinq sont "
"compressés :"
#: howto/logging-cookbook.rst:2028 #: howto/logging-cookbook.rst:2028
msgid "A more elaborate multiprocessing example" msgid "A more elaborate multiprocessing example"

View File

@ -206,18 +206,16 @@ msgstr ""
"partir des arguments ajoutés à l'analyseur) ;" "partir des arguments ajoutés à l'analyseur) ;"
#: library/argparse.rst:157 #: library/argparse.rst:157
#, fuzzy
msgid "" msgid ""
"description_ - Text to display before the argument help (by default, no text)" "description_ - Text to display before the argument help (by default, no text)"
msgstr "" msgstr ""
"description_ Texte à afficher avant l'aide des arguments (par défaut : " "description_ Texte à afficher au dessus de l'aide pour les arguments (vide "
"vide) ;" "par défaut) ;"
#: library/argparse.rst:160 #: library/argparse.rst:160
#, fuzzy
msgid "epilog_ - Text to display after the argument help (by default, no text)" msgid "epilog_ - Text to display after the argument help (by default, no text)"
msgstr "" msgstr ""
"epilog_ Texte à afficher après l'aide des arguments (par défaut : vide) ;" "epilog_ Texte à afficher après l'aide des arguments (vide par défaut) ;"
#: library/argparse.rst:162 #: library/argparse.rst:162
msgid "" msgid ""
@ -828,11 +826,8 @@ msgstr ""
"converti ;" "converti ;"
#: library/argparse.rst:705 #: library/argparse.rst:705
#, fuzzy
msgid "choices_ - A sequence of the allowable values for the argument." msgid "choices_ - A sequence of the allowable values for the argument."
msgstr "" msgstr "choices_ La séquence de valeurs autorisées pour cet argument ;"
"choices_ Conteneur qui contient toutes les valeurs permises pour cet "
"argument ;"
#: library/argparse.rst:707 #: library/argparse.rst:707
msgid "" msgid ""
@ -1366,7 +1361,6 @@ msgid "choices"
msgstr "Le paramètre *choices*" msgstr "Le paramètre *choices*"
#: library/argparse.rst:1126 #: library/argparse.rst:1126
#, fuzzy
msgid "" msgid ""
"Some command-line arguments should be selected from a restricted set of " "Some command-line arguments should be selected from a restricted set of "
"values. These can be handled by passing a sequence object as the *choices* " "values. These can be handled by passing a sequence object as the *choices* "
@ -1375,32 +1369,29 @@ msgid ""
"be displayed if the argument was not one of the acceptable values::" "be displayed if the argument was not one of the acceptable values::"
msgstr "" msgstr ""
"Certains arguments de la ligne de commande doivent être choisis parmi un " "Certains arguments de la ligne de commande doivent être choisis parmi un "
"ensemble fermé de valeurs. Ceux-ci peuvent être gérés en passant un " "ensemble prédéfini de valeurs. Celles-ci doivent être déclarées dans la "
"conteneur à l'argument nommé *choices* de la méthode :meth:`~ArgumentParser." "séquence passée à l'argument *choices* de la méthode :meth:`~ArgumentParser."
"add_argument`. Quand la ligne de commande est analysée, les valeurs de " "add_argument`. Un message d'erreur est alors affiché si l'utilisateur passe "
"l'argument sont comparées et un message d'erreur est affiché si l'argument " "un argument qui n'est pas parmi les valeurs acceptables ::"
"n'est pas parmi les valeurs acceptables ::"
#: library/argparse.rst:1141 #: library/argparse.rst:1141
#, fuzzy
msgid "" msgid ""
"Note that inclusion in the *choices* sequence is checked after any type_ " "Note that inclusion in the *choices* sequence is checked after any type_ "
"conversions have been performed, so the type of the objects in the *choices* " "conversions have been performed, so the type of the objects in the *choices* "
"sequence should match the type_ specified::" "sequence should match the type_ specified::"
msgstr "" msgstr ""
"Prenez note que le test d'inclusion dans le conteur *choices* est fait après " "Prenez note que le test d'inclusion dans le conteneur *choices* est fait "
"la conversion de type_. Le type des objets dans le conteneur *choices* " "après la conversion de type_. Le type des objets dans le conteneur *choices* "
"doivent donc correspondre au type_ spécifié ::" "doit donc correspondre au type_ spécifié ::"
#: library/argparse.rst:1153 #: library/argparse.rst:1153
#, fuzzy
msgid "" msgid ""
"Any sequence can be passed as the *choices* value, so :class:`list` " "Any sequence can be passed as the *choices* value, so :class:`list` "
"objects, :class:`tuple` objects, and custom sequences are all supported." "objects, :class:`tuple` objects, and custom sequences are all supported."
msgstr "" msgstr ""
"N'importe quel conteneur peut être fourni pour la valeur de *choices*, donc " "N'importe quel séquence peut être utilisée comme valeur de *choices*, dont "
"les objets :class:`list`, les objets :class:`set` et les conteneurs " "les objets de type :class:`list`, :class:`set` ou des conteneurs "
"personnalisés sont tous acceptés." "personnalisés."
#: library/argparse.rst:1156 #: library/argparse.rst:1156
msgid "" msgid ""
@ -2145,16 +2136,15 @@ msgstr ""
"`open` pour plus de détails) ::" "`open` pour plus de détails) ::"
#: library/argparse.rst:1834 #: library/argparse.rst:1834
#, fuzzy
msgid "" msgid ""
"FileType objects understand the pseudo-argument ``'-'`` and automatically " "FileType objects understand the pseudo-argument ``'-'`` and automatically "
"convert this into :data:`sys.stdin` for readable :class:`FileType` objects " "convert this into :data:`sys.stdin` for readable :class:`FileType` objects "
"and :data:`sys.stdout` for writable :class:`FileType` objects::" "and :data:`sys.stdout` for writable :class:`FileType` objects::"
msgstr "" msgstr ""
"Les objets ``FileType`` reconnaissent le pseudo-argument ``'-'`` et en font " "Les objets ``FileType`` reconnaissent le pseudo-argument ``'-'`` et le "
"automatiquement la conversion vers ``sys.stdin`` pour les objets :class:" "convertissent automatiquement vers :data:`sys.stdin` pour les objets :class:"
"`FileType` ouverts en lecture et vers ``sys.stdout`` pour les objets :class:" "`FileType` ouverts en lecture, et vers :data:`sys.stdout` pour les objets :"
"`FileType` ouverts en écriture ::" "class:`FileType` ouverts en écriture ::"
#: library/argparse.rst:1843 #: library/argparse.rst:1843
msgid "The *encodings* and *errors* keyword arguments." msgid "The *encodings* and *errors* keyword arguments."

View File

@ -1386,7 +1386,6 @@ msgstr ""
"Renvoie un nombre a virgule flottante depuis un nombre ou une chaîne *x*." "Renvoie un nombre a virgule flottante depuis un nombre ou une chaîne *x*."
#: library/functions.rst:626 #: library/functions.rst:626
#, fuzzy
msgid "" msgid ""
"If the argument is a string, it should contain a decimal number, optionally " "If the argument is a string, it should contain a decimal number, optionally "
"preceded by a sign, and optionally embedded in whitespace. The optional " "preceded by a sign, and optionally embedded in whitespace. The optional "
@ -1402,20 +1401,19 @@ msgstr ""
"d'effet sur la valeur produite. L'argument peut aussi être une chaîne " "d'effet sur la valeur produite. L'argument peut aussi être une chaîne "
"représentant un *NaN* (*Not-a-Number* ou *pas un nombre* en français), " "représentant un *NaN* (*Not-a-Number* ou *pas un nombre* en français), "
"l'infini positif, ou l'infini négatif. Plus précisément, l'argument doit se " "l'infini positif, ou l'infini négatif. Plus précisément, l'argument doit se "
"conformer à la grammaire suivante, après que les espaces en début et fin de " "conformer à ``floatvalue`` tel que défini la grammaire suivante, après que "
"chaîne aient été retirées :" "les espaces en début et fin de chaîne aient été retirées :"
#: library/functions.rst:644 #: library/functions.rst:644
#, fuzzy
msgid "" msgid ""
"Here ``digit`` is a Unicode decimal digit (character in the Unicode general " "Here ``digit`` is a Unicode decimal digit (character in the Unicode general "
"category ``Nd``). Case is not significant, so, for example, \"inf\", " "category ``Nd``). Case is not significant, so, for example, \"inf\", "
"\"Inf\", \"INFINITY\", and \"iNfINity\" are all acceptable spellings for " "\"Inf\", \"INFINITY\", and \"iNfINity\" are all acceptable spellings for "
"positive infinity." "positive infinity."
msgstr "" msgstr ""
"Ici ``floatnumber`` est un nombre a virgule flottante littéral Python, " "Ici ``digit`` est un chiffre décimal Unicode (caractère de la catégorie "
"décrit dans :ref:`floating`. La casse n'y est pas significative, donc, par " "générale Unicode ``Nd``). La casse n'y est pas significative, donc, par "
"exemple, ``\"inf\"``, ``\" Inf\"``, ``\"INFINITY\"``, et ``\" iNfiNity\"`` " "exemple, ``\"inf\"``, ``\" Inf\"``, ``\"INFINITY\"`` et ``\" iNfiNity\"`` "
"sont tous des orthographes valides pour un infini positif." "sont tous des orthographes valides pour un infini positif."
#: library/functions.rst:649 #: library/functions.rst:649
@ -1777,7 +1775,6 @@ msgid ""
msgstr "" msgstr ""
#: library/functions.rst:876 #: library/functions.rst:876
#, fuzzy
msgid "" msgid ""
"A base-n integer string contains digits, each representing a value from 0 to " "A base-n integer string contains digits, each representing a value from 0 to "
"n-1. The values 0--9 can be represented by any Unicode decimal digit. The " "n-1. The values 0--9 can be represented by any Unicode decimal digit. The "
@ -1790,19 +1787,18 @@ msgid ""
"prefix. Base 0 also disallows leading zeros: ``int('010', 0)`` is not legal, " "prefix. Base 0 also disallows leading zeros: ``int('010', 0)`` is not legal, "
"while ``int('010')`` and ``int('010', 8)`` are." "while ``int('010')`` and ``int('010', 8)`` are."
msgstr "" msgstr ""
"Si *x* n'est pas un nombre ou si *base* est fourni, alors *x* doit être une " "Une chaine représentant un entier en base *n* contient des chiffres, chacun "
"chaîne, un :class:`bytes`, ou un :class:`bytearray` représentant un :ref:" "représentant une valeur de 0 à n-1. Les valeurs 0 à 9 peuvent être "
"`entier littéral <integers>` de base *base*. Le littéral peut être précédé " "représentées par n'importe lequel des chiffres décimaux Unicode. Les valeurs "
"d'un ``+`` ou d'un ``-`` (sans être séparés par une espace), et peut être " "de 10 à 35 peuvent être représentées par ``a`` jusqu'à ``z`` (ou ``A`` à "
"entouré d'espaces. Un littéral de base *n* est composé des symboles de 0 à " "``Z``). La *base* par défaut est 10. Les valeurs autorisées pour *base* sont "
"n-1 où ``a`` jusqu'à ``z`` (ou ``A`` à ``Z``) représentent les valeurs de 10 " "0 et 2 à 36. Les littéraux en base 2, 8, et 16 peuvent être préfixés avec "
"à 35. La *base* par défaut est 10. Les valeurs autorisées pour *base* sont 0 "
"et 2--36. Les littéraux en base 2, 8, et 16 peuvent être préfixés avec "
"``0b``/``0B``, ``0o``/``0O``, ou ``0x``/``0X`` tout comme les littéraux dans " "``0b``/``0B``, ``0o``/``0O``, ou ``0x``/``0X`` tout comme les littéraux dans "
"le code. Fournir 0 comme *base* demande d'interpréter exactement comme un " "le code. Fournir 0 comme *base* demande d'interpréter exactement comme un :"
"littéral dans Python, donc la base sera 2, 8, 10, ou 16, ainsi ``int('010', " "ref:`entier littéral dans du code <integers>` Python, donc la base sera 2, "
"0)`` n'est pas légal, alors que ``int('010')`` l'est tout comme ``int('010', " "8, 10, ou 16 en fonction du préfixe. Indiquer 0 comme base interdit les "
"8)``." "zéros en tête, ainsi ``int('010', 0)`` n'est pas légal, alors que "
"``int('010')`` l'est tout comme ``int('010', 8)``."
#: library/functions.rst:887 #: library/functions.rst:887
msgid "The integer type is described in :ref:`typesnumeric`." msgid "The integer type is described in :ref:`typesnumeric`."

View File

@ -158,19 +158,20 @@ msgid "When *pathsegments* is empty, the current directory is assumed::"
msgstr "Quand *pathsegments* est vide, le dossier courant est utilisé ::" msgstr "Quand *pathsegments* est vide, le dossier courant est utilisé ::"
#: library/pathlib.rst:121 #: library/pathlib.rst:121
#, fuzzy
msgid "" msgid ""
"If a segment is an absolute path, all previous segments are ignored (like :" "If a segment is an absolute path, all previous segments are ignored (like :"
"func:`os.path.join`)::" "func:`os.path.join`)::"
msgstr "" msgstr ""
"Quand plusieurs chemins absolus sont fournis, le dernier est pris comme " "Si un segment est un chemin absolu, tous les segments précédents sont "
"ancre (recopiant le comportement de :func:`os.path.join`) ::" "ignorés (comme :func:`os.path.join`) ::"
#: library/pathlib.rst:129 #: library/pathlib.rst:129
msgid "" msgid ""
"On Windows, the drive is not reset when a rooted relative path segment (e." "On Windows, the drive is not reset when a rooted relative path segment (e."
"g., ``r'\\foo'``) is encountered::" "g., ``r'\\foo'``) is encountered::"
msgstr "" msgstr ""
"Sous Windows, le nom de lecteur est conservé quand un chemin relatif à la "
"racine (par exemple ``r'\\foo'``) est rencontré ::"
#: library/pathlib.rst:135 #: library/pathlib.rst:135
msgid "" msgid ""
@ -267,6 +268,10 @@ msgid ""
"the drive is not reset when the argument is a rooted relative path (e.g., " "the drive is not reset when the argument is a rooted relative path (e.g., "
"``r'\\foo'``)::" "``r'\\foo'``)::"
msgstr "" msgstr ""
"L'opérateur slash aide à créer les chemins enfants, de manière similaire à :"
"func:`os.path.join`. Si l'argument est un chemin absolu, le chemin précédent "
"est ignoré. Sous Windows, le lecteur n'est pas effacé quand l'argument est "
"un chemin relatif enraciné (par exemple ``r'\\foo'``)::"
#: library/pathlib.rst:233 #: library/pathlib.rst:233
msgid "" msgid ""
@ -1033,6 +1038,8 @@ msgid ""
"It is implemented in terms of :func:`os.rename` and gives the same " "It is implemented in terms of :func:`os.rename` and gives the same "
"guarantees." "guarantees."
msgstr "" msgstr ""
"Cette méthode est implémentée d'après :func:`os.rename` et fournit les mêmes "
"garanties."
# « nouveau dans la version … » # « nouveau dans la version … »
#: library/pathlib.rst:1087 #: library/pathlib.rst:1087
@ -1462,18 +1469,16 @@ msgid ":func:`os.path.basename`"
msgstr ":func:`os.path.basename`" msgstr ":func:`os.path.basename`"
#: library/pathlib.rst:1309 #: library/pathlib.rst:1309
#, fuzzy
msgid ":attr:`PurePath.name`" msgid ":attr:`PurePath.name`"
msgstr ":data:`PurePath.name`" msgstr ":attr:`PurePath.name`"
#: library/pathlib.rst:1310 #: library/pathlib.rst:1310
msgid ":func:`os.path.dirname`" msgid ":func:`os.path.dirname`"
msgstr ":func:`os.path.dirname`" msgstr ":func:`os.path.dirname`"
#: library/pathlib.rst:1310 #: library/pathlib.rst:1310
#, fuzzy
msgid ":attr:`PurePath.parent`" msgid ":attr:`PurePath.parent`"
msgstr ":data:`PurePath.parent`" msgstr ":attr:`PurePath.parent`"
#: library/pathlib.rst:1311 #: library/pathlib.rst:1311
msgid ":func:`os.path.samefile`" msgid ":func:`os.path.samefile`"
@ -1488,9 +1493,8 @@ msgid ":func:`os.path.splitext`"
msgstr ":func:`os.path.splitext`" msgstr ":func:`os.path.splitext`"
#: library/pathlib.rst:1312 #: library/pathlib.rst:1312
#, fuzzy
msgid ":attr:`PurePath.stem` and :attr:`PurePath.suffix`" msgid ":attr:`PurePath.stem` and :attr:`PurePath.suffix`"
msgstr ":data:`PurePath.suffix`" msgstr ":attr:`PurePath.stem` et :attr:`PurePath.suffix`"
#: library/pathlib.rst:1317 #: library/pathlib.rst:1317
msgid "Footnotes" msgid "Footnotes"

View File

@ -1087,16 +1087,15 @@ msgid "``\\w``"
msgstr "``\\w``" msgstr "``\\w``"
#: library/re.rst:530 #: library/re.rst:530
#, fuzzy
msgid "" msgid ""
"Matches Unicode word characters; this includes alphanumeric characters (as " "Matches Unicode word characters; this includes alphanumeric characters (as "
"defined by :meth:`str.isalnum`) as well as the underscore (``_``). If the :" "defined by :meth:`str.isalnum`) as well as the underscore (``_``). If the :"
"const:`ASCII` flag is used, only ``[a-zA-Z0-9_]`` is matched." "const:`ASCII` flag is used, only ``[a-zA-Z0-9_]`` is matched."
msgstr "" msgstr ""
"Valide les caractères Unicode de mot ; cela inclut la plupart des caractères " "Valide les caractères Unicode de mot ; cela inclut les caractères "
"qui peuvent être compris dans un mot d'une quelconque langue, aussi bien que " "alphanumériques (tels que définis par :meth:`str.isalnum`), ainsi que les "
"les nombres et les tirets bas. Si l'option :const:`ASCII` est utilisée, " "tirets bas(``_``). Si l'option :const:`ASCII` est utilisée, seuls les "
"seuls les caractères de la classe ``[a-zA-Z0-9_]`` sont validés." "caractères de la classe ``[a-zA-Z0-9_]`` sont validés."
#: library/re.rst:535 #: library/re.rst:535
msgid "" msgid ""
@ -2373,21 +2372,28 @@ msgstr "search() vs. match()"
msgid "" msgid ""
"Python offers different primitive operations based on regular expressions:" "Python offers different primitive operations based on regular expressions:"
msgstr "" msgstr ""
"Python offre différentes opérations primitives basées sur des expressions "
"régulières."
#: library/re.rst:1476 #: library/re.rst:1476
#, fuzzy
msgid ":func:`re.match` checks for a match only at the beginning of the string" msgid ":func:`re.match` checks for a match only at the beginning of the string"
msgstr "Correspond uniquement à la fin d'une chaîne de caractères." msgstr ""
":func:`re.match` cherche une correspondance uniquement au début de la chaîne "
"de caractères"
#: library/re.rst:1477 #: library/re.rst:1477
msgid "" msgid ""
":func:`re.search` checks for a match anywhere in the string (this is what " ":func:`re.search` checks for a match anywhere in the string (this is what "
"Perl does by default)" "Perl does by default)"
msgstr "" msgstr ""
":func:`re.search` cherche une correspondance n'importe où dans la chaîne de "
"caractères (ce que fait Perl par défaut)"
#: library/re.rst:1479 #: library/re.rst:1479
msgid ":func:`re.fullmatch` checks for entire string to be a match" msgid ":func:`re.fullmatch` checks for entire string to be a match"
msgstr "" msgstr ""
":func:`re.fullmatch` cherche une correspondance avec l'intégralité de la "
"chaîne de caractères."
#: library/re.rst:1491 #: library/re.rst:1491
msgid "" msgid ""

View File

@ -327,9 +327,8 @@ msgstr ""
"context-manager>`" "context-manager>`"
#: library/sqlite3.rst:242 #: library/sqlite3.rst:242
#, fuzzy
msgid ":ref:`sqlite3-howto-row-factory`" msgid ":ref:`sqlite3-howto-row-factory`"
msgstr ":ref:`convertisseurs sqlite3 <sqlite3-converters>`" msgstr ":ref:`guide de fabrique de ligne sqlite3 <sqlite3-howto-row-factory>`"
#: library/sqlite3.rst:244 #: library/sqlite3.rst:244
msgid "" msgid ""
@ -424,6 +423,12 @@ msgid ""
"operations may need to be serialized by the user to avoid data corruption. " "operations may need to be serialized by the user to avoid data corruption. "
"See :attr:`threadsafety` for more information." "See :attr:`threadsafety` for more information."
msgstr "" msgstr ""
"Si ``True`` (par défaut), :exc:`ProgrammingError` sera levée si la connexion "
"à la base de données est utilisée par un thread autre que celui qui la "
"créée. Si ``False``, la connexion peut être utilisée par plusieurs threads ; "
"les opérations décriture devront peut-être être sérialisées par "
"lutilisateur pour éviter la corruption des données. Voir :attr:`sécurité "
"des threads <threadsafety>` pour plus dinformations."
#: library/sqlite3.rst:310 #: library/sqlite3.rst:310
msgid "" msgid ""

View File

@ -416,7 +416,7 @@ msgstr "pas de valeur"
#: library/struct.rst:207 #: library/struct.rst:207
msgid "\\(7)" msgid "\\(7)"
msgstr "" msgstr "\\(7)"
#: library/struct.rst:209 #: library/struct.rst:209
msgid "``c``" msgid "``c``"
@ -640,7 +640,7 @@ msgstr "*bytes* (séquence d'octets)"
#: library/struct.rst:244 #: library/struct.rst:244
msgid "\\(9)" msgid "\\(9)"
msgstr "" msgstr "\\(9)"
#: library/struct.rst:246 #: library/struct.rst:246
msgid "``p``" msgid "``p``"
@ -648,7 +648,7 @@ msgstr "``p``"
#: library/struct.rst:246 #: library/struct.rst:246
msgid "\\(8)" msgid "\\(8)"
msgstr "" msgstr "\\(8)"
#: library/struct.rst:248 #: library/struct.rst:248
msgid "``P``" msgid "``P``"
@ -932,18 +932,16 @@ msgid "Packed binary storage of homogeneous data."
msgstr "Stockage agrégé binaire de données homogènes." msgstr "Stockage agrégé binaire de données homogènes."
#: library/struct.rst:435 #: library/struct.rst:435
#, fuzzy
msgid "Module :mod:`json`" msgid "Module :mod:`json`"
msgstr "Module :mod:`array`" msgstr "Module :mod:`json`"
#: library/struct.rst:435 #: library/struct.rst:435
msgid "JSON encoder and decoder." msgid "JSON encoder and decoder."
msgstr "" msgstr ""
#: library/struct.rst:437 #: library/struct.rst:437
#, fuzzy
msgid "Module :mod:`pickle`" msgid "Module :mod:`pickle`"
msgstr "Module :mod:`xdrlib`" msgstr "Module :mod:`pickle`"
#: library/struct.rst:438 #: library/struct.rst:438
msgid "Python object serialization." msgid "Python object serialization."

View File

@ -2,14 +2,17 @@
given branch. given branch.
""" """
import argparse
import re import re
import shutil import shutil
from pathlib import Path
import argparse
import subprocess import subprocess
from pathlib import Path
from subprocess import PIPE from subprocess import PIPE
from tqdm import tqdm from tqdm import tqdm
NOT_TO_TRANSLATE = {Path("whatsnew/changelog.po")}
def run(*args: str | Path, **kwargs) -> subprocess.CompletedProcess: def run(*args: str | Path, **kwargs) -> subprocess.CompletedProcess:
"""Run a shell command with subprocess.run() with check=True and """Run a shell command with subprocess.run() with check=True and
@ -26,14 +29,20 @@ def parse_args():
type=Path, type=Path,
help="Use this given cpython clone.", help="Use this given cpython clone.",
) )
parser.add_argument("branch", help="Merge from this branch") parser.add_argument(
"branch",
help="Merge from this branch or from this commit",
)
return parser.parse_args() return parser.parse_args()
def setup_repo(repo_path: Path, branch: str): def setup_repo(repo_path: Path, branch: str):
"""Ensure we're up-to-date.""" """Ensure we're up-to-date."""
run("git", "-C", repo_path, "checkout", branch) if branch.find('.') == 1:
run("git", "-C", repo_path, "pull", "--ff-only") run("git", "-C", repo_path, "checkout", branch)
run("git", "-C", repo_path, "pull", "--ff-only")
else: # it's a commit
run("git", "-C", repo_path, "checkout", branch)
def copy_new_files(new_files: set[Path], pot_path: Path) -> None: def copy_new_files(new_files: set[Path], pot_path: Path) -> None:
@ -43,6 +52,7 @@ def copy_new_files(new_files: set[Path], pot_path: Path) -> None:
file.parent.mkdir(parents=True, exist_ok=True) file.parent.mkdir(parents=True, exist_ok=True)
src = (pot_path / file).with_suffix(".pot") src = (pot_path / file).with_suffix(".pot")
run("msgcat", "-o", file, src) run("msgcat", "-o", file, src)
run("git", "add", file)
def update_known_files(known_files: set[Path], pot_path: Path) -> None: def update_known_files(known_files: set[Path], pot_path: Path) -> None:
@ -107,7 +117,6 @@ def git_add_relevant_files():
run("git", "add", file) run("git", "add", file)
else: else:
run("git", "checkout", "--", file) run("git", "checkout", "--", file)
run("rm", "-f", "whatsnew/changelog.po") # We don't translate this file.
def main(): def main():
@ -121,7 +130,7 @@ def main():
upstream = { upstream = {
file.relative_to(pot_path).with_suffix(".po") file.relative_to(pot_path).with_suffix(".po")
for file in pot_path.glob("**/*.pot") for file in pot_path.glob("**/*.pot")
} } - NOT_TO_TRANSLATE
downstream = { downstream = {
Path(po) Path(po)
for po in run("git", "ls-files", "*.po", stdout=PIPE).stdout.splitlines() for po in run("git", "ls-files", "*.po", stdout=PIPE).stdout.splitlines()
@ -129,7 +138,7 @@ def main():
copy_new_files(upstream - downstream, pot_path=pot_path) copy_new_files(upstream - downstream, pot_path=pot_path)
update_known_files(upstream & downstream, pot_path=pot_path) update_known_files(upstream & downstream, pot_path=pot_path)
remove_old_files(downstream - upstream) remove_old_files(downstream - upstream)
clean_paths((upstream - downstream) | (upstream & downstream)) clean_paths(upstream)
shutil.rmtree(pot_path) shutil.rmtree(pot_path)
run("powrap", "-m") run("powrap", "-m")
update_makefile(args.cpython_repo) update_makefile(args.cpython_repo)

View File

@ -306,7 +306,6 @@ msgstr ""
"contenant les primitives." "contenant les primitives."
#: tutorial/classes.rst:126 #: tutorial/classes.rst:126
#, fuzzy
msgid "" msgid ""
"If a name is declared global, then all references and assignments go " "If a name is declared global, then all references and assignments go "
"directly to the next-to-last scope containing the module's global names. To " "directly to the next-to-last scope containing the module's global names. To "
@ -317,7 +316,7 @@ msgid ""
"outer variable unchanged)." "outer variable unchanged)."
msgstr "" msgstr ""
"Si un nom est déclaré comme global, alors toutes les références et " "Si un nom est déclaré comme global, alors toutes les références et "
"affectations vont directement dans la portée intermédiaire contenant les " "affectations vont directement dans l'avant-dernière portée contenant les "
"noms globaux du module. Pour pointer une variable qui se trouve en dehors de " "noms globaux du module. Pour pointer une variable qui se trouve en dehors de "
"la portée la plus locale, vous pouvez utiliser l'instruction :keyword:" "la portée la plus locale, vous pouvez utiliser l'instruction :keyword:"
"`nonlocal`. Si une telle variable n'est pas déclarée *nonlocal*, elle est en " "`nonlocal`. Si une telle variable n'est pas déclarée *nonlocal*, elle est en "
@ -1217,16 +1216,15 @@ msgid "Odds and Ends"
msgstr "Trucs et astuces" msgstr "Trucs et astuces"
#: tutorial/classes.rst:739 #: tutorial/classes.rst:739
#, fuzzy
msgid "" msgid ""
"Sometimes it is useful to have a data type similar to the Pascal \"record\" " "Sometimes it is useful to have a data type similar to the Pascal \"record\" "
"or C \"struct\", bundling together a few named data items. The idiomatic " "or C \"struct\", bundling together a few named data items. The idiomatic "
"approach is to use :mod:`dataclasses` for this purpose::" "approach is to use :mod:`dataclasses` for this purpose::"
msgstr "" msgstr ""
"Il est parfois utile d'avoir un type de donnée similaire au \"record\" du " "Il est parfois utile d'avoir un type de donnée similaire au *record* du "
"Pascal ou au *struct* du C, qui regroupent ensemble quelques attributs " "Pascal ou au *struct* du C, qui regroupent ensemble quelques attributs "
"'données' nommés. La définition d'une classe vide remplit parfaitement ce " "« données » nommés. L'approche idiomatique correspondante en Python est "
"besoin ::" "d'utiliser des :mod:`dataclasses` ::"
#: tutorial/classes.rst:759 #: tutorial/classes.rst:759
msgid "" msgid ""

View File

@ -139,7 +139,6 @@ msgid "An example that uses most of the list methods::"
msgstr "L'exemple suivant utilise la plupart des méthodes des listes ::" msgstr "L'exemple suivant utilise la plupart des méthodes des listes ::"
#: tutorial/datastructures.rst:123 #: tutorial/datastructures.rst:123
#, fuzzy
msgid "" msgid ""
"You might have noticed that methods like ``insert``, ``remove`` or ``sort`` " "You might have noticed that methods like ``insert``, ``remove`` or ``sort`` "
"that only modify the list have no return value printed -- they return the " "that only modify the list have no return value printed -- they return the "
@ -148,7 +147,7 @@ msgid ""
msgstr "" msgstr ""
"Vous avez probablement remarqué que les méthodes qui ne font que modifier la " "Vous avez probablement remarqué que les méthodes qui ne font que modifier la "
"liste, comme ``insert``, ``remove`` ou ``sort``, n'affichent pas de valeur " "liste, comme ``insert``, ``remove`` ou ``sort``, n'affichent pas de valeur "
"de retour (elles renvoient ``None``) [1]_. C'est un principe respecté par " "de retour (elles renvoient ``None``) [#]_. C'est un principe respecté par "
"toutes les structures de données muables en Python." "toutes les structures de données muables en Python."
#: tutorial/datastructures.rst:128 #: tutorial/datastructures.rst:128

View File

@ -248,6 +248,10 @@ msgid ""
"odd number of ``\\`` characters; see :ref:`the FAQ entry <faq-programming-" "odd number of ``\\`` characters; see :ref:`the FAQ entry <faq-programming-"
"raw-string-backslash>` for more information and workarounds." "raw-string-backslash>` for more information and workarounds."
msgstr "" msgstr ""
"Il existe une petite subtilité concernant les chaînes brutes : une chaîne "
"brute ne peut pas se terminer par un nombre impair de caractères ``\\`` ; "
"voir :ref:`l'entrée FAQ <faq-programming-raw-string-backslash>` pour plus "
"d'informations et des solutions de contournement."
#: tutorial/introduction.rst:197 #: tutorial/introduction.rst:197
msgid "" msgid ""